-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
added tabletmode to fire plotly_click event for mobile devices. #6563
Conversation
src/plots/gl3d/scene.js
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_click
event onscatter3d
plot for mobile devices.