The pinch handler is used to deal with sequences of browser events related to pinch
gestures. The handler is used by controls that want to know when a pinch sequence begins,
when a pinch is happening, and when it has finished.
Controls that use the pinch handler typically construct it with callbacks for
‘start’, ‘move’, and ‘done’. Callbacks for these keys
are called when the pinch begins, with each change, and when the pinch is done.
Create a new pinch handler with the ALKMaps.Handler.Pinch constructor.
Inherits from
Summary
| ALKMaps.Handler.Pinch |
The pinch handler is used to deal with sequences of browser
events related to pinch gestures. |
| Properties |
|
| started |
{Boolean} When a touchstart event is received, we want to
record it, but not set ‘pinching’ until the touchmove get started
after starting. |
| stopDown |
{Boolean} Stop propagation of touchstart events from getting
to listeners on the same element. |
| pinching |
{Boolean} |
| last |
{Object} Object that store informations related to pinch last
touch. |
| start |
{Object} Object that store informations related to pinch
touchstart. |
| singleTouchPanMap |
{Boolean} If true, single touch and move will pan the map.
|
| Constructor |
|
| ALKMaps.Handler.Pinch
|
Returns ALKMaps.Handler.Pinch |
| Functions |
|
| touchstart |
Handle touchstart events |
| touchmove |
Handle touchmove events |
| touchend |
Handle touchend events |
| activate |
Activate the handler. |
| deactivate |
Deactivate the handler. |
| getDistance |
Get the distance in pixels between two touches. |
| getPinchData |
Get informations about the pinch event. |