Fixes bumping too much when in RTL

This commit is contained in:
alschmiedt
2019-04-04 15:54:17 -07:00
parent 380d05dd08
commit a759fffcc1

View File

@@ -106,7 +106,8 @@ Blockly.RenderedConnection.prototype.bumpAwayFrom_ = function(staticConnection)
dy = -dy;
}
if (rootBlock.RTL) {
dx = -dx;
dx = (staticConnection.x_ - Blockly.SNAP_RADIUS -
Math.floor(Math.random() * Blockly.BUMP_RANDOMNESS)) - this.x_;
}
rootBlock.moveBy(dx, dy);
selected || rootBlock.removeSelect();