Commit 15a18b7d authored by Neil Fraser's avatar Neil Fraser

Merge remote-tracking branch 'origin/2016' into 2016

# Conflicts:
#	msg/json/en.json
parents 19c71573 7d48f253
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -115,7 +115,7 @@ Blockly.Blocks['controls_if'] = { ...@@ -115,7 +115,7 @@ Blockly.Blocks['controls_if'] = {
decompose: function(workspace) { decompose: function(workspace) {
var containerBlock = workspace.newBlock('controls_if_if'); var containerBlock = workspace.newBlock('controls_if_if');
containerBlock.initSvg(); containerBlock.initSvg();
var connection = containerBlock.getInput('STACK').connection; var connection = containerBlock.nextConnection;
for (var i = 1; i <= this.elseifCount_; i++) { for (var i = 1; i <= this.elseifCount_; i++) {
var elseifBlock = workspace.newBlock('controls_if_elseif'); var elseifBlock = workspace.newBlock('controls_if_elseif');
elseifBlock.initSvg(); elseifBlock.initSvg();
...@@ -147,7 +147,7 @@ Blockly.Blocks['controls_if'] = { ...@@ -147,7 +147,7 @@ Blockly.Blocks['controls_if'] = {
} }
this.elseifCount_ = 0; this.elseifCount_ = 0;
// Rebuild the block's optional inputs. // Rebuild the block's optional inputs.
var clauseBlock = containerBlock.getInputTargetBlock('STACK'); var clauseBlock = containerBlock.nextConnection.targetBlock();
while (clauseBlock) { while (clauseBlock) {
switch (clauseBlock.type) { switch (clauseBlock.type) {
case 'controls_if_elseif': case 'controls_if_elseif':
...@@ -187,7 +187,7 @@ Blockly.Blocks['controls_if'] = { ...@@ -187,7 +187,7 @@ Blockly.Blocks['controls_if'] = {
* @this Blockly.Block * @this Blockly.Block
*/ */
saveConnections: function(containerBlock) { saveConnections: function(containerBlock) {
var clauseBlock = containerBlock.getInputTargetBlock('STACK'); var clauseBlock = containerBlock.nextConnection.targetBlock();
var i = 1; var i = 1;
while (clauseBlock) { while (clauseBlock) {
switch (clauseBlock.type) { switch (clauseBlock.type) {
...@@ -223,7 +223,7 @@ Blockly.Blocks['controls_if_if'] = { ...@@ -223,7 +223,7 @@ Blockly.Blocks['controls_if_if'] = {
this.setColour(Blockly.Blocks.logic.HUE); this.setColour(Blockly.Blocks.logic.HUE);
this.appendDummyInput() this.appendDummyInput()
.appendField(Blockly.Msg.CONTROLS_IF_IF_TITLE_IF); .appendField(Blockly.Msg.CONTROLS_IF_IF_TITLE_IF);
this.appendStatementInput('STACK'); this.setNextStatement(true);
this.setTooltip(Blockly.Msg.CONTROLS_IF_IF_TOOLTIP); this.setTooltip(Blockly.Msg.CONTROLS_IF_IF_TOOLTIP);
this.contextMenu = false; this.contextMenu = false;
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment