From a239c7207f77a5844d21da0b6928f34ef41234c0 Mon Sep 17 00:00:00 2001 From: Neil Fraser Date: Sun, 22 Nov 2015 04:26:58 -0800 Subject: [PATCH] Don't update shadows on connections since they are immutable. --- core/connection.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/core/connection.js b/core/connection.js index a459d2514..db5a8a6b9 100644 --- a/core/connection.js +++ b/core/connection.js @@ -161,14 +161,10 @@ Blockly.Connection.prototype.connect = function(otherConnection) { // Can't make a value connection if male block is already connected. throw 'Source connection already connected (value).'; } else if (otherConnection.targetConnection) { - // Record and disable the shadow so that it does not respawn here. - var shadowDom = otherConnection.getShadowDom(); - otherConnection.setShadowDom(null); // If female block is already connected, disconnect and bump the male. var orphanBlock = otherConnection.targetBlock(); orphanBlock.setParent(null); if (orphanBlock.isShadow()) { - otherConnection.setShadowDom(Blockly.Xml.blockToDom_(orphanBlock)); orphanBlock.dispose(); } else { if (!orphanBlock.outputConnection) { @@ -194,8 +190,6 @@ Blockly.Connection.prototype.connect = function(otherConnection) { orphanBlock.outputConnection.bumpAwayFrom_(otherConnection); }, Blockly.BUMP_DELAY); } - // Restore the shadow. - otherConnection.setShadowDom(shadowDom); } } } else {