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

fix resize on rtl page #6063

Merged
merged 2 commits into from
Feb 13, 2019
Merged

fix resize on rtl page #6063

merged 2 commits into from
Feb 13, 2019

Conversation

kurkle
Copy link
Member

@kurkle kurkle commented Feb 11, 2019

Fixes: #6057
Demo

etimberg
etimberg previously approved these changes Feb 11, 2019
@simonbrunel simonbrunel added this to the Version 2.8 milestone Feb 11, 2019
@benmccann
Copy link
Contributor

Can you test an rtl language in the demo when switching to rtl mode? E.g. change the legend from "# of votes" to "عدد الاصوات"

@kurkle
Copy link
Member Author

kurkle commented Feb 11, 2019

Can you test an rtl language in the demo when switching to rtl mode? E.g. change the legend from "# of votes" to "عدد الاصوات"

Don't see a difference, do you think there should be?

@simonbrunel
Copy link
Member

@kurkle can you add a regression test by duplicating one of these tests.

@kurkle
Copy link
Member Author

kurkle commented Feb 11, 2019

@kurkle can you add a regression test by duplicating one of these tests.

Done 🚀

@benmccann
Copy link
Contributor

Can you test an rtl language in the demo when switching to rtl mode? E.g. change the legend from "# of votes" to "عدد الاصوات"

Don't see a difference, do you think there should be?

No, after looking into rtl a bit more it seems there should not be a difference.

I was worried that setting ltr might not do the right thing for users in Arabic or Hewbrew. But as far as I can tell this doesn't change anything. The tooltips look like they might not be aligned properly when the user is using an rtl language, but that's the case on master as well. At least this fixes the resize issue

@simonbrunel
Copy link
Member

But as far as I can tell this doesn't change anything

direction: rtl is enforced only on the internal div (.chartjs-size-monitor-*) that are used to detect a resize, thus it doesn't impact the canvas or any parent of the canvas or any user DOM elements.

@simonbrunel simonbrunel merged commit 5fc934e into chartjs:master Feb 13, 2019
@simonbrunel
Copy link
Member

Thanks @kurkle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants