Rotate
Extends:
A Rotate is defined as two inputs moving about a circle, maintaining a relatively equal radius.
Constructor Summary
Public Constructor | ||
public |
Constructor function for the Rotate class. |
Method Summary
Public Methods | ||
public |
move() - Event hook for the move 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 Members
Public Methods
public move(inputs: Array, state: Object): Object source
move() - Event hook for the move of a gesture. Obtains the midpoint of two the two inputs and calculates the projection of the right most input along a unit circle to obtain an angle. This angle is compared to the previously calculated angle to output the change of distance, and is compared to the initial angle to output the distance from the initial angle to the current angle.
Override:
Gesture#moveReturn:
Object | obj.distanceFromLast - The change of angle between the last position and the current position. |