mirror of
https://github.com/google/blockly.git
synced 2026-01-11 10:57:07 +01:00
correctly position the trash can and zoom controls for RTL, toolbox at left
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user