mirror of
https://github.com/google/blockly.git
synced 2026-01-06 08:30:13 +01:00
Fix selection bug on bumps caused by mutator actions.
This commit is contained in:
@@ -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();
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user