Skip to content
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

Double click event not fired anymore after selection #1138

Closed
IvanOdd opened this issue Nov 14, 2016 · 5 comments
Closed

Double click event not fired anymore after selection #1138

IvanOdd opened this issue Nov 14, 2016 · 5 comments

Comments

@IvanOdd
Copy link

IvanOdd commented Nov 14, 2016

Hello !

I have an issue concerning the doubleclick event. It doesn't fire anymore after a selection of dots, in a scatter plot for instance, either with the rectangle or the lasso.

See this CodePen.

Thanks !

@etpinard
Copy link
Contributor

Ha. That's because double-clicking on a graph with selected points triggers plotly_deselect instead of plotly_doubleclick.

You could probably make an argument that both plotly_deselect and plotly_doubleclick should be triggered in that situation. In #255, we chose a handler-based event namespace. What do you think?

@etpinard
Copy link
Contributor

See example of plotly_deselect -> http://codepen.io/etpinard/pen/ObXMXe

@IvanOdd
Copy link
Author

IvanOdd commented Nov 14, 2016

Thanks for your quick answer !

Sounds logical to me to have two distinct events here. I think maybe the names can be confusing, since "doubleclick" sounds general and "deselect" is specific, while they are actually both on the same level (im not sure if i am clear here haha).

But i admit that i have no idea for renaming the event. Maybe unzoom or resetplot but i don't think that this will englobe all the use cases of the event. I guess just mentionning it in the doc should be enough for the users.

@etpinard
Copy link
Contributor

Thanks for the feedback @smalesys 🎉

We're planning on cleaning up our event namespace and event data in v2.0.0. I'll paste your last comment in #145.

@IvanOdd
Copy link
Author

IvanOdd commented Nov 14, 2016

You are welcome! Maybe the main confusing point is that "doubleclick" is an action while "deselect" is an effect. But with a doc it shouldn't be a problem, i know that naming things is a pain in the *** ;)
Good luck for V2.0 !

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

No branches or pull requests

2 participants