mirror of
https://github.com/google/blockly.git
synced 2026-01-08 01:20:12 +01:00
fix: loading blocks in RTL
This commit is contained in:
committed by
alschmiedt
parent
a4d84e57f8
commit
17f9f4f689
@@ -399,8 +399,12 @@ const loadPrivate = function(
|
||||
* @param {!State} state The state object to reference.
|
||||
*/
|
||||
const loadCoords = function(block, state) {
|
||||
const x = state['x'] === undefined ? 0 : state['x'];
|
||||
let x = state['x'] === undefined ? 0 : state['x'];
|
||||
const y = state['y'] === undefined ? 0 : state['y'];
|
||||
|
||||
const workspace = block.workspace;
|
||||
x = workspace.RTL ? workspace.getWidth() - x : x;
|
||||
|
||||
block.moveBy(x, y);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user