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 LayeredDigraphLayout that knows about "lanes" and that positions each node in its respective lane.
This assumes that each Node.data.lane property is a string that names the lane the node should be in. You can set the laneProperty property to use a different data property name. It is commonplace to set this property to be the same as the GraphLinksModel.nodeGroupKeyProperty, so that the one property indicates that a particular node data is a member of a particular group and thus that that group represents a lane.
The lanes can be sorted by specifying the laneComparer function.
The computed breadths (widths or heights depending on the direction) of each lane, in the form of a Map mapping lane names (strings) to numbers.
Gets or sets a function by which to compare lane names, for ordering the lanes within the laneNames Array. By default the function is null -- the lanes are not sorted.
Gets or sets an Array of lane names. If you set this before a layout happens, it will use those lanes in that order. Any additional lane names that it discovers will be added to the end of this Array.
This property is reset to an empty Array at the end of each layout. The default value is an empty Array.
The computed positions of each lane, in the form of a Map mapping lane names (strings) to numbers.
Gets or sets the name of the data property that holds the string which is the name of the lane that the node should be in. The default value is "lane".
Gets or sets the amount of additional space it allocates between the lanes. This number specifies the number of columns, with the same meaning as LayeredDigraphLayout.columnSpacing. The number unit is not in document coordinate or pixels. The default value is zero columns.
Return the minimum lane width, in columns
Given a vertex, get the lane (name) that its node belongs in. If the lane appears to be undefined, this returns the empty string. For dummy vertexes (with no node) this will return null.