pinch
pinch in and out on elements on handheld devices.
Installation
Install with component(1):
$ component install component/pinch
Example
;
API
Pinch(el, fn)
Initialize Pinch
with the element el
and callback function fn
.
;
The event object e
is augmented with following keys:
x
: the x coordinate of the midpoint between your two fingersy
: the y coordinate of the midpoint between your two fingersscale
: the relative distance between your two fingers starting at 1.
Pinch.unbind()
Unbind
TODO
- add
e.rotate
support for android
License
MIT