Referring to a similar question here, I am trying to get an object rotated on smartphones/tablets. Since I got it with mouseDown
method, this won't apply to the touching on mobile devices. Is there any solution for that?
Asked
Active
Viewed 666 times
0
-
1http://stackoverflow.com/questions/21009821/how-to-impliment-a-onmousedown-and-onmouseup-on-a-touch-screen-iphone – qballer Sep 12 '16 at 21:04
1 Answers
3
Try touchstart
and touchend
as the event listeners for touch screens.
window.addEventListener("touchstart", handleStart, false);
window.addEventListener("touchend", handleEnd, false);

guardabrazo
- 1,219
- 1
- 13
- 26