Class: RotationRecognizer

RotationRecognizer(target, callback)

A concrete gesture recognizer subclass that looks for two finger rotation gestures.

Constructor

new RotationRecognizer(target, callback)

Constructs a rotation 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

clientX :Number

Indicates the X coordinate of this gesture.
Type:
  • Number
Inherited From:
Source:

clientY :Number

Returns the Y coordinate of this gesture.
Type:
  • Number
Inherited From:
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:
  • Boolean
Inherited From:
Default Value:
  • true
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:
  • Array.<function()>
Inherited From:
Source:

(readonly) mouseButtonMask :Number

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:
  • Number
Inherited From:
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:
  • String
Overrides:
Default Value:
  • WorldWind.POSSIBLE
Source:

(readonly) target :EventTarget

Indicates the document element this gesture recognizer observes for UI events.
Type:
  • EventTarget
Inherited From:
Source:

(readonly) touchCount :Number

Indicates the number of active touches.
Type:
  • Number
Inherited From:
Source:

translationX :Number

Indicates this gesture's translation along the X axis since the gesture started.
Type:
  • Number
Inherited From:
Source:

translationY :Number

Indicates this gesture's translation along the Y axis since the gesture started.
Type:
  • Number
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
Inherited From:
Source:

(protected) mouseUp(event)

Parameters:
Name Type Description
event
Inherited From:
Source:

(protected) prepareToRecognize()

Overrides:
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
Overrides:
Source:

(protected) touchEnd(touch)

Parameters:
Name Type Description
touch
Overrides:
Source:

(protected) touchMove(touch)

Parameters:
Name Type Description
touch
Overrides:
Source:

(protected) touchStart(touch)

Parameters:
Name Type Description
touch
Overrides:
Source: