Skip to content

Reorder NavigationToolbar2 methods. #17416

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

Merged
merged 1 commit into from
Jun 17, 2020
Merged

Reorder NavigationToolbar2 methods. #17416

merged 1 commit into from
Jun 17, 2020

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented May 14, 2020

This PR only moves methods around, and does not change any actual
implementation code.

Right now NavigationToolbar2 methods are implemented in a very haphazard
order. In particular the successively called event handlers for
interactive panning and zooming are not defined next to one another,
which makes logic hard to follow. This PR moves home, back and
forward next to one another (in the same order as they appear in
the toolbar); pan, press_pan, drag_pan, and release_pan next
to one another in that order; and likewise for zoom, press_zoom,
drag_zoom, and release_zoom.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

This PR only moves methods around, and does not change any actual
implementation code.

Right now NavigationToolbar2 methods are implemented in a very haphazard
order.  In particular the successively called event handlers for
interactive panning and zooming are not defined next to one another,
which makes logic hard to follow.  This PR moves `home`, `back` and
`forward` next to one another (in the same order as they appear in
the toolbar); `pan`, `press_pan`, `drag_pan`, and `release_pan` next
to one another in that order; and likewise for `zoom`, `press_zoom`,
`drag_zoom`, and `release_zoom`.
@timhoffm timhoffm added this to the v3.3.0 milestone Jun 17, 2020
@timhoffm timhoffm merged commit 9ab4c40 into matplotlib:master Jun 17, 2020
@anntzer anntzer deleted the nt branch June 17, 2020 16:47
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.

3 participants