Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdffc19c

Browse files
authored
Merge pull request#18172 from ianhi/report-button-correctly
allow webAgg to report middle click events
2 parents852c08e +ce8d715 commitdffc19c

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
webAgg backend no longer reports a middle click as a right click
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
Previously when using the webAgg backend the event passed to a callback
5+
by ``fig.canvas.mpl_connect('mouse_button_event', callback)`` on a middle click
6+
would report `.MouseButton.RIGHT` instead of `.MouseButton.MIDDLE`

‎lib/matplotlib/backends/backend_webagg_core.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -260,14 +260,6 @@ def _handle_mouse(self, event):
260260
# off by 1
261261
button=event['button']+1
262262

263-
# The right mouse button pops up a context menu, which
264-
# doesn't work very well, so use the middle mouse button
265-
# instead. It doesn't seem that it's possible to disable
266-
# the context menu in recent versions of Chrome. If this
267-
# is resolved, please also adjust the docstring in MouseEvent.
268-
ifbutton==2:
269-
button=3
270-
271263
e_type=event['type']
272264
guiEvent=event.get('guiEvent',None)
273265
ife_type=='button_press':

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp