Skip to content
New issue

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

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

Already on GitHub? # to your account

Label rotation randomly not working #258

Closed
hupe13 opened this issue May 20, 2023 · 1 comment · Fixed by #260
Closed

Label rotation randomly not working #258

hupe13 opened this issue May 20, 2023 · 1 comment · Fixed by #260

Comments

@hupe13
Copy link
Contributor

hupe13 commented May 20, 2023

#252 (comment)

Some things do not seem to work properly.

I think I have found the reason. I tested the same page with one elevation chart in Firefox and Chrome. The label rotation was random (yes or no), even in different tabs of the same browser. I changed the line

this.on('elechart_init elechart_axis', function(e) {

to

this.on('elechart_init elechart_axis elechart_updated', function(e) {

and the effect did not occur anymore. Not even with multiple charts with different rotations on the same page.

@Raruto
Copy link
Owner

Raruto commented May 30, 2023

The initial idea was to try to limit the number DOM mutations (perhaps feasible, but it would still require other thoughts..).

Anyway, something like this could suffice (I haven't tested):

this.on('elechart_updated', function(e) {

Feel free to submit a pull request to close it.

👋 Raruto

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants