|
|||||
| SUMMARY: FIELD | CONSTR | METHOD| EVENT | DETAIL: FIELD | CONSTR | METHOD| EVENT | ||||
An input mode that can be used to grab and drag the viewport of a GraphCanvas using touch or mouse gestures.
The minimum time span between consecutive view point changes in Bitmap Mode can be set using the delay property.
| Field Summary | |
|---|---|
Number |
delay
If the GraphCanvas is in Bitmap Mode, this property determines the minimum time span between consecutive
view point changes caused by touch- or mouse move events (in milliseconds).
While this influences the perceived smoothness of the move
viewport gesture, it reduces the amount of server requests for updated image tiles.
The default value is 30. |
| Constructor Summary | |
|---|---|
MoveViewportInputMode(/*yfiles.client.tiles.canvas.GraphCanvas*/ canvas)
An input mode that can be used to grab and drag the viewport of a GraphCanvas using touch or mouse gestures. |
|
| Method Summary | |
|---|---|
|
_finishDrag(/*Event*/ evtOrTouch)
Stops the view point drag gesture. |
|
_handleMouseMove(/*Event*/ evt)
Called when an onmousemove Event is dispatched by the root document containing the graph canvas. |
|
_handleMove(/*Object*/ evtOrTouch)
Handles a mouse- or touch move event. |
|
_handleMoveCore(/*Event*/ evtOrTouch)
Applies a touch- or mouse move gesture to the canvas viewport. |
|
_onMouseDown(/*Event*/ evt)
Called when an onMouseDown event has been dispatched by the graph canvas. |
|
_onMouseUp(/*Event*/ evt)
Called when an onmouseup event has been dispatched by the root document containing the graph canvas. |
|
_onPinchStart(/*Object*/ worldCoords1, /*Object*/ worldCoords2, /*Touch[]*/ pinchTouches)
Called when a onPinchStart event was dispatched by the graph canvas. |
|
_onTouchEnd(/*Touch*/ touch, /*Object*/ worldCoords)
Called when a onTouchEnd event was dispatched by the canvas. |
|
_onTouchLongPress(/*Touch*/ touch, /*Object*/ worldCoords)
Called when a _onTouchLongPress event was dispatched by the graph canvas. |
|
_onTouchStart(/*Touch*/ touch, /*Object*/ worldCoords)
Called when a onTouchStart event was dispatched by the canvas. |
|
_startDrag(/*Event*/ evtOrTouch)
Starts a view point drag gesture initiated by a mouse- or touch event. |
|
activate()
Calls the super implementation. |
|
deactivate()
Cancels dragging and call the super implementation. |
Boolean |
isDragging()
Returns whether mouse/touch move events will currently trigger view point movements. |
| Field Detail |
|---|
/*Number*/ delay
GraphCanvas is in Bitmap Mode, this property determines the minimum time span between consecutive
view point changes caused by touch- or mouse move events (in milliseconds).
While this influences the perceived smoothness of the move
viewport gesture, it reduces the amount of server requests for updated image tiles.
The default value is 30.
| Constructor Detail |
|---|
MoveViewportInputMode(/*yfiles.client.tiles.canvas.GraphCanvas*/ canvas)
GraphCanvas using touch or mouse gestures.delay property.
canvas - The canvas whose view point should be moved by this input mode.
| Method Detail |
|---|
_finishDrag(/*Event*/ evtOrTouch)
GraphCanvas.fixed property.evtOrTouch - The touch instance or mouse event that ended the drag gesture.
_handleMouseMove(/*Event*/ evt)
onmousemove Event is dispatched by the root document containing the graph canvas._handleMove, if the user agent does not
report an iPhone, iPod, or iPad device.evt - The mouse event
_handleMove(/*Object*/ evtOrTouch)
_handleMoveCore, after taking the delay property into account.evtOrTouch - The touch instance or mouse event that specifies the coordinates of the move event.
_handleMoveCore(/*Event*/ evtOrTouch)
viewportLimiter is used to limit the resulting viewport.evtOrTouch - The touch instance or mouse event that specifies the coordinates of the move event.
_onMouseDown(/*Event*/ evt)
onMouseDown event has been dispatched by the graph canvas.evt - The mouse event
_onMouseUp(/*Event*/ evt)
onmouseup event has been dispatched by the root document containing the graph canvas.evt - The mouse event.
_onPinchStart(/*Object*/ worldCoords1, /*Object*/ worldCoords2, /*Touch[]*/ pinchTouches)
onPinchStart event was dispatched by the graph canvas._onPinchStart 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.
_onTouchEnd(/*Touch*/ touch, /*Object*/ worldCoords)
onTouchEnd event was dispatched by the canvas._onTouchEnd is called on the parent input mode.touch - The touch instance of the touch event that has just ended.
worldCoords - The world coordinates of the touch event.
_onTouchLongPress(/*Touch*/ touch, /*Object*/ worldCoords)
_onTouchLongPress event was dispatched by the graph canvas._onTouchLongPress is called on the parent input mode.touch - The touch instance of the touch event that has just started
worldCoords - The world coordinates of the touch event.
_onTouchStart(/*Touch*/ touch, /*Object*/ worldCoords)
onTouchStart event was dispatched by the canvas.touch - The touch instance of the touch event that has just started
worldCoords - The world coordinates of the touch event.
_startDrag(/*Event*/ evtOrTouch)
GraphCanvas.fixed property.evtOrTouch - The touch instance or mouse event that started the drag gesture.
activate()
deactivate()
Boolean isDragging()