Skip to content

Commit

Permalink
Merge pull request #2360 from alschmiedt/Bump_RTL
Browse files Browse the repository at this point in the history
Fixes bumping too much when in RTL
  • Loading branch information
alschmiedt authored Apr 4, 2019
2 parents 124a8f1 + a759fff commit dcbac91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/rendered_connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit dcbac91

Please sign in to comment.