Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Cleanup interactive pan/zoom.#18847
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
I don't know what's wrong with Azure; maybe a rebase is needed? |
Store all the relevant state in a single namedtuple (`_pan_info`),similar to the one used for zoom (`_zoom_info`), instead of scatteringit in two attributes (`_button_pressed`/`_xypress`). Slightly reorderlogic in `press_pan` to match the order in `press_zoom`; likewise sync`release_pan` with `release_zoom`.We don't need to store the axes index (as was done in `_xypress`).In `release_zoom`, move the less-than-5px check out of the loop, as itonly needs to be done once.
namedtuple it is, then. |
Store all the relevant state in a single dict (
_pan_info
), similarto the one used for zoom (
_zoom_info
), instead of scattering itin two attributes (
_button_pressed
/_xypress
). Slightly reorderlogic in
press_pan
to match the order inpress_zoom
; likewise syncrelease_pan
withrelease_zoom
.We don't need to store the axes index (as was done in
_xypress
).In
release_zoom
, move the less-than-5px check out of the loop, as itonly needs to be done once.
PR Summary
PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
and runflake8 --docstring-convention=all
).doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).