LayeredDigraphLayout$Typings extension
Properties
-
aggressiveOption
↔ EnumValue
-
Gets or sets which aggressive option is being used to look for link crossings.
The default value is LayeredDigraphLayout.AggressiveLess.
The fastest option is LayeredDigraphLayout.AggressiveNone.
getter/setter pair
-
alignOption
↔ num
-
Gets or sets the options used by the straighten and pack function, as a potentially faster
alternative to #packOption.
getter/setter pair
-
columnSpacing
↔ num
-
Gets or sets the size of each column.
This value must be positive and it defaults to 25.
getter/setter pair
-
cycleRemoveOption
↔ EnumValue
-
Gets or set which cycle removal option is used.
The value must be one of the following values:
LayeredDigraphLayout.CycleDepthFirst,
LayeredDigraphLayout.CycleGreedy, or
LayeredDigraphLayout.CycleFromLayers.
The default value is LayeredDigraphLayout.CycleDepthFirst.
getter/setter pair
-
direction
↔ num
-
Gets or sets the direction the graph grows towards.
0 is towards the right, 90 is downwards, 180 is towards the left, and 270 is upwards.
The default value is 0.
getter/setter pair
-
initializeOption
↔ EnumValue
-
Gets or sets which indices initialization option is being used.
The value must be one of the following values:
LayeredDigraphLayout.InitDepthFirstOut,
LayeredDigraphLayout.InitDepthFirstIn, or
LayeredDigraphLayout.InitNaive.
The default value is LayeredDigraphLayout.InitDepthFirstOut.
getter/setter pair
-
iterations
↔ num
-
Gets or sets the number of iterations to be done.
The value must be non-negative. The default value is 4.
getter/setter pair
-
layeringOption
↔ EnumValue
-
Gets or sets which layering option is being used.
The value must be one of the following values:
LayeredDigraphLayout.LayerLongestPathSink,
LayeredDigraphLayout.LayerLongestPathSource, or
LayeredDigraphLayout.LayerOptimalLinkLength.
The default value is LayeredDigraphLayout.LayerOptimalLinkLength,
which is also the slowest option.
getter/setter pair
-
layerSpacing
↔ num
-
Gets or sets the space between each layer.
This value must be non-negative and it defaults to 25.
getter/setter pair
-
linkSpacing
↔ num
-
(undocumented)
Gets or sets the distance between link segments for unrelated links that would otherwise be overlapping.
The default value is 4. The value must be non-negative.
getter/setter pair
-
maxColumn
↔ num
-
This read-only property returns the largest column value.
getter/setter pair
-
maxIndex
↔ num
-
This read-only property returns the largest index value.
getter/setter pair
-
maxIndexLayer
↔ num
-
This read-only property returns the larges index layer.
getter/setter pair
-
maxLayer
↔ num
-
This read-only property returns the largest layer value.
getter/setter pair
-
minIndexLayer
↔ num
-
This read-only property returns the smallest index layer.
getter/setter pair
-
packOption
↔ num
-
Gets or sets the options used by the straighten and pack function;
this option is deprecated -- we recommend using #alignOption instead for better alignment and speed.
getter/setter pair
-
setsPortSpots
↔ bool
-
Gets or sets whether the FromSpot and ToSpot of each link should be set
to values appropriate for the given value of LayeredDigraphLayout#direction.
The default value is true.
getter/setter pair
Methods
-
assignLayers()
→ void
-
Assigns every vertex in the input network to a layer.
The layer is a non-negative integer describing which row of vertexes each vertex belongs in.
(Do not confuse this concept of "layer" with Layers that control the Z-ordering of Parts.)
-
commitLayers(Array<Rect> layerRects, Point offset)
→ void
-
This overridable method is called by #commitLayout
to support custom arrangement of bands or labels across each layout layer.
By default this method does nothing.
-
commitLayout()
→ void
-
Set the fromSpot and toSpot on each Link, position each Node according
to the vertex position, and then position/route the Links.
-
commitLinks()
→ void
-
Routes the links.
-
commitNodes()
→ void
-
Commit the position of all nodes.
-
createNetwork()
→ LayeredDigraphNetwork
-
Create a new LayoutNetwork of LayeredDigraphVertexes and LayeredDigraphEdges.
@expose
@return {LayeredDigraphNetwork} a new LayoutNetwork.
-
doLayout(Object coll)
→ void
-
Perform the layered digraph layout.
-
initializeIndices()
→ void
-
(undocumented)
Assigns every node in the input network an index number,
such that nodes in the same layer will be labeled with
consecutive indices in left to right order.
All consecutive layout operations will preserve or update
the indices.
-
linkMinLength(LayeredDigraphEdge edge)
→ num
-
(undocumented)
The function LinkMinLength returns the minimum length of the
link represented by the LayeredDigraphEdge link.
The default implementation gives links a minimum length of 1.
This function can be overridden to provide "fine-tuning" of the layout.
-
nodeMinColumnSpace(LayeredDigraphVertex v, bool topleft)
→ num
-
(undocumented)
The function nodeMinColumnSpace returns the minimum space
reserved to either side of this node.
-
nodeMinLayerSpace(LayeredDigraphVertex v, bool topleft)
→ num
-
(undocumented)
This function returns the minimum space reserved for this node from the center point
for the "depth" of the layer that it is in.
-
reduceCrossings()
→ void
-
(undocumented)
Reorders nodes within layers to reduce the total number of link
crossings in the network.
-
removeCycles()
→ void
-
(undocumented)
Removes cycles from the input network by reversing some number of links.
By default, this just calls #greedyCycleRemoval or #depthFirstCycleRemoval,
as appropriate, give the value of #cycleRemoveOption.
-
straightenAndPack()
→ void
-
(undocumented)
Adjusts the columns of nodes in the network to produce a layout which reduces
the number of bends and is tightly packed.