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

Include event.buttons in mouse events #568

Merged
merged 1 commit into from
Dec 17, 2024
Merged

Conversation

ianthomas23
Copy link
Member

Fixes #567.

Matplotlib PR matplotlib/matplotlib#28453 added the use of event.buttons in mouse event messages that are handled by backends. We need to support the same here, otherwise ipympl does not work interactively with matplotlib >= 3.10.

It is a simple one-line fix, the same as at
https://github.com/matplotlib/matplotlib/blob/0400863b7a0d660d9333242fabd83dbfe3496503/lib/matplotlib/backends/web_backend/js/mpl.js#L647
It works for both matplotlib 3.10 and <3.10, as with the latter the new argument is just ignored.

Copy link
Contributor

Binder 👈 Launch a binder notebook on branch matplotlib/ipympl/567-event-buttons

@ianthomas23
Copy link
Member Author

UI test failures are unrelated, they have been failing for a few weeks. I will look at fixing them in a separate PR.

Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

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

Successfully merging this pull request may close these issues.

Incompatible whith matplotlib v3.10.0
2 participants