Please use polymer-gestures instead
Rich gestures that work on both desktop and mobile
PointerGestures uses PointerEvents to make useful gestures for application development.
Included events are:
tap
- a pointer moves down and up quickly, preventable with<pointerevent>.preventTap
hold
- a pointer is held downholdpulse
- fires on an interval while the pointer is held downrelease
- a held pointer is releasedflick
- a primary pointer moved quickly across the screen, and was releasedtrackstart
- a primary pointer has started moving away from it's inital start pointtrack
- a primary pointer continues to move, targets the element that receivedtrackstart
trackend
- a primary pointer has been released, targets the element that receivedtrackstart
pinch
- Two pointers are pinching in and outrotate
- Two pointers are rotating around a center point
-
Install the PointerEvents polyfill as a sibling to PointerGestures
-
Include
PointerGestures/pointergestures.js
in your page. -
Set the
touch-action
of a few elements and see the events fire!