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

Appearance settings

Commit f532615

Browse filesBrowse files
committed
Merge pull request #4291 from azjps/nbagg_middle20150328
Add note about nbagg middle click button
2 parents 94e6944 + f54d0ed commit f532615
Copy full SHA for f532615

File tree

Expand file treeCollapse file tree

2 files changed

+6
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-3
lines changed

‎lib/matplotlib/backend_bases.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backend_bases.py
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
1616
:class:`Event`
1717
The base class for all of the matplotlib event
18-
handling. Derived classes suh as :class:`KeyEvent` and
18+
handling. Derived classes such as :class:`KeyEvent` and
1919
:class:`MouseEvent` store the meta data like keys and buttons
2020
pressed, x and y locations in pixel and
2121
:class:`~matplotlib.axes.Axes` coordinates.
@@ -1499,7 +1499,9 @@ class MouseEvent(LocationEvent):
14991499
15001500
*button*
15011501
button pressed None, 1, 2, 3, 'up', 'down' (up and down are used
1502-
for scroll events)
1502+
for scroll events). Note that in the nbagg backend, both the
1503+
middle and right clicks return 3 since right clicking will bring
1504+
up the context menu in some browsers.
15031505
15041506
*key*
15051507
the key depressed when the mouse event triggered (see

‎lib/matplotlib/backends/backend_webagg_core.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_webagg_core.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,8 @@ def handle_event(self, event):
296296
# The right mouse button pops up a context menu, which
297297
# doesn't work very well, so use the middle mouse button
298298
# instead. It doesn't seem that it's possible to disable
299-
# the context menu in recent versions of Chrome.
299+
# the context menu in recent versions of Chrome. If this
300+
# is resolved, please also adjust the docstring in MouseEvent.
300301
if button == 2:
301302
button = 3
302303

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.