Constructor
new ClickRecognizer(target, callback)
Constructs a mouse click gesture recognizer.
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
Extends
Members
Type:
- Source:
clientX :Number
Indicates the X coordinate of this gesture.
Type:
- Overrides:
- Source:
clientY :Number
Returns the Y coordinate of this gesture.
Type:
- Overrides:
- 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:
- Inherited From:
- 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:
- Inherited From:
- 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:
- Inherited From:
- Source:
numberOfClicks :Number
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:
- Overrides:
- Default Value:
- Source:
(readonly) target :EventTarget
Indicates the document element this gesture recognizer observes for UI events.
Type:
- Inherited From:
- Source:
(readonly) touchCount :Number
Indicates the number of active touches.
Type:
- Inherited From:
- Source:
translationX :Number
Indicates this gesture's translation along the X axis since the gesture started.
Type:
- Inherited From:
- Source:
translationY :Number
Indicates this gesture's translation along the Y axis since the gesture started.
Type:
- Inherited From:
- Source:
Methods
canRecognizeSimultaneouslyWith(recognizer) → {Boolean}
Parameters:
Name |
Type |
Description |
recognizer |
|
|
- Inherited From:
- Source:
Returns:
-
Type
-
Boolean
(protected) mouseDown(event)
Parameters:
Name |
Type |
Description |
event |
|
|
- Overrides:
- Source:
(protected) mouseMove(event)
Parameters:
Name |
Type |
Description |
event |
|
|
- Overrides:
- Source:
(protected) mouseUp(event)
Parameters:
Name |
Type |
Description |
event |
|
|
- Overrides:
- Source:
(protected) prepareToRecognize()
- Inherited From:
- Source:
recognizeSimultaneouslyWith(recognizer)
Parameters:
Name |
Type |
Description |
recognizer |
|
|
- Inherited From:
- Source:
requiredToFailByRecognizer(recognizer) → {Boolean}
Parameters:
Name |
Type |
Description |
recognizer |
|
|
- Inherited From:
- Source:
Returns:
-
Type
-
Boolean
requireRecognizerToFail(recognizer)
Parameters:
Name |
Type |
Description |
recognizer |
|
|
- Inherited From:
- Source:
requiresRecognizerToFail(recognizer) → {Boolean}
Parameters:
Name |
Type |
Description |
recognizer |
|
|
- Inherited From:
- Source:
Returns:
-
Type
-
Boolean
(protected) reset()
- Overrides:
- Source:
touch(index) → {Touch}
Parameters:
Name |
Type |
Description |
index |
|
|
- Inherited From:
- Source:
Throws:
-
If the index is out of range.
-
-
Type
-
ArgumentError
Returns:
-
Type
-
Touch
(protected) touchCancel(touch)
Parameters:
Name |
Type |
Description |
touch |
|
|
- Inherited From:
- Source:
(protected) touchEnd(touch)
Parameters:
Name |
Type |
Description |
touch |
|
|
- Inherited From:
- Source:
(protected) touchMove(touch)
Parameters:
Name |
Type |
Description |
touch |
|
|
- Inherited From:
- Source:
(protected) touchStart(touch)
Parameters:
Name |
Type |
Description |
touch |
|
|
- Overrides:
- Source: