Repository navigation
added tabletmode to fire plotly_click event for mobile devices. - #6563
Conversation
| if(selection.buttons && selection.distance < 5) { | ||
| if(selection.buttons && selection.distance < 5 && !tabletmode) { | ||
| gd.emit('plotly_click', eventData); | ||
| } else if(tabletmode && selection.distance < 5) { |
There was a problem hiding this comment.
Thanks for the PR.
Could we possibly combine the two if statements for plotly_click like this?
if(selection.distance < 5 && (selection.buttons || tabletmode)) {
gd.emit('plotly_click', eventData);
} else {
gd.emit('plotly_hover', eventData);
}There was a problem hiding this comment.
Thank you for the review I just updated the code and added draft log but probably I misunderstood the usage of the changes.
There was a problem hiding this comment.
It looks like my suggestion caused the tests to fail.
Let's revert that part but please keep the draftlog.
And we should ready to go 🚀
Thank you!
There was a problem hiding this comment.
Thank you! I just took your review which only changed draftlogs but the test passed. The same thing happened between 82604eb and 735f8f2
In that commit I just eslinted but the test passed too. webgl-jasmine fails sometimes. weird...
|
I think we could call this a bug fix. |
Co-authored-by: Mojtaba Samimi <33888540+archmoj@users.noreply.github.com>
|
💃 |
I added tabletmode flag and touchstart event to fire
plotly_clickevent onscatter3dplot for mobile devices.