Class: Gesture

StockChartX. Gesture


new Gesture(config)

Represents abstract gesture.
Parameters:
Name Type Argument Description
config Object <optional>
The configuration object.
Properties
Name Type Argument Description
handler StockChartX.Gesture~GestureHandler <optional>
The function to handle gesture events.
hitTest StockChartX.Gesture~GestureHitTestHandler <optional>
The hit test function.
context Object <optional>
The execution context.
button Number <optional>
The button to be used in gesture.

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;
 }