This is an extension and not part of the main GoJS library.
Note that the API for this class may change at any time.
If you intend to use an extension in production, you should copy the code to your own source directory.
Extensions can be found in the GoJS kit under the
See the Extensions intro page for more information.
A custom TreeLayout that can be used for laying out stylized flowcharts. Each layout requires a single "Split" node and a single "Merge" node. The "Split" node should be the root of a tree-like structure if one excludes links to the "Merge" node. This will position the "Merge" node to line up with the "Split" node.
You can set all of the TreeLayout properties that you like, except that for simplicity this code just works for angle === 0 or angle === 90.
If you want to experiment with this extension, try the Parallel Layout sample.
This read-only property returns the node that the tree will converge at.
This read-only property returns the node that the tree will extend from.
Return an Array holding the Split node and the Merge node for this layout. This signals an error if there is not exactly one Node that isSplit and exactly one Node that isMerge. This can be overridden; any override must set splitNode and mergeNode.
Overridable predicate for deciding if a Node is a conditional or "If" type of Split Node expecting to have two links coming out of the sides.
Overridable predicate for deciding if a Node is a "Switch" type of Split Node expecting to have three links coming out of the bottom/right side.