Description
Right now we do some things to disable hover interactions during drag - dragElement
uses gd._dragged
for example, and pie
looks at this to prevent hover if you drag over a pie from a cartesian subplot. But there are likely other subplot types that don't do this, and anyway this will do nothing to detect dragging over the plot from outside the plot entirely (which currently causes hover events - hence the bug
label). Seems like we could do better by just looking at event.buttons
.
see #2117 (comment)
Also from a chat with @monfera
I like the generalization idea, and an incredibly minor point is that how the drag is initiated feels circumstantial - now it's a mouse gesture with buttons; maybe in the future, there'd be other ways that are useful. The question is, do we want to disable receipt of certain input based on the use of affordances (e.g. mouse buttons here), or based on something ongoing in the chart? E.g. a scrollyteller or some real-time shared plot could have data driven dragging. I told you it's a minor point 😃
Also I think we want to disable it for the specific cursor (mouse) that's doing the dragging, again in a hypothetical dystopian future, you could drag something with one finger and hover (or drag) with some others