ToolManager class
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.
- Implemented types
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- ToolManager()
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- gestureCancel ↔ EnumValue
-
This value for #gestureBehavior indicates that the pointer/touch pinch gestures
on the canvas intend to have no effect on the Diagram, but also no effect on the page.
getter/setter pair
- gestureNone ↔ EnumValue
-
This value for #gestureBehavior indicates that the pointer/touch pinch gestures
on the canvas intend to have no effect on the Diagram, but will not be prevented,
and may bubble up the page to have other effects (such as zooming the page).
getter/setter pair
- gestureZoom ↔ EnumValue
-
This value for #gestureBehavior indicates that the pointer/touch pinch gestures
on the canvas intend to zoom the Diagram.
getter/setter pair
- wheelNone ↔ EnumValue
-
This value for #mouseWheelBehavior indicates that the mouse wheel events are ignored,
although scrolling or zooming by other means may still be allowed.
getter/setter pair
- wheelScroll ↔ EnumValue
-
This default value for #mouseWheelBehavior indicates that mouse wheel events scroll the diagram.
getter/setter pair
- wheelZoom ↔ EnumValue
-
This value for #mouseWheelBehavior indicates that the mouse wheel events change the scale of the diagram.
getter/setter pair