Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what are differences between touchmove and gesturechange?

I originally wanted to track one-finger panning on mobile webkit (iOS/Android). I found Creating a "sticky" fixed-position item that works on iOS Safari and I saw gesturechange. But as far as I tried, gesturechange only seems to be fired for two-finger move. Then I found touchmove event and it seems I can use that.

  1. What are differences between touchmove and gesturechange?
  2. Is it right to use touchmove for detecting one-finger panning?
like image 940
beatak Avatar asked Oct 07 '22 15:10

beatak


1 Answers

1.Touchmove, touchstart, touchend, touchcancel are part of the multi-touch sequence. A multi-touch sequence begins when a finger first touches the surface.

gesturechange, gesturestart, gestureend are still part of multi-touch sequence but they contain more precise objects. Not all devices support gesture events. They contain scaling and rotation information allowing gestures to be combined, if supported by the platform. If not supported, one gesture ends before another starts.

2.So if you are just aiming for one finger such as swipe or slider I would use just use the touchmove. Unless you really want to turn your swipe into a 3d effect or rotate it i would combine touchmove and gesturechange.

GL

source: https://developer.apple.com/library/safari/documentation/appleapplications/reference/safariwebcontent/HandlingEvents/HandlingEvents.html#//apple_ref/doc/uid/TP40006511-SW1

like image 89
РАВИ Avatar answered Oct 13 '22 21:10

РАВИ