10000 allow webAgg to report middle click events · matplotlib/matplotlib@846b8ea · GitHub
[go: up one dir, main page]

Skip to content

Commit 846b8ea

Browse files
committed
allow webAgg to report middle click events
The current MouseEvent docstring has no mention of this issue so I did not remove anything there. This code was originally added to account for difficulties in preventing the context menu in chrome 23 #1426 (comment)
1 parent ede8e56 commit 846b8ea

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

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-
if button == 2:
269-
button = 3
270-
271263
e_type = event['type']
272264
guiEvent = event.get('guiEvent', None)
273265
if e_type == 'button_press':

0 commit comments

Comments
 (0)
0