-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
plotly_relayouting
event: live updates during panning/zooming
#3888
Conversation
Nicely done @antoinerg ! Thanks very much for taking this (not so fun) task on! You're almost there. Let me know if I can help out with anything. |
@antoinerg looks good! Thanks very (very) for the PR! One is it passing on your setup? |
I don't remember it failing before but it does fail at the moment on my desktop. |
@etpinard It seems like the test that currently fails is affected by the timing of events. It checks the axis range right after starting to drag. I suspect that now that we emit a plotly.js/test/jasmine/tests/cartesian_interact_test.js Lines 1464 to 1483 in 6e2da35
A workaround is to update those "assert values". Doing so in commit a76a52a makes the tests pass both locally and on the CI. Does that seem like a reasonable modification? |
That makes perfect sense. So adding
Yep, nicely done. Could you just manually check that zoom-drag https://codepen.io/etpinard/pen/eaVQze?editors=1111 works correctly on your branch? |
It looks fine as far as I can tell: https://codepen.io/antoinerg/pen/Jqpebm?editors=0001 |
Awesome work 💃 ! |
This closes #2082 by adding a
plotly_relayouting
event to emit live updates of coordinates change when panning and zooming.I used the abandoned PR #2606 for guidance but I had to modify it and write tests.
Tests could probably be DRYed up significantly but it gets the job done. I now need to investigate why they fail on CircleCI .