Fix selection bug on bumps caused by mutator actions.

This commit is contained in:
Neil Fraser
2016-08-03 18:33:14 -07:00
parent d6d8b8eb97
commit 875ffad42c

View File

@@ -86,7 +86,7 @@ Blockly.RenderedConnection.prototype.bumpAwayFrom_ = function(staticConnection)
}
// Raise it to the top for extra visibility.
var selected = Blockly.selected == rootBlock;
selected || rootBlock.select();
selected || rootBlock.addSelect();
var dx = (staticConnection.x_ + Blockly.SNAP_RADIUS) - this.x_;
var dy = (staticConnection.y_ + Blockly.SNAP_RADIUS) - this.y_;
if (reverse) {
@@ -97,7 +97,7 @@ Blockly.RenderedConnection.prototype.bumpAwayFrom_ = function(staticConnection)
dx = -dx;
}
rootBlock.moveBy(dx, dy);
selected || rootBlock.unselect();
selected || rootBlock.removeSelect();
};
/**