|
|||||
| SUMMARY: FIELD | CONSTR | METHOD| EVENT | DETAIL: FIELD | CONSTR | METHOD| EVENT | ||||
This input mode adds navigation support to a graph canvas. It enables panning and zooming through mouse and touch interaction.
The MoveViewportInputMode and PinchInputMode are used as child modes
in order to provide panning and zooming functionality.
| Field Summary | |
|---|---|
Object |
moveViewportMode
The input mode used as a child mode to enable touch-based panning. |
Object |
pinchMode
The input mode used as a child mode to enable zoom-to-point functionality through pinch gestures. |
| Constructor Summary | |
|---|---|
NavigationInputMode(/*GraphCanvas*/ canvas)
This input mode adds navigation support to a graph canvas. It enables panning and zooming through mouse and touch interaction. |
|
| Method Summary | |
|---|---|
|
_onPinchEnd(/*Object*/ worldCoords1, /*Object*/ worldCoords2, /*Touch[]*/ pinchTouches)
Called when a pinch gesture has ended. |
|
_onPinchStart(/*Object*/ worldCoords1, /*Object*/ worldCoords2, /*Touch[]*/ pinchTouches)
Called when a pinch gesture has started. |
|
_onTouchEnd(/*Touch*/ touch, /*Object*/ worldCoords)
Called when a touch gesture has ended. |
|
_onTouchLongPress(/*Touch*/ touch, /*Object*/ worldCoords)
Called when a long press gesture occurred. |
|
_onTouchStart(/*Touch*/ touch, /*Object*/ worldCoords)
Called when a touch gesture has started. |
|
activate()
Activates this input mode. |
MoveViewportInputMode |
createMoveViewportInputMode()
Creates the MoveViewportInputMode that is used as a child input mode to enable viewport movement. |
PinchInputMode |
createPinchInputMode()
Creates the PinchInputMode that is used as a child input mode to enable zoom functionality. |
|
deactivate()
Deactivates this input mode. |
| Field Detail |
|---|
/*Object*/ moveViewportMode
/*Object*/ pinchMode
| Constructor Detail |
|---|
NavigationInputMode(/*GraphCanvas*/ canvas)
MoveViewportInputMode and PinchInputMode are used as child modes
in order to provide panning and zooming functionality.
canvas -
| Method Detail |
|---|
_onPinchEnd(/*Object*/ worldCoords1, /*Object*/ worldCoords2, /*Touch[]*/ pinchTouches)
_onPinchEnd is called
on the parent input mode.worldCoords1 - An object with x and y properties specifying the world coordinates of the first touch of the pinch gesture.
worldCoords2 - An object with x and y properties specifying the world coordinates of the second touch of the pinch gesture.
pinchTouches - An array containing the two touches of the pinch gesture.
_onPinchStart(/*Object*/ worldCoords1, /*Object*/ worldCoords2, /*Touch[]*/ pinchTouches)
worldCoords1 - An object with x and y properties specifying the world coordinates of the first touch of the pinch gesture.
worldCoords2 - An object with x and y properties specifying the world coordinates of the second touch of the pinch gesture.
pinchTouches - An array containing the two touches of the pinch gesture.
_onTouchEnd(/*Touch*/ touch, /*Object*/ worldCoords)
touch - The touch that ended
worldCoords - An object with x and y properties specifying the world coordinates of the touch.
_onTouchLongPress(/*Touch*/ touch, /*Object*/ worldCoords)
onTouchLongPress is called
on the parent input mode.touch - The touch that was "long pressed"
worldCoords - An object with x and y properties specifying the world coordinates of the touch.
_onTouchStart(/*Touch*/ touch, /*Object*/ worldCoords)
MoveViewportInputMode.touch - The touch that started
worldCoords - An object with x and y properties specifying the world coordinates of the touch.
activate()
MoveViewportInputMode createMoveViewportInputMode()
MoveViewportInputMode that is used as a child input mode to enable viewport movement.PinchInputMode createPinchInputMode()
PinchInputMode that is used as a child input mode to enable zoom functionality.deactivate()