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

Backport PR #29842 on branch v3.10.x (Don't drag draggables on scroll events)#29858

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletionlib/matplotlib/offsetbox.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1488,7 +1488,7 @@ def finalize_offset(self):
def __init__(self, ref_artist, use_blit=False):
self.ref_artist = ref_artist
if not ref_artist.pickable():
ref_artist.set_picker(True)
ref_artist.set_picker(self._picker)
self.got_artist = False
self._use_blit = use_blit and self.canvas.supports_blit
callbacks = self.canvas.callbacks
Expand All@@ -1502,6 +1502,11 @@ def __init__(self, ref_artist, use_blit=False):
]
]

@staticmethod
def _picker(artist, mouseevent):
# A custom picker to prevent dragging on mouse scroll events
return (artist.contains(mouseevent) and mouseevent.name != "scroll_event"), {}

# A property, not an attribute, to maintain picklability.
canvas = property(lambda self: self.ref_artist.get_figure(root=True).canvas)
cids = property(lambda self: [
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp