LinkingTool$Typings extension
- on
Properties
- archetypeLabelNodeData ↔ Object?
-
Available on LinkingTool, provided by the LinkingTool$Typings extension
Gets or sets an optional node data object representing a link label, that is copied by #insertLink and added to the GraphLinksModel when creating a new Link.getter/setter pair - archetypeLinkData ↔ Object?
-
Available on LinkingTool, provided by the LinkingTool$Typings extension
Gets or sets a data object that is copied by #insertLink and added to the GraphLinksModel when creating a new Link. The default value is an empty Object, which will be copied. The value must be an Object for the linking operation to succeed. A null value will cause #insertLink to fail.getter/setter pair - direction ↔ EnumValue
-
Available on LinkingTool, provided by the LinkingTool$Typings extension
Gets or sets the direction in which new links may be drawn. Possible values are LinkingTool.ForwardsOnly, LinkingTool.BackwardsOnly, or LinkingTool.Either. This defaults to LinkingTool.Either. Setting this property does not raise any events.getter/setter pair - startObject ↔ GraphObject?
-
Available on LinkingTool, provided by the LinkingTool$Typings extension
Gets or sets the GraphObject at which #findLinkablePort should start its search. The default value is null. Setting this property does not raise any events.getter/setter pair
Methods
-
canStart(
) → bool -
Available on LinkingTool, provided by the LinkingTool$Typings extension
This tool can run when the diagram allows linking, the model is modifiable, the left-button mouse drag has moved far enough away to not be a click, and when #findLinkablePort has returned a valid port or when #startObject is a valid port. -
doActivate(
) → void -
Available on LinkingTool, provided by the LinkingTool$Typings extension
Start the linking operation. -
doDeactivate(
) → void -
Available on LinkingTool, provided by the LinkingTool$Typings extension
Finishing the linking operation stops the transaction, releases the mouse, and resets the cursor. -
doMouseUp(
) → void -
Available on LinkingTool, provided by the LinkingTool$Typings extension
A mouse-up ends the linking operation; if there is a valid #targetPort nearby, this adds a new Link by calling #insertLink. -
doNoLink(
[Node? fromnode, GraphObject? fromport, Node? tonode, GraphObject? toport]) → void -
Available on LinkingTool, provided by the LinkingTool$Typings extension
This method is called upon a mouse up when no new link is drawn, either because no valid LinkingBaseTool#targetPort was found or because #insertLink returned null. -
findLinkablePort(
) → GraphObject? -
Available on LinkingTool, provided by the LinkingTool$Typings extension
Return the GraphObject at the mouse-down point, if it is part of a node and if it is valid to link with it. -
insertLink(
[Node? fromnode, GraphObject? fromport, Node? tonode, GraphObject? toport]) → Link? -
Available on LinkingTool, provided by the LinkingTool$Typings extension
Make a copy of the #archetypeLinkData, set its node and port properties, and add it to the GraphLinksModel. If the model is a TreeModel, set the parent key of the child's node data object.