8000 Don't drag draggables on scroll events by dstansby · Pull Request #29842 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Don't drag draggables on scroll events #29842

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 2, 2025
Merged
Changes from 1 commit
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
10 changes: 9 additions & 1 deletion lib/matplotlib/offsetbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,15 @@ def finalize_offset(self):
def __init__(self, ref_artis 6CE8 t, use_blit=False):
self.ref_artist = ref_artist
if not ref_artist.pickable():
ref_artist.set_picker(True)
ref_artist.set_picker(
lambda artist, mouseevent: (
(
artist.contains(mouseevent) and
mouseevent.name != "scroll_event"
),
{}
)
)
self.got_artist = False
self._use_blit = use_blit and self.canvas.supports_blit
callbacks = self.canvas.callbacks
Expand Down
Loading
0