Skip to content

pan and zoom likely broken with mpl 3.10 #9

@tacaswell

Description

@tacaswell

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions