Skip to content

plotly_doubleclick event for scatter3d? #3266

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

Closed
cpsievert opened this issue Nov 19, 2018 · 3 comments
Closed

plotly_doubleclick event for scatter3d? #3266

cpsievert opened this issue Nov 19, 2018 · 3 comments
Labels
feature something new

Comments

@cpsievert
Copy link

Seems as though it was never implemented -- https://codepen.io/cpsievert/pen/mQqWrz

Requested as part of plotly/plotly.R#1413

@etpinard etpinard added the feature something new label Nov 20, 2018
@wkumler
Copy link

wkumler commented Apr 18, 2022

Any plans to implement this? I spent a little time on it this weekend but didn't make any headway.

@alexcjohnson
Copy link
Collaborator

@wkumler no plans, but I'd be happy to get you pointed in the right direction if you'd like to give it a shot. The single-click event for 3D is here:

gd.emit('plotly_click', eventData);

Unfortunately it can't use the same logic as most of the other click handlers, because it's based on stack.gl and it's just taking events from those packages. So I think the way to handle this is to stash the first click event and timestamp somewhere (on the scene object?), and when you see a new click event check if the eventData is the same and the timestamp is within gd._context.doubleClickDelay of the first click - if so, emit a plotly_doubleclick event first, followed by the plotly_click event you'd have emitted then anyway.

Same eventData isn't exactly the same criterion as used elsewhere to distinguish a doubleclick from two clicks while the mouse is moving, but it should be reasonable.

@gvwilson
Copy link
Contributor

Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

No branches or pull requests

5 participants