Constructor
new GestureRecognizer(target, callback)
Constructs a base gesture recognizer. This is an abstract base class and not intended to be instantiated
directly.
Parameters:
Name |
Type |
Description |
target |
EventTarget
|
The document element this gesture recognizer observes for mouse and touch events. |
callback |
function
|
An optional function to call when this gesture is recognized. If non-null, the
function is called when this gesture is recognized, and is passed a single argument: this gesture recognizer,
e.g., gestureCallback(recognizer) . |
- Source:
Throws:
-
If the specified target is null or undefined.
-
-
Type
-
ArgumentError
Members
clientX :Number
Indicates the X coordinate of this gesture.
Type:
- Source:
clientY :Number
Returns the Y coordinate of this gesture.
Type:
- Source:
enabled :Boolean
Indicates whether or not this gesture recognizer is enabled. When false, this gesture recognizer will
ignore any events dispatched by its target.
Type:
- Default Value:
- Source:
(readonly) gestureCallbacks :Array.<function()>
The list of functions to call when this gesture is recognized. The functions have a single argument:
this gesture recognizer, e.g., gestureCallback(recognizer)
. Applications may
add functions to this array or remove them.
Type:
- Source:
Indicates the currently pressed mouse buttons as a bitmask. A value of 0 indicates that no buttons are
pressed. A nonzero value indicates that one or more buttons are pressed as follows: bit 1 indicates the
primary button, bit 2 indicates the the auxiliary button, bit 3 indicates the secondary button.
Type:
- Source:
state :String
Indicates this gesture's current state. Possible values are WorldWind.POSSIBLE, WorldWind.FAILED,
WorldWind.RECOGNIZED, WorldWind.BEGAN, WorldWind.CHANGED, WorldWind.CANCELLED and WorldWind.ENDED.
Type:
- Default Value:
- Source:
(readonly) target :EventTarget
Indicates the document element this gesture recognizer observes for UI events.
Type:
- Source:
(readonly) touchCount :Number
Indicates the number of active touches.
Type:
- Source:
translationX :Number
Indicates this gesture's translation along the X axis since the gesture started.
Type:
- Source:
translationY :Number
Indicates this gesture's translation along the Y axis since the gesture started.
Type:
- Source:
Methods
canRecognizeSimultaneouslyWith(recognizer) → {Boolean}
Parameters:
Name |
Type |
Description |
recognizer |
|
|
- Source:
Returns:
-
Type
-
Boolean
(protected) mouseDown(event)
Parameters:
Name |
Type |
Description |
event |
|
|
- Source:
(protected) mouseMove(event)
Parameters:
Name |
Type |
Description |
event |
|
|
- Source:
(protected) mouseUp(event)
Parameters:
Name |
Type |
Description |
event |
|
|
- Source:
(protected) prepareToRecognize()
- Source:
recognizeSimultaneouslyWith(recognizer)
Parameters:
Name |
Type |
Description |
recognizer |
|
|
- Source:
requiredToFailByRecognizer(recognizer) → {Boolean}
Parameters:
Name |
Type |
Description |
recognizer |
|
|
- Source:
Returns:
-
Type
-
Boolean
requireRecognizerToFail(recognizer)
Parameters:
Name |
Type |
Description |
recognizer |
|
|
- Source:
requiresRecognizerToFail(recognizer) → {Boolean}
Parameters:
Name |
Type |
Description |
recognizer |
|
|
- Source:
Returns:
-
Type
-
Boolean
(protected) reset()
- Source:
touch(index) → {Touch}
Parameters:
Name |
Type |
Description |
index |
|
|
- Source:
Throws:
-
If the index is out of range.
-
-
Type
-
ArgumentError
Returns:
-
Type
-
Touch
(protected) touchCancel(touch)
Parameters:
Name |
Type |
Description |
touch |
|
|
- Source:
(protected) touchEnd(touch)
Parameters:
Name |
Type |
Description |
touch |
|
|
- Source:
(protected) touchMove(touch)
Parameters:
Name |
Type |
Description |
touch |
|
|
- Source:
(protected) touchStart(touch)
Parameters:
Name |
Type |
Description |
touch |
|
|
- Source: