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

nbagg scroll wheel / middle click button event #4289

Closed
azjps opened this issue Mar 28, 2015 · 3 comments · Fixed by #4291
Closed

nbagg scroll wheel / middle click button event #4289

azjps opened this issue Mar 28, 2015 · 3 comments · Fixed by #4291

Comments

@azjps
Copy link
Contributor

azjps commented Mar 28, 2015

On scroll wheel (middle) click for nbagg backend, the returned MouseEvent.button is 3 instead of 2, so middle and right clicks aren't distinguishable. For example try UAT 16. This occurred for me on chrome with IPython 2.3.0 and matplotlib 1.4.3 / 1.5.dev1.

Would try to fix myself but I assume it'd be quicker for someone from say this issue to change the errant javascript / ipython / matplotlib / wherever code. :)

@tacaswell
Copy link
Member

This looks like it is intentional to disable to context menu

See https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/backends/backend_webagg_core.py#L296

@tacaswell tacaswell added this to the unassigned milestone Mar 28, 2015
@azjps
Copy link
Contributor Author

azjps commented Mar 28, 2015

Ah okay, that's a bit unexpected but understandable; right clicking doesn't open a context menu and registers correctly on the versions of chrome/firefox I was using. Maybe a note could be put in the MouseEvent docstring about this special case? Thanks!

@tacaswell
Copy link
Member

@azjps Could you put in a PR to do that?

azjps added a commit to azjps/matplotlib that referenced this issue Mar 28, 2015
In nbagg backend right now, MouseEvent.button maps to 3 for both
middle clicks and right clicks. Added a note about this in
MouseEvent docstring.

Closes matplotlib#4289 for now.

Change-Id: I1a191382191087ebb9072626c9f4dfb59c519d89
azjps added a commit to azjps/matplotlib that referenced this issue Mar 30, 2015
In nbagg backend right now, MouseEvent.button maps to 3 for both
middle clicks and right clicks. Added a note about this in
MouseEvent docstring.

Closes matplotlib#4289 for now.

Change-Id: I1a191382191087ebb9072626c9f4dfb59c519d89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants