ClickCreatingTool$Typings extension
Properties
-
archetypeNodeData
↔ Object?
-
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
-
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
-
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
-
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
-
Upon a click, call #insertPart and stop this tool.
-
insertPart(Point loc)
→ Part?
-
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.