You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I've been trying to integrate touch support for box selection functionality in plotly.js for 2D graphs. I've mapped touchstart, touchmove, and touchend to mousedown, mousemove, and mouseup events respectively. This mapping allows selection of area on the graph, but after selection, it doesn't allow to make another selection and doesn't event trigger touchstart (that is mapped to mousedown) event, it only triggers touchmove event (that is mapped to mousemove), since touchmove enables scrolling on touch devices, so after performing selection, only touchmove events get triggered on every touch on the screen. It suspends the whole web app functionality. So I was wondering if I could disable default scrolling on touchmove then it could possibly resolve the issue. I've also tried adding e.preventDefault(); on touchmove but it gives this warning: "Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted."
Any help will be appreciated.
Thanks!
P.S.: I've also looked into the relevant posts like 480, but couldn't find any solution for touch selection on 2D graphs.
The text was updated successfully, but these errors were encountered:
Hi,
I've been trying to integrate touch support for box selection functionality in plotly.js for 2D graphs. I've mapped touchstart, touchmove, and touchend to mousedown, mousemove, and mouseup events respectively. This mapping allows selection of area on the graph, but after selection, it doesn't allow to make another selection and doesn't event trigger touchstart (that is mapped to mousedown) event, it only triggers touchmove event (that is mapped to mousemove), since touchmove enables scrolling on touch devices, so after performing selection, only touchmove events get triggered on every touch on the screen. It suspends the whole web app functionality. So I was wondering if I could disable default scrolling on touchmove then it could possibly resolve the issue. I've also tried adding
e.preventDefault();
on touchmove but it gives this warning:"Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted."
Any help will be appreciated.
Thanks!
P.S.: I've also looked into the relevant posts like 480, but couldn't find any solution for touch selection on 2D graphs.
The text was updated successfully, but these errors were encountered: