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

pan and zoom likely broken with mpl 3.10 #9

Open
tacaswell opened this issue Dec 18, 2024 · 0 comments
Open

pan and zoom likely broken with mpl 3.10 #9

tacaswell opened this issue Dec 18, 2024 · 0 comments

Comments

@tacaswell
Copy link

Via matplotlib/matplotlib#28453 we now rely on the buttons to be set on the MouseEvents generated on motion notifications to detect when the mouse is release in pan/zoom events. I suspect the change needed on the kivy side is something like

def motion_notify_event(self, x, y, gui_event=None):
event = MouseEvent(
"motion_notify_event", canvas=self, x=x, y=y, guiEvent=gui_event
)
self.callbacks.process("motion_notify_event", event)

    def motion_notify_event(self, x, y, gui_event=None):
        if mpl.__version__ > '3.10':   # wrong way to check version
            extra_kwargs = {'button': get_all_pressed_buttons_from(gui_event)}
        else:
            extra_kwargs = {}
        event = MouseEvent(
                "motion_notify_event", canvas=self, x=x, y=y, guiEvent=gui_event
        )
        self.callbacks.process("motion_notify_event", event)
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

No branches or pull requests

1 participant