mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
correctly position the trash can and zoom controls for RTL, toolbox at left
This commit is contained in:
parent
90b1cce5d5
commit
b22b25e8f8
2 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue