jQuery.event.special.pan
Event raised repeatedly while a pointer is being moved (on pointermove
) after a minimum distance from its original position at pointerstart
.
Useful as a way to move an element in realtime tracked against a touch. The current pageX
and pageY
position on pan
events can be compared against the position at panstart
to determine an offset to move the panned element.
Usage
$(element).on('pan', function(e){
// handle event...
});
Data on the event
pointers
: array of Pointer objects, each withpageX
andpageY
propertiesoriginalEvent
: Native event objectduration
: duration of the gestureangle
: angle, in degrees, of the pan from start to finishdirection
: general direction of the pan, based on the angle. 'up', 'down', 'right', or 'left'pageX
: x positionpageY
: y position