correctly position the trash can and zoom controls for RTL, toolbox at left

This commit is contained in:
rachel-fenichel 2016-04-13 14:04:14 -07:00
parent 90b1cce5d5
commit b22b25e8f8
2 changed files with 8 additions and 0 deletions

View file

@ -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;

View file

@ -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;