new Gesture(config)
Represents abstract gesture.
Parameters:
Name | Type | Argument | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object |
<optional> |
The configuration object.
Properties
|
Members
-
button :number
-
The mouse button that needs to be used in gesture.
Type:
- number
-
context :Object
-
The execution context.
Type:
- Object
-
handler :StockChartX.Gesture~GestureHandler
-
Gesture event handler
Type:
-
hitTest :StockChartX.Gesture~GestureHitTestHandler
-
Hit test function.
Type:
-
<readonly> state :number
-
Current gesture state.
Type:
- number
Methods
-
handleEvent(event)
-
Handles event.
Parameters:
Name Type Description event
StockChartX.WindowEvent The event object. Returns:
True if event was handled, false otherwise.- Type
- boolean
-
isActive()
-
Checks if gesture is active (in STARTED or CONTINUED state).
Returns:
- Type
- boolean
Type Definitions
-
GestureHandler(gesture, event)
-
The gesture handler function.
Parameters:
Name Type Description gesture
StockChartX.Gesture The gesture. event
StockChartX.WindowEvent The current event. Example
var handler = function(gesture, event) {};
-
GestureHitTestHandler(position)
-
The gesture hit test function.
Parameters:
Name Type Description position
StockChartX.Point The pointer position. Returns:
The flag that indicates whether gesture should be processed.- Type
- boolean
Example
var hitTest = function(position) { return true; }