consolidation

This commit is contained in:
Rachel Fenichel
2016-04-27 13:32:39 -07:00
parent 7b1fdcb7c6
commit 45f9b8af05
2 changed files with 4 additions and 8 deletions

View File

@@ -517,7 +517,9 @@ Blockly.Connection.prototype.respawnShadow = function(parentConnection,
} else {
throw 'Child block does not have output or previous statement.';
}
return blockShadow;
}
return null;
};
/**

View File

@@ -305,14 +305,8 @@ Blockly.RenderedConnection.prototype.respawnShadow = function(parentConnection,
var shadow = parentConnection.getShadowDom();
if (parentBlock.workspace && shadow && Blockly.Events.recordUndo) {
var blockShadow =
Blockly.Xml.domToBlock(parentBlock.workspace, shadow);
if (blockShadow.outputConnection) {
parentConnection.connect(blockShadow.outputConnection);
} else if (blockShadow.previousConnection) {
parentConnection.connect(blockShadow.previousConnection);
} else {
throw 'Child block does not have output or previous statement.';
}
Blockly.RenderedConnection.superClass_.respawnShadow.call(this,
parentConnection, parentBlock, childBlock);
blockShadow.initSvg();
blockShadow.render(false);
}