From b22b25e8f8ca7e03288708f143ddb8260720a63b Mon Sep 17 00:00:00 2001 From: rachel-fenichel Date: Wed, 13 Apr 2016 14:04:14 -0700 Subject: [PATCH] correctly position the trash can and zoom controls for RTL, toolbox at left --- core/trashcan.js | 4 ++++ core/zoom_controls.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/core/trashcan.js b/core/trashcan.js index 429d613c6..a9e670c57 100644 --- a/core/trashcan.js +++ b/core/trashcan.js @@ -220,6 +220,10 @@ Blockly.Trashcan.prototype.position = function() { } if (this.workspace_.RTL) { this.left_ = this.MARGIN_SIDE_ + Blockly.Scrollbar.scrollbarThickness; + if (this.workspace_.toolbox_ && + this.workspace_.toolbox_.toolboxPosition == Blockly.TOOLBOX_AT_LEFT) { + this.left_ += metrics.absoluteLeft; + } } else { this.left_ = metrics.viewWidth + metrics.absoluteLeft - this.WIDTH_ - this.MARGIN_SIDE_ - Blockly.Scrollbar.scrollbarThickness; diff --git a/core/zoom_controls.js b/core/zoom_controls.js index 31a0b2126..922794706 100644 --- a/core/zoom_controls.js +++ b/core/zoom_controls.js @@ -208,6 +208,10 @@ Blockly.ZoomControls.prototype.position = function() { } if (this.workspace_.RTL) { this.left_ = this.MARGIN_SIDE_ + Blockly.Scrollbar.scrollbarThickness; + if (this.workspace_.toolbox_ && + this.workspace_.toolbox_.toolboxPosition == Blockly.TOOLBOX_AT_LEFT) { + this.left_ += metrics.absoluteLeft; + } } else { this.left_ = metrics.viewWidth + metrics.absoluteLeft - this.WIDTH_ - this.MARGIN_SIDE_ - Blockly.Scrollbar.scrollbarThickness;