Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roll custom RTL positioning code into this repo #130

Open
joshlory opened this issue Jun 28, 2018 · 0 comments
Open

Roll custom RTL positioning code into this repo #130

joshlory opened this issue Jun 28, 2018 · 0 comments

Comments

@joshlory
Copy link
Contributor

https://github.com/code-dot-org/code-dot-org/blob/8ec4f3aafe97968dd18f8f318bb15a6c6b50a422/apps/src/StudioApp.js#L1183-L1192

    // Keep blocks static relative to the right edge in RTL mode
    if (this.isUsingBlockly() && Blockly.RTL) {
      if (this.lastWorkspaceWidth && (this.lastWorkspaceWidth !== workspaceWidth)) {
        var blockOffset = workspaceWidth - this.lastWorkspaceWidth;
        Blockly.mainBlockSpace.getTopBlocks().forEach(function (topBlock) {
          topBlock.moveBy(blockOffset, 0);
        });
      }
    }
    this.lastWorkspaceWidth = workspaceWidth;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant