-
Notifications
You must be signed in to change notification settings - Fork 19.6k
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(dataZoom): fix restore zoom button to not skip undoing any zooming event #19119
base: master
Are you sure you want to change the base?
Conversation
Thanks for your contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution. Please follow the wiki to add some test cases. Thanks!
Hi, I added a test case: Zoom reset should undo all zooming event one by one |
The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-19119@ec410ea |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! Please fix the lint problems.
I noticed that the restore behavior is not as expected after fixing. See this demo.
Currently, if you drag the selection slowly with the dataZoom slider, and then hit restore button in the toolbox, it will restore multiple times until reset. But it's expected to be reset directly once hit the restore button. Make sure the snapshot is taken only when the interaction is over (when mouse click ends).
|
fix(dataZoom): fix restore zoom button to not skip undoing any zooming event
close: #19118
Brief Information
This pull request is in the type of:
What does this PR do?
Pull request ensures that restore zoom button on dataZoom "Ctrl-Z-s" or undoes all zooming event including mouse scroll and slide.
Fixed issues
#19118
Details
Before: What was the problem?
Previously the undo function only applied to the click and hold zoom and not any other kind of zooming events.
It meant after mixing zooming events (e.g click and hold zoom + scroll + slide) undo functionality did skipped all zoom changes that was not made by click and hold zoom.
After: How does it behave after the fixing?
From now on the undo function will apply to any kind of zooming events.
It means that after mixing zooming events (e.g click and hold zoom + scroll + slide) undo functionality will undo them one by one until the it zooms out to the original range.
Document Info
One of the following should be checked.
Misc
ZRender Changes
Related test cases or examples to use the new APIs
N.A.
Others
Merging options
Other information