Fix RTL bubble drag (#3356)

This commit is contained in:
Sam El-Husseini
2019-10-30 14:15:54 -07:00
committed by GitHub
parent eb50bb33e7
commit 6367d5f27a

View File

@@ -823,7 +823,9 @@ Blockly.Bubble.prototype.moveDuringDrag = function(dragSurface, newLoc) {
*/
Blockly.Bubble.prototype.getRelativeToSurfaceXY = function() {
return new Blockly.utils.Coordinate(
this.anchorXY_.x + this.relativeLeft_,
this.workspace_.RTL ?
-this.relativeLeft_ + this.anchorXY_.x - this.width_ :
this.anchorXY_.x + this.relativeLeft_,
this.anchorXY_.y + this.relativeTop_);
};