collapseTree method
This command collapses all expanded selected Nodes. This operation is performed within a "Collapse Tree" transaction. Just before the end of the transaction this raises the "TreeCollapsed" DiagramEvent, with a collection of collapsed Nodes as the subject. This currently has no default keyboard shortcut.
This calls Node#collapseTree to perform the collapse, which will set Node#isTreeExpanded to false. You may want to save the collapsed/expanded state to the model by using a TwoWay Binding on the "isTreeExpanded" property of your Nodes, and perhaps also on the Node#wasTreeExpanded property.
This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Introduction page on Extensions for how to override methods and how to call this base method. @expose @param {Node=} node if supplied, ignore the selection and collapse this particular Node subtree. @see #canCollapseTree
Implementation
void collapseTree([_i3.Node? node]) {
_i4.callMethod(
this,
'collapseTree',
[node ?? _i5.undefined],
);
}