ClickCreatingTool$Typings extension

on

Properties

archetypeNodeData Object?

Available on ClickCreatingTool, provided by the ClickCreatingTool$Typings extension

Gets or sets a data object that will be copied and added to the diagram's model each time this tool executes. The default value is null. The value must be non-null for this tool to be able to run. Setting this property does not raise any events.
getter/setter pair
isDoubleClick bool

Available on ClickCreatingTool, provided by the ClickCreatingTool$Typings extension

Gets or sets whether a double click rather than a single-click is required to insert a new Part at the mouse-up point. The default value is true -- only a double-click will cause a node to be created. Setting this property does not raise any events.
getter/setter pair
isGridSnapEnabled bool

Available on ClickCreatingTool, provided by the ClickCreatingTool$Typings extension

Gets or sets whether the ClickCreatingTool snaps object sizes to the diagram's background grid during creation. By default this property is false. Setting this property does not raise any events.
getter/setter pair

Methods

canStart() bool

Available on ClickCreatingTool, provided by the ClickCreatingTool$Typings extension

This tool can run when the diagram is not read-only and supports creating new nodes, and when there has been a click (or double-click if #isDoubleClick is true) in the background of the diagram (not on a Part), and #archetypeNodeData is an object that can be copied and added to the model.
doMouseUp() → void

Available on ClickCreatingTool, provided by the ClickCreatingTool$Typings extension

Upon a click, call #insertPart and stop this tool.
insertPart(Point loc) Part?

Available on ClickCreatingTool, provided by the ClickCreatingTool$Typings extension

Create a node by adding a copy of the #archetypeNodeData object to the diagram's model, assign its Part#location to be the given point, and select the new part.