Skip to content

Commit 2645334

Browse files
committed
refactored condition for tabletmode
1 parent 735f8f2 commit 2645334

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

draftlogs/6563_fix.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- fix condition of `plotly_click` to fire it on touch devices [[#6563](https://github.com/plotly/plotly.js/pull/6563)]

src/plots/gl3d/scene.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -454,9 +454,7 @@ proto.render = function() {
454454
pointData.bbox = bbox[0];
455455
}
456456

457-
if(selection.buttons && selection.distance < 5 && !tabletmode) {
458-
gd.emit('plotly_click', eventData);
459-
} else if(tabletmode && selection.distance < 5) {
457+
if(selection.distance < 5 && (selection.buttons || tabletmode)) {
460458
gd.emit('plotly_click', eventData);
461459
} else {
462460
gd.emit('plotly_hover', eventData);

0 commit comments

Comments
 (0)