I want to get the position (relative or otherwise) of the two fingers/touches inside a gesture event (gesturestart
, gesturechange
, gestureend
) on mobile Safari (iOS: iPad/iPhone). I know that the gesture*
events don't actually provide this in the event args but i thought there might be a 'trick' to getting this info. It would be great to get the coords of the fingers while tracking a gesture (eg. scaling and moving an object in the same gesture).
Can this be done?
It turns out that this information is not directly available via the 'gesture' events. The touch
events are the key and i was able to get the touches collection and use the first two touches to derive a delta/midpoint of the two sets of coords. This seems to work.