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.
What are differences between touchmove and gesturechange?
Is it right to use touchmove for detecting one-finger panning?
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.
What are differences between touchmove and gesturechange?
Is it right to use touchmove for detecting one-finger panning?
javascript
android
ios
mobile
webkit
Share
edited May 23, 2017 at 11:46
CommunityBot111 silver badge
asked Jun 6, 2012 at 19:55
beatakbeatak9,6221010 gold badges3535 silver badges4343 bronze badges
Add a ment
|
1 Answer
1
Reset to default
5
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 bined, 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 bine touchmove and gesturechange.