Class PanningTool

Extends Tool. The PanningTool supports manual panning, where the user can shift theDiagram.position by dragging the mouse.

This tool is a standard mouse-move tool, the ToolManager.panningTool.Although the ToolManager.dragSelectingTool takes precedence over this tool,the DragSelectingTool only starts if there is a delay after a mouse-down event.If it does not start, then this PanningTool gets a chance to start.

This tool does not utilize any Adornments or tool handles.This tool does not modify the model or conduct any transaction.

Constructor Summary Details

Name Description
PanningTool()

You do not normally need to create an instance of this toolbecause one already exists as the ToolManager.panningTool.More...

The Tool.name of this tool is "Panning".

Properties Summary Details

Name, Value Type Description
bubbles
{boolean}

Gets or sets whether panning actions will allowevents to bubble instead of panning in the diagram.More...

Set this to true to allow mobile devices to scroll the page with panning gestures on the diagram.Otherwise, the panning events will be captured and used to pan inside of the diagram.

The default value is false.

originalPosition
{Point} 1.1

This read-only property returns the Point that was the original value of Diagram.position when the panning operation started.

Properties borrowed from class Tool:
diagram, isActive, isEnabled, name, transactionResult

Method Summary Details

Name, Return Type Description
canStart()
{boolean}

This tool can run when the diagram allows scrolling andthe mouse has been dragged with the left button far enough awayfrom the mouse-down point to avoid being a click.More...

This method may be overridden.

Returns:
{boolean}
doActivate()

Capture the mouse, change the diagram cursor, and remember the Diagram.position.

doCancel()

Restore the Diagram.position to what it was when this tool activated.

doDeactivate()

Release the mouse and restore the default diagram cursor.

doMouseMove()

Modify the Diagram.position according to how much the mouse has moved.

doMouseUp()

Modify the Diagram.position according to how much the mouse has moved.

Methods borrowed from class Tool:
cancelWaitAfter, canStartMultiTouch, doKeyDown, doKeyUp, doMouseDown, doMouseWheel, doStart, doStop, doWaitAfter, findToolHandleAt, isBeyondDragSize, standardMouseClick, standardMouseOver, standardMouseSelect, standardMouseWheel, standardPinchZoomMove, standardPinchZoomStart, standardWaitAfter, startTransaction, stopTool, stopTransaction, updateAdornments