Here you can see for the same statement block there are 2 connections. I want to attach few of the blocks to "Connection_01" and another block to "Connection_02". Is there any way to do this.
Please find the code for the block
Block.js
Blockly.Blocks['parallel_actions'] = {
init: function() {
this.appendStatementInput("PARALLEL_ACTIONS")
.setCheck(null)
.appendField("Do Parallel Execution");
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.setColour(240);
this.setTooltip('');
this.setHelpUrl('http://www.example.com/');
}
};
JavaScript.js
Blockly.JavaScript['parallel_actions'] = function(block) {
var statements_parallel_actions = Blockly.JavaScript.statementToCode(block, 'PARALLEL_ACTIONS', Blockly.JavaScript.ORDER_ATOMIC);
// TODO: Assemble JavaScript into code variable.
var code = ' ';
if(statements_parallel_actions == '')
{
code = ' ';
}
else
{
statements_parallel_actions = statements_parallel_actions.substring(1, statements_parallel_actions.length - 1);
statements_parallel_actions = statements_parallel_actions.split('Pause();').join('');
code = statements_parallel_actions + 'Pause();\n';
}
return code;
};
Can any one help me with this?
Thanks in advance
Sujil V S