Constructor
new SingleGesture(touches)
Creates a new single touch gesture handler.
Parameters:
Name | Type | Description |
---|---|---|
touches |
Array.<object> | The initial touchpoint objects when the gesture is first detected |
- Source:
Extends
- module:player/TouchGestures-Gesture
Methods
doSwipe(direction)
Performs a swipe.
Parameters:
Name | Type | Description |
---|---|---|
direction |
string | Currently recognized "up", "down", "left", "right" |
- Source:
finish()
Check quick swipe when the touchpint is released from the screen.
A quick swipe happend, when the last movement before release was a quick flick in one direction. The touchpoint has to be moved for a certain distance within a short timeframe right before release.
- Source:
move(touches)
Checks for long swipes when the touch point moves.
Also updates the last touch value to check quick swipes when gesture is finished.
Parameters:
Name | Type | Description |
---|---|---|
touches |
Array.<object> | The touchpoints. |
- Source: