mirror of
https://github.com/google/blockly.git
synced 2026-03-10 23:30:13 +01:00
consolidation
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user