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

Commit282ef47

Browse files
authored
Merge pull request#29858 from meeseeksmachine/auto-backport-of-pr-29842-on-v3.10.x
2 parentsba588a5 +b29bd15 commit282ef47

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎lib/matplotlib/offsetbox.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,7 @@ def finalize_offset(self):
14881488
def__init__(self,ref_artist,use_blit=False):
14891489
self.ref_artist=ref_artist
14901490
ifnotref_artist.pickable():
1491-
ref_artist.set_picker(True)
1491+
ref_artist.set_picker(self._picker)
14921492
self.got_artist=False
14931493
self._use_blit=use_blitandself.canvas.supports_blit
14941494
callbacks=self.canvas.callbacks
@@ -1502,6 +1502,11 @@ def __init__(self, ref_artist, use_blit=False):
15021502
]
15031503
]
15041504

1505+
@staticmethod
1506+
def_picker(artist,mouseevent):
1507+
# A custom picker to prevent dragging on mouse scroll events
1508+
return (artist.contains(mouseevent)andmouseevent.name!="scroll_event"), {}
1509+
15051510
# A property, not an attribute, to maintain picklability.
15061511
canvas=property(lambdaself:self.ref_artist.get_figure(root=True).canvas)
15071512
cids=property(lambdaself: [

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp