Skip to content
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

Switch to mpl-pan-zoom to get widgetlocking behavior #10

Closed
ianhi opened this issue Jun 21, 2023 · 1 comment · Fixed by #17
Closed

Switch to mpl-pan-zoom to get widgetlocking behavior #10

ianhi opened this issue Jun 21, 2023 · 1 comment · Fixed by #17

Comments

@ianhi
Copy link

ianhi commented Jun 21, 2023

Hi all, and perhaps in particular @JamesWrigley

I saw these lines:

# This is a filthy hack to stop the navigation bars box-zoom feature and
# the panhandler interfering with each other. If both of these are
# enabled at the same time then the panhandler will move the canvas
# while the user draws a box, which doesn't work very well. This way,
# the panhandler is only enabled when box zoom is disabled.
#
# Ideally the panhandler would support matplotlibs widgetLock, see:
# https://github.com/ianhi/mpl-interactions/pull/243#issuecomment-1101523740
self._navigation_toolbar._actions["zoom"].triggered.connect(
lambda checked: self.toggle_panhandler(not checked)
)

and wanted to pop in and say that if you transition to using mpl-pan-zoom which is the dedicated package where zoom_factory and panning behavior will live long term then I think the iwdget locking behavior is fixed by this PR: mpl-extensions/mpl-pan-zoom#2

n.b. panhandler -> PanManager when switching the packages.

@JamesWrigley
Copy link
Member

Great, thank you very much for the hint and for your work :)

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

Successfully merging a pull request may close this issue.

2 participants