-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
on_hover
: pass MouseEvent to the user
#988
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
Comments
@etpinard we've been discussing object containers for data so that we can bundle more information along with event callbacks. I don't know precisely what this means for backwards compatibility (i.e. which fraction of events do this already), but perhaps this is a use-case. I think ideally all events would pass an object (or at least a variable-list length of arguments) so that items like this could at least be added without versioning fears. |
Yeah, that would be nice. I'll referenced #168 and #145 but this request deserves a ticker of its own. Thanks @CalvinFernandez I would prefer that our gd.on('plotly_hover', (eventData) => {
eventData.event // => original Mouse Event object
}); Implementing for cartesian plots should be easy. Doing the same for our |
Does this require a major version bump? |
Not if we link the event object to the existing |
cc @n-riesco |
Done in #1505 |
Currently, Plotly doesn't pass the raw MouseEvent to the user. I'd like to use clientX and clientY to determine the location of the user's cursor at the time the hover event was fired to render a custom tooltip.
would like to augment the hover event, something like
on_hover: (data, event)
The text was updated successfully, but these errors were encountered: