Tap
Extends:
A Tap is defined as a touchstart to touchend event in quick succession.
Test:
Constructor Summary
Public Constructor | ||
public |
constructor(options: Object) Constructor function for the Tap class. |
Member Summary
Public Members | ||
public |
The maximum delay between a touchstart and touchend can be configured in milliseconds. |
|
public |
The minimum amount between a touchstart and a touchend can be configured in milliseconds. |
|
public |
The number of inputs to trigger a Tap can be variable, and the maximum number being a factor of the browser. |
|
public |
A move tolerance in pixels allows some slop between a user's start to end events. This allows the Tap gesture to be triggered more easily. |
|
public |
The type of the Gesture. |
Method Summary
Public Methods | ||
public |
Event hook for the end of a gesture. |
|
public |
Event hook for the move of a gesture. |
|
public |
Event hook for the start of a gesture. |
Inherited Summary
From class Gesture | ||
public |
The unique identifier for each gesture determined at bind time by the state object. |
|
public |
The generic string type of gesture ('expand'|'pan'|'pinch'|'rotate'|'swipe'|'tap'). |
|
public |
end() - Event hook for the move of a gesture |
|
public |
Return the id of the event. |
|
public |
getType() - Returns the generic type of the gesture |
|
public |
move() - Event hook for the move of a gesture |
|
public |
Set the id of the gesture to be called during an event |
|
public |
Set the type of the gesture to be called during an event |
|
public |
start() - Event hook for the start of a gesture |
|
public |
update(object: *) Updates internal properties with new ones, only if the properties exist. |
Public Constructors
public constructor(options: Object) source
Constructor function for the Tap class.
Override:
Gesture#constructorParams:
Name | Type | Attribute | Description |
options | Object |
|
The options object. |
options.minDelay | Number |
|
The minimum delay between a touchstart and touchend can be configured in milliseconds. |
options.maxDelay | Number |
|
The maximum delay between a touchstart and touchend can be configured in milliseconds. |
options.numInputs | Number |
|
Number of inputs for the Tap gesture. |
options.tolerance | Number |
|
The tolerance in pixels a user can move. |
Public Members
public maxDelay: Number source
The maximum delay between a touchstart and touchend can be configured in milliseconds. The maximum delay starts to count down when the expected number of inputs are on the screen, and ends when ALL inputs are off the screen.
public minDelay: Number source
The minimum amount between a touchstart and a touchend can be configured in milliseconds. The minimum delay starts to count down when the expected number of inputs are on the screen, and ends when ALL inputs are off the screen.
public numInputs: Number source
The number of inputs to trigger a Tap can be variable, and the maximum number being a factor of the browser.
Public Methods
public end(inputs: Array): null | Object source
Event hook for the end of a gesture. Determines if this the tap event can be fired if the delay and tolerance constraints are met. Also waits for all of the inputs to be off the screen before determining if the gesture is triggered.
Override:
Gesture#endParams:
Name | Type | Attribute | Description |
inputs | Array | The array of Inputs on the screen. |
public move(inputs: Array, state: Object): null source
Event hook for the move of a gesture. The Tap event reaches here if the user starts to move their input before an 'end' event is reached.