-
Notifications
You must be signed in to change notification settings - Fork 20
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
Support right to left languages #40
Comments
Hi, |
Hi @mohamadi-sara20 - it would be very nice if that was supported. If you're good with JavaScript you may be able to help us solve this. Let me ask @lgessler what you think too: The Python code to render everything RTL is actually not so complicated; take a look at this: a1e8aad#diff-f437b984a877bb1e2ae0babc54191aa9 It seems to work fine except when the window is resized, at which point all of the JSPlumb edges go crazy, as if the anchor points are staying behind even after the divs have moved due to resize. Do you have some intuition on how to update JSPlumb to the new positions? The divs seem to just accept that the container is RTL and .right is set, so they seem to be happy. I uploaded an RTL demo document to the dev instance and hardwired it to RTL=True for testing. |
@amir-zeldes I added a |
Hi @mat-sipahi , thanks for looking into this - making this work in segmentation is also important. The page loading in RTL mode for structure seems to be working - everything renders correctly for me on load since the Python code is generating the correct initial state for RTL structure. The problem seems to happen on the javascript side: when connecting two divs in RTL mode, arrows initially render correctly, because the anchor points for the jsplumb library work exactly the same in RTL and LTR mode. The problem I'm seeing is that on resize, the browser seems to remember some earlier positions of the anchor points from before the resize, and does not refresh the view correctly. This doesn't happen in LTR mode for some reason... Unfortunately I don't have time to look into this more deeply at the moment, but if you find a solution that doesn't disturb LTR mode, I'm happy to merge it into the next release. |
@amir-zeldes The reason behind RTL resize problem is that jsplumb push the arrows on the canvas by fixing their |
This would require flipping the container RTL for segmentation mode, and swapping all the offset signs for the relation structurer. The container should be set to RTL so that scrolling works correctly.
The text was updated successfully, but these errors were encountered: