Skip to content

Commit

Permalink
fix: loading blocks in RTL
Browse files Browse the repository at this point in the history
  • Loading branch information
BeksOmega authored and alschmiedt committed Sep 20, 2021
1 parent a4d84e5 commit 17f9f4f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/serialization/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

Expand Down

0 comments on commit 17f9f4f

Please sign in to comment.