-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Get click coordinate after a click with touch device #6721
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
With touch (see here simulated with Dev Console), we only get coordinates when drag-and-drop, but not when single click/tap: 2023-09-12-0947-52.mp4Is there a workaround for this? With mouse, we get coordinates in both cases (drag-and-drop, and single pixel click): 2023-09-12-0925-12.mp4 |
Hi @josephernest, I did some tests and realized that with |
Thanks @lvlte, that's great! Feel free to send me the lines involved, I can try if it fixes it by just manually patching it. Thanks again! |
@josephernest see the unique commit in the linked PR. |
Fixed by #6724. |
Let's say we have the
select
tool active on a heatmap. Live demo here, see the JS console.We successfully get the coordinates:
plotly_selected
event => we have the coordinates inevent.selections
plotly_click
event => we have the coordinates inevent.points
When using a touchscreen, we also successfully get the coordinates when drag-and-drop: the
plotly_selected
event is fired and we have the coordinates inevent.selections
. But when clicking (=tap), we only get:plotly_selected undefined
, and no coordinate.Question: I know that Plotly.js touch support is limited for now, but is there a way to get
plotly_click
event when we do a tap on a heatmap (withselect
tool), and have the coordinates inevent.points
?PS: Even if I used an event listener with touch events (such as
touchstart
,touchend
), I wouldn't get the coordinates in Plotly plot coordinate system.@lvlte Maybe you have an idea? (I know you have experience in these topics!)
The text was updated successfully, but these errors were encountered: