Gets or sets whether the subtree graph starting at this node is expanded.
Changing this property's value will call #collapseTree or #expandTree,
and also will call the value of #treeExpandedChanged if it is a function.
Gets or sets the function that is called after a Link has been connected with this Node.
It is typically used to modify the appearance of the node.
The first argument will be this Node.
The second argument will be a Link that is now connected with this node.
The third argument will be a GraphObject port indicating which port the link was connected with.
Gets or sets the function that is called after a Link has been disconnected from this Node.
It is typically used to modify the appearance of the node.
The first argument will be this Node.
The second argument will be a Link that had been connected with this node.
The third argument will be a GraphObject port indicating which port the link had been connected with.
This read-only property returns an iterator over all of the Links that are connected with this node.
This includes both links that are coming out of this node as well as links that are going into this node.
Setting Link#fromNode or Link#toNode to refer to this Node
will add that Link to this collection.
Gets or sets a predicate that determines whether or not a Link may be connected with this node.
If this is non-null, the predicate is called in addition to the predicate that is LinkingBaseTool#linkValidation
on the LinkingTool and RelinkingTool.
See LinkingBaseTool#isValidLink for more details.
This read-only property returns the primary GraphObject representing a port in this node.
If there is a GraphObject whose GraphObject#portId is the empty string, return it.
If there is no such element, just return this whole Node.
Gets or sets how link points are computed when the port spot is a "side" spot.
The value must be one of Node.SpreadingNone|SpreadingNone,
Node.SpreadingEvenly|SpreadingEvenly, Node.SpreadingPacked|SpreadingPacked.
The default value is Node.SpreadingEvenly.
Gets or sets whether the subtree graph starting at this node
had been collapsed by a call to #expandTree on the parent node.
The initial value is false.
Hide each child node and the connecting link,
and recursively collapse each child node.
This changes the value of Part#isVisible of the whole subtree and the parts owned by
those nodes and links.
However, this root node's visibility is unchanged.
Show each child node and the connecting link,
and perhaps recursively expand their child nodes.
This may change the value of Part#isVisible of the whole subtree and the parts owned by
those nodes and links.
However, this root node's visibility is unchanged.
Find the Node that is the perhaps indirect tree parent of both this node and another one,
or this node if it is an ancestor of the other node, or vice-versa.
Return a collection of Links that connect with this Node or any in its subtree, excluding any isTreeLink Links.
For trees this is the analog of Group#findExternalLinksConnected for Groups.
@return {Iterator.}
@since 2.2
Returns an iterator over all of the Links that go from this node to another node or vice-versa,
perhaps limited to a given port id on this node and a port id on the other node.
Returns an iterator over all of the Links that connect with this node in either direction,
perhaps limited to the given port id on this node.
@expose
@param {string|null=} pid A port identifier string; if null the link's portId is ignored and all links are included in the search.
@return {Iterator.}
Returns an iterator over all of the Links that go into this node,
perhaps limited to the given port id on this node.
@param {string|null=} pid A port identifier string; if null the link's portId is ignored and all links are included in the search.
@return {Iterator.}
Returns an iterator over all of the Links that come out of this node,
perhaps limited to the given port id on this node.
@param {string|null=} pid A port identifier string; if null the link's portId is ignored and all links are included in the search.
@return {Iterator.}
Returns an iterator over all of the Links that go from this node to another node,
perhaps limited to a given port id on this node and a port id on the other node.
Returns an iterator over the Nodes that are connected with this node
by links going into this node, perhaps limited to the given port id on this node.
@param {string|null=} pid A port identifier string; if null the link's portId is ignored and all links are included in the search.
@return {Iterator.
Returns an iterator over the Nodes that are connected with this node
by links coming out of this node, perhaps limited to the given port id on this node.
@param {string|null=} pid A port identifier string; if null the link's portId is ignored and all links are included in the search.
@return {Iterator.
Find a GraphObject with a given GraphObject#portId.
If no such GraphObject is found, search for one with the empty string as its port identifier.
Finally, when failing to find a port with either the given name or the empty string,
this method returns this whole node itself.
@param {string} pid
@return {GraphObject}
Returns an Iterator for the collection of Links that connect with the immediate tree children of this node.
Links for which Link#isTreeLink is false are ignored.
Returns an Iterator for the collection of Nodes that are the immediate tree children of this node.
Nodes only connected by links for which Link#isTreeLink is false are ignored.
Return how deep this node is in a tree structure.
For tree root nodes, this returns zero.
This calls #findTreeParentNode to find any tree parent node,
so this respects Diagram#isTreePathToChildren and Link#isTreeLink
to know which way to traverse links and to know to ignore non-tree links.
Returns the Link that connects with the tree parent Node of this node if the graph is tree-structured,
if there is such a link and Link#isTreeLink is true.
@return {Link} The Link to the parent Node, or null if there is no parent node.
@see #findTreeParentNode
@see #findTreeChildrenLinks
@see Diagram#isTreePathToChildren
@see #findTreeRoot
@see #findTreeParentChain
@since 1.1
Returns the Node that is the tree parent of this node if the graph is tree-structured, if there is a parent.
Links for which Link#isTreeLink is false are ignored.
@return {Node} The parent Node, or null if there is no parent node.
@see #findTreeParentLink
@see #findTreeChildrenNodes
@see Diagram#isTreePathToChildren
@see #findTreeRoot
@see #findTreeParentChain
@since 1.1
Return a collection of Parts including this Node,
all of the Links going to child Nodes, and all of their
tree child nodes and links.
Links for which Link#isTreeLink is false are ignored.
Starting with this node, walk up the chain of containingGroups to find a node that is visible.
This can be overridden to find a tree-parent/ancestor if the reason that this node
is not visible is because of a collapsed tree rather than a collapsed group.
@expose
@since 2.2
@return {Node}
Return the area to be avoided for this node -- the node's GraphObject#actualBounds
plus the Node#avoidableMargin.
@expose
@param {Rect} result a Rect to be modified and returned.
@return {Rect} the area in document coordinates.
@since 2.2
(undocumented)
This invalidates the routes of all links connected to this node.
Basically this calls Link#invalidateRoute on all connected links
and invalidates any cached side-connection information.
@param {Set.