You do not normally need to create an instance of this tool because one already exists as the Diagram.toolManager, which you can modify.
The Tool.name of this tool is "ToolManager".
The constructor produces a ToolManager that manages no tools. Call initializeStandardTools to create various tools, initialize the tool properties such as draggingTool, and initialize the three mouse tool lists with those newly created tools.
Optionalinit: Partial<ToolManager>Gets or sets the mode-less ActionTool, normally one of the mouseDownTools.
You can disable this tool by setting its Tool.isEnabled property to false.
Gets or sets the mode-less ClickCreatingTool, normally one of the mouseUpTools.
You can disable this tool by setting its Tool.isEnabled property to false.
Gets or sets the mode-less ClickSelectingTool, normally one of the mouseUpTools.
You can disable this tool by setting its Tool.isEnabled property to false.
Gets or sets the mode-less ContextMenuTool, normally one of the mouseUpTools.
You can disable this tool by setting its Tool.isEnabled property to false.
Gets or sets the mode-less DraggingTool, normally one of the mouseMoveTools.
You can disable this tool by setting its Tool.isEnabled property to false.
Gets or sets the mode-less DragSelectingTool, normally one of the mouseMoveTools.
You can disable this tool by setting its Tool.isEnabled property to false.
Gets or sets the distance in view coordinates within which a mouse down-and-up is considered a click and beyond which a mouse movement is considered a drag. The default value is 2 pixels horizontally and vertically for mouse events, and increases by 6 pixels for touch events. This value is used by Tool.isBeyondDragSize.
Gets or sets the ToolManager's touch pinching behavior. Allowed values are GestureMode values. The default value is GestureMode.Zoom.
If you want to control whether a single finger touch movement causes a pan (i.e. scroll) of the diagram's contents or scrolls the page, consider either disabling the PanningTool by setting its property Tool.isEnabled to false or by setting PanningTool.bubbles to true.
Gets or sets the time between when the mouse stops moving and a hold event, in milliseconds. The default value is 850 milliseconds.
Gets or sets the time between when the mouse stops moving and a hover event, in milliseconds. This value affects the delay before GraphObject.toolTips are shown. The default value is 850 milliseconds.
Set toolTipDuration to control how long a tooltip will remain visible.
Gets or sets whether this tool is started and is actively doing something.
You can set this to true after your tool is started (i.e. when it is the Diagram.currentTool and doStart had been called), but when it is not yet in a state that it is actually "doing" something, because it is waiting for the right circumstances. This is typically only important when the tool is used in a modal fashion.
The default value is false. This is normally set by doActivate and doDeactivate.
Gets or sets whether this tool can be started by a mouse event.
Set this to false to prevent canStart from returning true. Setting this property to false should prevent this tool from being used in a mode-less fashion by the ToolManager with a mouse down/move/up event. However, even when this property is false, this tool can still be used in a modal fashion: it can still be started by explicitly setting the Diagram.currentTool property to this tool.
The default value is true.
Gets or sets the mode-less LinkingTool, normally one of the mouseMoveTools.
You can disable this tool by setting its Tool.isEnabled property to false.
Gets or sets the mode-less LinkReshapingTool, normally one of the mouseDownTools.
You can disable this tool by setting its Tool.isEnabled property to false.
ReadonlymouseThis read-only property returns the list of Tools that might be started upon a mouse or finger press event. When the ToolManager handles a mouse-down or touch-down event in doMouseDown, it searches this list in order, starting the first tool for which Tool.canStart returns true.
This list may be modified, but it must not be modified while any tool is handling events.
initializeStandardTools installs the following tools, in order:
ReadonlymouseThis read-only property returns the list of Tools that might be started upon a mouse or finger move event. When the ToolManager handles a mouse-move or touch-move event in doMouseMove, it searches this list in order, starting the first tool for which Tool.canStart returns true.
This list may be modified, but it must not be modified while any tool is handling events.
initializeStandardTools installs the following tools, in order:
ReadonlymouseThis read-only property returns the list of Tools that might be started upon a mouse or finger up event. When the ToolManager handles a mouse-up or touch-up event in doMouseUp, it searches this list in order, starting the first tool for which Tool.canStart returns true.
This list may be modified, but it must not be modified while any tool is handling events.
initializeStandardTools installs the following tools, in order:
Gets or sets the ToolManager's mouse wheel behavior. Allowed values are WheelMode values.
The default value is WheelMode.Scroll.
Gets or sets the name of this tool. The default name is an empty string, but the constructor for each instance of a subclass of Tool will initialize it appropriately. For example, the name of the DragSelectingTool is "DragSelecting".
This name is sometimes used by tools that use Adornments as the Part.category for their Adornments. It is also sometimes used by tools that conduct transactions as the transaction name.
Gets or sets the mode-less PanningTool, normally one of the mouseMoveTools.
You can disable this tool by setting its Tool.isEnabled property to false.
Gets or sets the mode-less RelinkingTool, normally one of the mouseDownTools.
You can disable this tool by setting its Tool.isEnabled property to false.
Gets or sets the mode-less ResizingTool, normally one of the mouseDownTools.
You can disable this tool by setting its Tool.isEnabled property to false.
Gets or sets the mode-less RotatingTool, normally one of the mouseDownTools.
You can disable this tool by setting its Tool.isEnabled property to false.
Gets or sets the mode-less TextEditingTool, normally one of the mouseUpTools.
You can disable this tool by setting its Tool.isEnabled property to false.
Gets or sets how long a tool tip is visible. The default value is 5000 milliseconds.
This is used by showToolTip to determine how long to wait before calling hideToolTip.
Set hoverDelay to control how long the mouse should stay stationary before it shows a tooltip.
Gets or sets the name of the transaction to be committed by stopTransaction
If null, the transaction will be rolled back.
If this is non-null at the time of a call to stopTransaction, it calls Diagram.commitTransaction with this transaction name; if this is null at that time, it calls Diagram.rollbackTransaction.
The default value is null; startTransaction will also set this to null. Because a value of null when stopTransaction is called will rollback the transaction, it is important that your code sets this property to a non-null value when it thinks it has succeeded.
This property exists so that no matter what execution path occurs to end the usage of a tool, any ongoing transaction can be properly committed or rolled-back. Many tools call startTransaction and stopTransaction; thus they set this property for their transaction to be committed. doCancel also sets this property to null.
VirtualcancelThis is called to cancel any running "WaitAfter" timer.
This is called when a tool is stopped.
This method is rarely overridden. Please read the Learn page on Extensions for how to override methods and how to call this base method.
VirtualcanThis predicate is used by the ToolManager to decide if this tool can be started mode-lessly by mouse and touch events. Implementations of this method can look at Diagram.lastInput to get the mouse event and input state.
By default this method returns isEnabled. This method may be overridden. Please read the Learn page on Extensions for how to override methods and how to call this base method.
true if isEnabled is true and if the Diagram.toolManager can make this tool the Diagram.currentTool and then call the doStart method.
VirtualcanThis method controls for some Tools whether canStart may return true depending on the button being used. Normally this returns true if InputEvent.left is true. This method may be overridden to consider other buttons, or to ignore which button by just returning true.
true, if the left mouse button is being held down
since4.0
VirtualcanAs of version 4, this predicate method is no longer called by the ToolManager. Most of the responsibility for pinch zooming has been moved to the PanningTool.
deprecatedVirtualdoThe Diagram calls this method after setting Diagram.currentTool, to make the new tool active. This should set isActive to true. Overrides of this method might call startTransaction, if this tool's activity involves modification of the model. Implementations of this method can look at Diagram.lastInput to get the mouse event and input state.
You should call this method only after setting Diagram.currentTool to the Tool that you want to activate.
By default this only sets isActive to true. This method may be overridden. Please read the Learn page on Extensions for how to override methods and how to call this base method.
If you override this method, it is commonplace to also override doDeactivate to clean up whatever you set up in this method.
VirtualdoThe diagram will call this method when the user wishes to cancel the current tool's operation. Typically this is called when the user hits the ESCAPE key. This should restore the original state of what was modified by this tool, and then it should call stopTool. This method is not responsible for cleaning up any side-effects that should be performed by doDeactivate and/or doStop, which will always be called whether the tool stops normally or abnormally.
By default this method just sets transactionResult to null and calls stopTool. You will want to override this method even in tools that call startTransaction and stopTransaction, because the UndoManager might not be enabled. This method may be overridden. Please read the Learn page on Extensions for how to override methods and how to call this base method.
VirtualdoThe Diagram calls this method on the old tool when Diagram.currentTool is set to a new tool. This needs to set isActive to false. Overrides of this method might call stopTransaction, if this tool's activity involves modification of the model.
You should have no reason to call this method, because it is automatically called by the Diagram.currentTool property setter on the old tool.
By default this only sets isActive to false. This method may be overridden. Please read the Learn page on Extensions for how to override methods and how to call this base method.
It is commonplace to override this method in order to clean up whatever you have set up in an override of doActivate.
Virtual OverridedoThis just calls CommandHandler.doKeyDown on the diagram's Diagram.commandHandler.
This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Learn page on Extensions for how to override methods and how to call this base method.
Virtual OverridedoThis just calls CommandHandler.doKeyUp on the diagram's Diagram.commandHandler.
This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Learn page on Extensions for how to override methods and how to call this base method.
Virtual OverridedoIterate over the mouseDownTools list and start the first tool for which its Tool.canStart predicate returns true.
Starting a tool replaces the Diagram.currentTool with the new tool. Successfully doing so also activates the new tool by calling Tool.doActivate and passes on the mouse-down event to it by calling Tool.doMouseDown.
Not finding any startable tools causes this tool manager to activate, thereby enabling the mouse-move and mouse-up behaviors and starts detection of a mouse-hold event after holdDelay milliseconds.
For touch events, the value of gestureBehavior affects whether this tool will find and start another tool.
This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Learn page on Extensions for how to override methods and how to call this base method.
VirtualdoImplement the standard behavior for mouse hover and mouse hold events, called by doWaitAfter when the mouse has not moved for a period of time.
If there has been no mouse down, the timer is set for hoverDelay milliseconds. If it executes, it calls any GraphObject.mouseHover function on the object at the mouse or on any of its containing panels, or it calls any Diagram.mouseHover function for a background mouse-hover event.
If there had been a mouse down, the timer is set for holdDelay milliseconds. If it executes, it calls any GraphObject.mouseHold function on the object at the mouse or on any of its containing panels, or it calls any Diagram.mouseHold function for a background mouse-held-down event.
This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Learn page on Extensions for how to override methods and how to call this base method.
Virtual OverridedoIterate over the mouseMoveTools list and start the first tool for which its Tool.canStart predicate returns true.
Starting a tool replaces the Diagram.currentTool with the new tool. Successfully doing so also activates the new tool by calling Tool.doActivate and passes on the mouse-move event to it by calling Tool.doMouseMove.
If no tool is found and activated, this:
For multi-touch events, the value of gestureBehavior affects whether this tool will find and start another tool.
This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Learn page on Extensions for how to override methods and how to call this base method.
Virtual OverridedoIterate over the mouseUpTools list and start the first tool for which its Tool.canStart predicate returns true.
Starting a tool replaces the Diagram.currentTool with the new tool. Successfully doing so also activates the new tool by calling Tool.doActivate and passes on the mouse-up event to it by calling Tool.doMouseUp.
If no startable tool is found it deactivates this tool manager, to get ready for a mouse-down and ignore mouse-move and mouse-up events.
This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Learn page on Extensions for how to override methods and how to call this base method.
Virtual OverridedoThe diagram will call this method as the mouse wheel is rotated.
By default this just calls Tool.standardMouseWheel. This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Learn page on Extensions for how to override methods and how to call this base method.
VirtualdoThe Diagram calls this method when this tool becomes the current tool; you should not call this method. Tool implementations should perform their per-use initialization here, such as setting up internal data structures, or capturing the mouse. Implementations of this method can look at Diagram.lastInput to get the mouse event and input state.
You should not call this method -- only the Diagram.currentTool property setter should call this method.
By default this method does nothing. This method may be overridden. Please read the Learn page on Extensions for how to override methods and how to call this base method.
If you override this method, it is commonplace to also override doStop to clean up whatever you set up in this method.
VirtualdoThe Diagram calls this method when this tool stops being the current tool; you should not call this method. Tool implementations should perform their per-use cleanup here, such as releasing mouse capture.
You should not call this method -- only the Diagram.currentTool property setter should call this method. If you want to stop a tool unexpectedly, you should call doCancel. If your implementation of a tool wants to stop itself, you should call stopTool.
By default this method does nothing. This method may be overridden. Please read the Learn page on Extensions for how to override methods and how to call this base method.
It is commonplace to override this method in order to clean up whatever you have set up in an override of doStart.
VirtualdoImplement the standard behavior for tooltips, called by doWaitAfter when the mouse has not moved for a period of time.
This looks for a GraphObject at the latest mouse point. If it finds an object, it checks for a GraphObject.toolTip. If it has none, this method searches up the visual tree for a containing Panel that does have a tooltip.
If it didn't find any object, this looks for a Diagram.toolTip.
If it eventually finds a tooltip, this calls showToolTip. Otherwise this calls hideToolTip.
This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Learn page on Extensions for how to override methods and how to call this base method.
Virtual OverridedoImplement the standard behavior for when the mouse has not moved for a period of time. This is due to an expired timer started by calling Tool.standardWaitAfter.
This calls doMouseHover and, if not mouse-down, doToolTip. Afterwards, if the event that called Tool.standardWaitAfter was a touch event, this simulates a right click, enabling context menu functionality and other actions on touch devices.
This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Learn page on Extensions for how to override methods and how to call this base method.
The event that caused standardWaitAfter. In this override, if it is a touch event and the Diagram.lastInput event is not handled (InputEvent.handled set to false), then this method will simulate a right click.
VirtualfindFind a mouse tool of a given name. This searches the mouseDownTools, mouseMoveTools, and mouseUpTools lists.
This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Learn page on Extensions for how to override methods and how to call this base method.
the type of tool, such as "Dragging" or "ClickSelecting".
a Tool whose Tool.name exactly matches the given name, or null if no such tool is found in any of the three lists.
VirtualfindThis convenience function finds the front-most GraphObject that is at a given point and that is an element of an Adornment that is of a given category. The tool handle must be an immediate element of the Adornment, not a GraphObject that is nested within Panels within the Adornment.
This method is very infrequently overridden. Please read the Learn page on Extensions for how to override methods and how to call this base method.
a Point in document coordinates.
the required Part.category of the Adornment.
VirtualhideHide any tooltip.
This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Learn page on Extensions for how to override methods and how to call this base method.
VirtualinitializeInitialize the three mouse tool lists with instances of the standard tools. This adds new instances of tools to the following three mouse tool lists: mouseDownTools, mouseMoveTools, or mouseUpTools. This also sets the various tool properties of this ToolManager to those newly created tools. Please read the Learn page on Extensions for how to override methods and how to call this base method.
this
VirtualisReturn true when the last mouse point is far enough away from the first mouse down point to constitute a drag operation instead of just a potential click.
This uses the value of ToolManager.dragSize. On touch devices the value is automatically increased to accommodate the unavoidable movement of fingers.
This method may be overridden. Please read the Learn page on Extensions for how to override methods and how to call this base method.
Optionalfirst: PointPoint in view coordinates, defaults to Diagram.firstInput's InputEvent.viewPoint.
Optionallast: PointPoint in view coordinates, defaults to Diagram.lastInput's InputEvent.viewPoint.
VirtualpositionThis is called by showToolTip to position the part within the viewport. It normally goes just below the cursor. But if the mouse is too close to the right edge or the bottom edge of the viewport, it is positioned left and/or above the cursor.
This method only operates if the tooltip, an Adornment, does not have a Adornment.placeholder. When there is a Placeholder in the tooltip, that Adornment is automatically positioned so that the Placeholder is positioned at the adorned object, the second argument to this method.
This method may be overridden. Please read the Learn page on Extensions for how to override methods and how to call this base method.
If you override this method to position the tooltip, the tooltip has already been measured but not arranged, so you can use its GraphObject.measuredBounds width and height but not its GraphObject.actualBounds.
The GraphObject getting the tooltip, or null if the tooltip is for the diagram background.
VirtualreplaceReplace a mouse tool of a given name with a new tool, or remove an existing tool (if the newtool is null). This searches the mouseDownTools, mouseMoveTools, and mouseUpTools lists. The new tool is inserted into the same list in which the same-named tool is found, at the same position as the old tool. However, if no existing tool with the given name is present, this does not add the new tool to any list, since it cannot know where it should be added. Please read the Learn page on Extensions for how to override methods and how to call this base method.
the type of tool, such as "Dragging" or "ClickSelecting".
If null, any tool that the search finds will just be removed from the list in which it was found.
the old tool that was replaced by the new one; this is null if none was found and the new tool was not added to any mouse tool list
VirtualshowShow a tooltip Adornment or HTMLInfo. This is called by doToolTip once that method has found a tooltip to display.
This calls positionToolTip to make it easier to customize how the tooltip is positioned relative to the object with the tooltip.
This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Learn page on Extensions for how to override methods and how to call this base method.
The GraphObject getting the tooltip; this is null if the tooltip is being shown for the diagram background.
VirtualstandardImplement the standard behavior for mouse clicks, searching for and calling click handler functions on GraphObjects or on Diagram, and raising the corresponding DiagramEvent.
A click on a GraphObject of the diagram will raise one of the following DiagramEvents: "ObjectSingleClicked", "ObjectDoubleClicked", or "ObjectContextClicked". This will also look at the corresponding click property: GraphObject.click, GraphObject.doubleClick, or GraphObject.contextClick. If the value is a function, this will call it, passing the current InputEvent and the GraphObject. If the value is null, it tries looking at the parent GraphObject.panel, and so on, walking up the visual tree until it finds the appropriate function to call. After calling the click function, if the value of InputEvent.handled is false, this method will continue walking up the visual tree looking for more click functions to call. Once it has looked at the top-level object (a Part) for a click function, this method stops.
A click in the background of the diagram will raise one of the following DiagramEvents: "BackgroundSingleClicked", "BackgroundDoubleClicked", or "BackgroundContextClicked". This will also look at the corresponding click property: Diagram.click, Diagram.doubleClick, or Diagram.contextClick. If the value is a function, this will call it, passing the current InputEvent.
This method is not responsible for selecting or deselecting any parts. Call standardMouseSelect for that functionality.
Note that this calls GraphObject.isEnabledObject on the target object; if it returns false, no click action will occur.
The ClickSelectingTool calls this method in its override of doMouseUp in order to raise "click" events. Note that by default GraphObjects in Layers that are Layer.isTemporary will not be "clicked". To change that behavior it is easiest to set GraphObject.isActionable to true on those objects for which you wish to handle "click" events. Then the ActionTool's doMouseUp override will raise the standard "click" events.
This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Learn page on Extensions for how to override methods and how to call this base method.
Optionalnavig: ((a: GraphObject) => T | null) | nullAn optional custom navigation function to find target objects. This argument is passed to Diagram.findObjectAt.
Optionalpred: ((a: T) => boolean) | nullAn optional custom predicate function to find target objects. A null value is effectively the same as a function that always returns true. This argument is passed to Diagram.findObjectAt, unless the value is undefined, which means to use a predicate to consider only objects in layers holding permanent objects.
true if InputEvent.handled had been set to true on the Diagram.lastInput.
VirtualstandardImplement the standard behavior for mouse enter, over, and leave events, where the mouse is moving but no button is pressed. This should be called by mouse move event handlers when wanting to detect and invoke mouse enter/over/leave event handlers.
The GraphObject.mouseEnter property provides a function to call when the mouse first enters an object or any of its contained objects (if the object is actually a Panel).
The GraphObject.mouseLeave property provides a function to call when the mouse leaves an object and all of its contained objects (if the object is actually a Panel).
The GraphObject.mouseOver property and Diagram.mouseOver properties provide functions to call when the mouse moves but stays within the same GraphObject or when the mouse moves in the background of the Diagram.
This method is also responsible for updating the Diagram.currentCursor according to the value of GraphObject.cursor and Diagram.defaultCursor.
This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Learn page on Extensions for how to override methods and how to call this base method.
VirtualstandardImplement the standard behavior for selecting parts with the mouse, depending on the control and shift modifier keys.
Control-clicking on a part will select it if it wasn't already, and will deselect if it had been selected. Shift-clicking on a part will add it to the selection (if it wasn't already). Otherwise, clicking on a part will select it (if it wasn't already).
Note that there are restrictions on selection. For example, a part cannot be selected in this manner if Part.selectable is false, or if Diagram.maxSelectionCount would be exceeded.
A left click in the background of the diagram with no modifier keys clears the selection.
This method does not implement any click event behavior -- that is implemented by standardMouseClick.
The ClickSelectingTool calls this method in its override of doMouseUp in order to change the selection.
This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Learn page on Extensions for how to override methods and how to call this base method.
VirtualstandardImplement the standard behavior for mouse wheel events. ToolManager.doMouseWheel calls this method.
Turning the mouse wheel if Diagram.allowVerticalScroll is true causes the diagram to scroll up or down. If InputEvent.shift and Diagram.allowHorizontalScroll are true, the diagram scrolls left or right.
If InputEvent.control and Diagram.allowZoom are true, turning the mouse wheel changes the diagram's scale, zooming in or out while trying to keep the point in the model at the same point as the mouse.
The value of ToolManager.mouseWheelBehavior affects what operations might occur upon mouse wheel events.
This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Learn page on Extensions for how to override methods and how to call this base method.
VirtualstandardAs of version 4, this method is no longer called by the ToolManager. Most of the responsibility for pinch zooming has been moved to the PanningTool.
deprecatedVirtualstandardAs of version 4, this method is no longer called by the ToolManager. Most of the responsibility for pinch zooming has been moved to the PanningTool.
deprecatedVirtualstandardThis is called to start a new timer to call doWaitAfter after a given delay. It first cancels any previously running "WaitAfter" timer, by calling cancelWaitAfter.
This is normally used to implement mouse hover and mouse hold events. If the mouse has moved, it must not have moved beyond the distance as determined by Tool.isBeyondDragSize for it be considered "stationary". So the regular ToolManager.doMouseMove implementation only calls this method when the mouse has moved beyond the drag size.
This method is rarely overridden. Please read the Learn page on Extensions for how to override methods and how to call this base method.
The delay, in milliseconds.
Optionalevent: InputEventAn optional event that caused this timer. Defaults to Diagram.lastInput. This gets passed on to doWaitAfter.
Call Diagram.startTransaction with the given transaction name. This always sets transactionResult to null.
This is normally called in an override of doActivate, if the tool modifies the model, along with a call to stopTransaction in an override of doDeactivate. Alternatively, you can surround a block of code that sets the transactionResult with calls to startTransaction and stopTransaction.
Optionaltname: stringa string describing the transaction.
the value of the call to Diagram.startTransaction.
VirtualstopIf the Diagram.currentTool is this tool, stop this tool and start the Diagram.defaultTool by making it be the new current tool. The implementation of various tool methods can call this method to stop the current tool. This will call doStop -- you should not call that method directly.
If you want to stop the current tool and have it restore the original state, call doCancel. Please read the Learn page on Extensions for how to override methods and how to call this base method.
VirtualstopIf transactionResult is null, call Diagram.rollbackTransaction, otherwise call Diagram.commitTransaction.
This is normally called in an override of doDeactivate,
if startTransaction was called in doActivate.
Alternatively, you can surround a block of code that sets the transactionResult
with calls to startTransaction and stopTransaction.
This method may be overridden. Please read the Learn page on Extensions for how to override methods and how to call this base method.
the result of the call to rollback or commit the transaction.
Static ReadonlyGesturedeprecatedSee GestureMode.Cancel.
Static ReadonlyGesturedeprecatedSee GestureMode.None.
Static ReadonlyGesturedeprecatedSee GestureMode.Zoom.
Static ReadonlyWheeldeprecatedSee WheelMode.None.
Static ReadonlyWheeldeprecatedSee WheelMode.Scroll.
Static ReadonlyWheeldeprecatedSee WheelMode.Zoom.
This special Tool is responsible for managing all of the Diagram's mode-less tools, which you can access as the Diagram.toolManager.
Mode-less tools are tools that are present in one of the following lists: mouseDownTools, mouseMoveTools, or mouseUpTools. This ToolManager tool is normally the Diagram.defaultTool, so it is also usually the Diagram.currentTool when the user is doing "nothing".
When this tool is running as the current tool, it handles mouse-down, mouse-move, and mouse-up events and the corresponding touch events. For each event it iterates over each of the tools in the corresponding list, calling the tool's Tool.canStart predicate. If that predicate returns true, it starts that tool by making it the diagram's current tool. It then activates the tool and passes on the event to the tool by calling the corresponding method (either Tool.doMouseDown, Tool.doMouseMove, or Tool.doMouseUp).
Because this tool is typically the one running as the diagram's current tool when the user isn't "doing" anything, this tool can also handle other events, such as mouse wheel events and keyboard commands.
Keyboard events are just passed on to the Diagram.commandHandler's CommandHandler.doKeyDown or CommandHandler.doKeyUp method.
This tool also is responsible for showing tooltips. Tooltip Adornments may be declared as any GraphObject.toolTip, or as the Diagram.toolTip if the mouse or finger remains motionless in the background of the diagram. You can set toolTipDuration to control how long the tooltip remains visible after being motionless.
This tool does not utilize any tool handles. This tool does not conduct any transactions. But of course some of the tools that the ToolManager starts can show tool handles and/or conduct their own transactions.