GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Don't drag draggables on scroll events by dstansby · Pull Request #29842 · matplotlib/matplotlib Conversation
Member
PR summaryFixes #29142; replaces #29270. The solution here is to set a custom picker on PR checklist
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
tacaswell
approved these changes
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
I don't think I understand this: "Pick" is logically selecting an element by clicking on it. No matter the technical implementation, why should scrolling ever be interpreted as pick? In what use case would that make sense? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Anybody can merge after adding the suggested documentation.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| @staticmethod | ||
| def _picker(artist, mouseevent): | ||
| return (artist.contains(mouseevent) and mouseevent.name != "scroll_event"), {} |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| return (artist.contains(mouseevent) and mouseevent.name != "scroll_event"), {} | |
| """ | |
| A custom picker to prevent dragging on scroll events. | |
| Dragging is initialized through a pick events, which is typically a | |
| mouse click. However, mouse scrolling also fires pick events and | |
| we need to filter them out so that scrolling does not initalize | |
| dragging. | |
| """ | |
| return (artist.contains(mouseevent) and mouseevent.name != "scroll_event"), {} |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
👍 to adding a comment - I thought this was a bit verbose for a private helper function, so I added a one-liner instead - what do you think?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[MNT]: Draggable legend gets stuck on cursor after scroll event
There was an error while loading. Please reload this page.