UNPKG

gojs

Version:

Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams

164 lines 98.4 kB
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>LayeredDigraphLayout | GoJS API</title><meta name="description" content="Documentation for GoJS API"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../../assets/css/style.css"/><link rel="stylesheet" href="../assets/style-tsd.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><nav id="navTop" class="w-full z-30 top-0 text-white bg-nwoods-primary"><div class="w-full container max-w-screen-lg mx-auto flex flex-wrap sm:flex-nowrap items-center justify-between mt-0 py-2"><div class="md:pl-4"><a class="text-white hover:text-white no-underline hover:no-underline\n font-bold text-2xl lg:text-4xl rounded-lg hover:bg-nwoods-secondary" href="../../index.html"><h1 class="my-0 p-1 leading-none">GoJS</h1></a></div><button id="topnavButton" class="rounded-lg sm:hidden focus:outline-none focus:ring" aria-label="Navigation"><svg fill="currentColor" viewBox="0 0 20 20" class="w-6 h-6"><path id="topnavOpen" fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM9 15a1 1 0 011-1h6a1 1 0 110 2h-6a1 1 0 01-1-1z" clip-rule="evenodd"></path><path id="topnavClosed" class="hidden" fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></button><div id="topnavList" class="hidden sm:block items-center w-auto mt-0 text-white p-0 z-20"><ul class="list-reset list-none font-semibold flex justify-end flex-wrap sm:flex-nowrap items-center px-0 pb-0"><li class="p-1 sm:p-0"><a class="topnav-link" href="../../learn/index.html">Learn</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../samples/index.html">Samples</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../intro/index.html">Intro</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../api/index.html">API</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/products/register.html">Register</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../download.html">Download</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://forum.nwoods.com/c/gojs/11">Forum</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/contact.html" target="_blank" rel="noopener" id="contactBtn">Contact</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/sales/index.html" target="_blank" rel="noopener" id="buyBtn">Buy</a></li></ul></div></div><hr class="border-b border-gray-600 opacity-50 my-0 py-0"/></nav><div class="tsd-page-header"><div class="tsd-page-toolbar"><div class="w-full max-w-screen-xl mx-auto px-2"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">GoJS API</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited"/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div></div><div class="tsd-page-title"><div class="w-full max-w-screen-xl mx-auto px-2"><div class="top-copyright"><b>GoJS</b>&reg; Diagramming Components<br/>version 2.3.8<br/>by <a href="https://www.nwoods.com/">Northwoods Software®</a></div><div><h1>Class LayeredDigraphLayout </h1></div></div></div></header><div class="tsd w-full max-w-screen-xl mx-auto pb-4"><div class="row px-2 w-full"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><a href="Layout.html" class="tsd-signature-type" data-tsd-kind="Class">Layout</a><ul class="tsd-hierarchy"><li><span class="target">LayeredDigraphLayout</span><ul class="tsd-hierarchy"><li><a href="SwimLaneLayout.html" class="tsd-signature-type" data-tsd-kind="Class">SwimLaneLayout</a></li></ul></li></ul></li></ul></section><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"> <p>This arranges nodes of directed graphs into layers (rows or columns). There are many samples that use LayeredDigraphLayout.</p> <p class="boxrun"> If you want to experiment interactively with most of the properties, try the <a href="../../samples/ldLayout.html">Layered Digraph Layout</a> sample. See samples that make use of LayeredDigraphLayout in the <a href="../../samples/index.html#layereddigraphlayout">samples index</a>.<div><p>The <a href="LayeredDigraphLayout.html#layerSpacing">layerSpacing</a> property controls the distance between layers. The <a href="LayeredDigraphLayout.html#columnSpacing">columnSpacing</a> property controls the breadth of each &quot;column&quot; -- this affects the distance between nodes within a layer, although the exact distance also depends on the breadth of each node. The <a href="LayeredDigraphLayout.html#layeringOption">layeringOption</a> property determines whether nodes without links coming in or without links going out are lined up at the edge of the graph, or whether they are positioned close to their connected nodes.</p> <p>By default the layout will route the links in a manner that is consistent with the <a href="LayeredDigraphLayout.html#direction">direction</a>. So, for example, if the <a href="LayeredDigraphLayout.html#direction">direction</a> is 90 degrees (i.e. downward), the links are expected to go from the top towards the bottom. That means the links should come out from the bottom of the ports and should go into the top of the ports. Basically the layout will set <a href="Link.html#fromSpot">Link.fromSpot</a> to <code>Spot.Bottom</code> and <a href="Link.html#toSpot">Link.toSpot</a> to <code>Spot.Top</code>.</p> <p>If you want to the links to use the spots that are given by the ports or by the links themselves, you will need to set <a href="LayeredDigraphLayout.html#setsPortSpots">setsPortSpots</a> to false to prevent this layout from setting the spots on the links. For example, if each node only has one port that is the whole node, and if you want the links to be spread out along the sides of the nodes, then you should set <a href="LayeredDigraphLayout.html#setsPortSpots">setsPortSpots</a> to false and set the node&#39;s <a href="GraphObject.html#fromSpot">GraphObject.fromSpot</a> to <code>Spot.BottomSide</code> and <a href="GraphObject.html#toSpot">GraphObject.toSpot</a> to <code>Spot.TopSide</code>.</p> <p>This layout handles links that form cycles better than <a href="TreeLayout.html">TreeLayout</a> does. The normal routing behavior for &quot;backwards&quot; links is to route them &quot;around&quot; the source node and &quot;around&quot; the destination node, so that all links come in one side and go out the other side. However if you want &quot;backwards&quot; links to go more directly between nodes, set <a href="LayeredDigraphLayout.html#setsPortSpots">setsPortSpots</a> to false and the node&#39;s <a href="GraphObject.html#fromSpot">GraphObject.fromSpot</a> and <a href="GraphObject.html#toSpot">GraphObject.toSpot</a> both to <code>Spot.TopBottomSides</code>. (Of course if the <a href="LayeredDigraphLayout.html#direction">direction</a> is zero or 180, you&#39;ll want to use <code>Spot.LeftRightSides</code>.)</p> <p>If the diagram is structured in a tree-like fashion, it may be better to use <a href="TreeLayout.html">TreeLayout</a>, which has more options specific to trees. <a href="TreeLayout.html">TreeLayout</a> is much faster than LayeredDigraphLayout, and can handle a limited number of links that would prevent the graph structure from being a true tree (i.e. some nodes having multiple parents).</p> <p>This layout makes use of a <a href="LayoutNetwork.html">LayoutNetwork</a> of <a href="LayeredDigraphVertex.html">LayeredDigraphVertex</a>es and <a href="LayeredDigraphEdge.html">LayeredDigraphEdge</a>s that normally correspond to the <a href="Node.html">Node</a>s and <a href="Link.html">Link</a>s of the <a href="Diagram.html">Diagram</a>.</p> <p>The layout algorithm consists of four-major steps: Cycle Removal, Layer Assignment, Crossing Reduction, and Straightening and Packing. The layout cannot guarantee that it provides optimal positioning of nodes or routing of links.</p> <p>The Layer Assignment step can be slow if <a href="LayeredDigraphLayout.html#layeringOption">layeringOption</a> is <a href="LayeredDigraphLayout.html#static-LayerOptimalLinkLength">LayeredDigraphLayout.LayerOptimalLinkLength</a>, which is the default value.</p> <p>The CrossingReduction step is usually slow, but it can be avoided if you want to maintain a certain order within each layer by setting <a href="LayeredDigraphLayout.html#aggressiveOption">LayeredDigraphLayout.aggressiveOption</a> to <a href="LayeredDigraphLayout.html#static-AggressiveNone">LayeredDigraphLayout.AggressiveNone</a>.</p> <p>The Straightening and Packing step is usually slow, but you can set <a href="LayeredDigraphLayout.html#packOption">packOption</a> at the expense of less nicely placed nodes. Moreover, if you do not set this property, the layout will automatically remove the <a href="LayeredDigraphLayout.html#static-PackExpand">LayeredDigraphLayout.PackExpand</a> flag if the graph is large enough, in order to improve performance. It is also worth experimenting whether using <a href="LayeredDigraphLayout.html#alignOption">alignOption</a> to straighten and pack provides good results for your graphs, as it is faster than <a href="LayeredDigraphLayout.html#packOption">packOption</a>.</p> <p>If performance remains a problem, contact us.</p> </div></div></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="LayeredDigraphLayout.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LayeredDigraphLayout.html#aggressiveOption" class="tsd-kind-icon">aggressive<wbr/>Option</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LayeredDigraphLayout.html#alignOption" class="tsd-kind-icon">align<wbr/>Option</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LayeredDigraphLayout.html#columnSpacing" class="tsd-kind-icon">column<wbr/>Spacing</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LayeredDigraphLayout.html#cycleRemoveOption" class="tsd-kind-icon">cycle<wbr/>Remove<wbr/>Option</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LayeredDigraphLayout.html#direction" class="tsd-kind-icon">direction</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LayeredDigraphLayout.html#initializeOption" class="tsd-kind-icon">initialize<wbr/>Option</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LayeredDigraphLayout.html#iterations" class="tsd-kind-icon">iterations</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LayeredDigraphLayout.html#layerSpacing" class="tsd-kind-icon">layer<wbr/>Spacing</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LayeredDigraphLayout.html#layeringOption" class="tsd-kind-icon">layering<wbr/>Option</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="LayeredDigraphLayout.html#maxColumn" class="tsd-kind-icon">max<wbr/>Column</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="LayeredDigraphLayout.html#maxIndex" class="tsd-kind-icon">max<wbr/>Index</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="LayeredDigraphLayout.html#maxIndexLayer" class="tsd-kind-icon">max<wbr/>Index<wbr/>Layer</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="LayeredDigraphLayout.html#maxLayer" class="tsd-kind-icon">max<wbr/>Layer</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="LayeredDigraphLayout.html#minIndexLayer" class="tsd-kind-icon">min<wbr/>Index<wbr/>Layer</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LayeredDigraphLayout.html#packOption" class="tsd-kind-icon">pack<wbr/>Option</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LayeredDigraphLayout.html#setsPortSpots" class="tsd-kind-icon">sets<wbr/>Port<wbr/>Spots</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="LayeredDigraphLayout.html#assignLayers" class="tsd-kind-icon">assign<wbr/>Layers</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="LayeredDigraphLayout.html#commitLayers" class="tsd-kind-icon">commit<wbr/>Layers</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><a href="LayeredDigraphLayout.html#commitLayout" class="tsd-kind-icon">commit<wbr/>Layout</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="LayeredDigraphLayout.html#commitLinks" class="tsd-kind-icon">commit<wbr/>Links</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="LayeredDigraphLayout.html#commitNodes" class="tsd-kind-icon">commit<wbr/>Nodes</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="LayeredDigraphLayout.html#createNetwork" class="tsd-kind-icon">create<wbr/>Network</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="LayeredDigraphLayout.html#doLayout" class="tsd-kind-icon">do<wbr/>Layout</a></li></ul></section><section class="tsd-index-section "><h3>Constants</h3><ul class="tsd-index-list"><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-AggressiveLess" class="tsd-kind-icon">Aggressive<wbr/>Less</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-AggressiveMore" class="tsd-kind-icon">Aggressive<wbr/>More</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-AggressiveNone" class="tsd-kind-icon">Aggressive<wbr/>None</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-AlignAll" class="tsd-kind-icon">Align<wbr/>All</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-AlignLowerLeft" class="tsd-kind-icon">Align<wbr/>Lower<wbr/>Left</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-AlignLowerRight" class="tsd-kind-icon">Align<wbr/>Lower<wbr/>Right</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-AlignNone" class="tsd-kind-icon">Align<wbr/>None</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-AlignUpperLeft" class="tsd-kind-icon">Align<wbr/>Upper<wbr/>Left</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-AlignUpperRight" class="tsd-kind-icon">Align<wbr/>Upper<wbr/>Right</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-CycleDepthFirst" class="tsd-kind-icon">Cycle<wbr/>Depth<wbr/>First</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-CycleFromLayers" class="tsd-kind-icon">Cycle<wbr/>From<wbr/>Layers</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-CycleGreedy" class="tsd-kind-icon">Cycle<wbr/>Greedy</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-InitDepthFirstIn" class="tsd-kind-icon">Init<wbr/>Depth<wbr/>First<wbr/>In</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-InitDepthFirstOut" class="tsd-kind-icon">Init<wbr/>Depth<wbr/>First<wbr/>Out</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-InitNaive" class="tsd-kind-icon">Init<wbr/>Naive</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-LayerLongestPathSink" class="tsd-kind-icon">Layer<wbr/>Longest<wbr/>Path<wbr/>Sink</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-LayerLongestPathSource" class="tsd-kind-icon">Layer<wbr/>Longest<wbr/>Path<wbr/>Source</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-LayerOptimalLinkLength" class="tsd-kind-icon">Layer<wbr/>Optimal<wbr/>Link<wbr/>Length</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-PackAll" class="tsd-kind-icon">Pack<wbr/>All</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-PackExpand" class="tsd-kind-icon">Pack<wbr/>Expand</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-PackMedian" class="tsd-kind-icon">Pack<wbr/>Median</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-PackNone" class="tsd-kind-icon">Pack<wbr/>None</a></li><li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="LayeredDigraphLayout.html#static-PackStraighten" class="tsd-kind-icon">Pack<wbr/>Straighten</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-index-group tsd-is-inherited"><h2>Inherited Members</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section undefined"><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layout.html#arrangementOrigin" class="tsd-kind-icon">Layout.arrangement<wbr/>Origin</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layout.html#boundsComputation" class="tsd-kind-icon">Layout.bounds<wbr/>Computation</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layout.html#diagram" class="tsd-kind-icon">Layout.diagram</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layout.html#group" class="tsd-kind-icon">Layout.group</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layout.html#isInitial" class="tsd-kind-icon">Layout.is<wbr/>Initial</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layout.html#isOngoing" class="tsd-kind-icon">Layout.is<wbr/>Ongoing</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layout.html#isRealtime" class="tsd-kind-icon">Layout.is<wbr/>Realtime</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layout.html#isRouting" class="tsd-kind-icon">Layout.is<wbr/>Routing</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layout.html#isValidLayout" class="tsd-kind-icon">Layout.is<wbr/>Valid<wbr/>Layout</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layout.html#isViewportSized" class="tsd-kind-icon">Layout.is<wbr/>Viewport<wbr/>Sized</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layout.html#network" class="tsd-kind-icon">Layout.network</a></li></ul></section><section class="tsd-index-section undefined"><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="Layout.html#collectParts" class="tsd-kind-icon">Layout.collect<wbr/>Parts</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Layout.html#copy" class="tsd-kind-icon">Layout.copy</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Layout.html#getLayoutBounds" class="tsd-kind-icon">Layout.get<wbr/>Layout<wbr/>Bounds</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="Layout.html#initialOrigin" class="tsd-kind-icon">Layout.initial<wbr/>Origin</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Layout.html#invalidateLayout" class="tsd-kind-icon">Layout.invalidate<wbr/>Layout</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Layout.html#makeNetwork" class="tsd-kind-icon">Layout.make<wbr/>Network</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Layout.html#updateParts" class="tsd-kind-icon">Layout.update<wbr/>Parts</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> constructor<a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">new <wbr/>Layered<wbr/>Digraph<wbr/>Layout<span class="tsd-signature-symbol">(</span>init<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="LayeredDigraphLayout.html" class="tsd-signature-type" data-tsd-kind="Class">LayeredDigraphLayout</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="LayeredDigraphLayout.html" class="tsd-signature-type" data-tsd-kind="Class">LayeredDigraphLayout</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>Constructs a <a href="LayeredDigraphLayout.html">LayeredDigraphLayout</a> with no <a href="Layout.html#network">Layout.network</a> and with no owning <a href="Layout.html#diagram">Layout.diagram</a>.</p> </div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> init: <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="LayeredDigraphLayout.html" class="tsd-signature-type" data-tsd-kind="Class">LayeredDigraphLayout</a><span class="tsd-signature-symbol">&gt;</span></h5><div class="tsd-comment tsd-typography"> <p>Optional initialization properties.</p> </div></li></ul><h4 class="tsd-returns-title">Returns <a href="LayeredDigraphLayout.html" class="tsd-signature-type" data-tsd-kind="Class">LayeredDigraphLayout</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="aggressiveOption" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> aggressive<wbr/>Option<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">EnumValue</span><a href="#aggressiveOption" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>Gets or sets which aggressive option is being used to look for link crossings. The default value is <a href="LayeredDigraphLayout.html#static-AggressiveLess">LayeredDigraphLayout.AggressiveLess</a>. The fastest option is <a href="LayeredDigraphLayout.html#static-AggressiveNone">LayeredDigraphLayout.AggressiveNone</a>.</p> </div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="alignOption" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> align<wbr/>Option<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#alignOption" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>Gets or sets the options used by the straighten and pack function, as a potentially faster alternative to <a href="LayeredDigraphLayout.html#packOption">packOption</a>.</p> <div><p>When using this option, nodes are assigned coordinates within their layers to produce straighter paths of nodes and small edge lengths.</p> <p>When used as an alternative to <a href="LayeredDigraphLayout.html#packOption">packOption</a>, this tends to be faster, particularly for larger graphs. Larger graphs, however, will usually be less compact than when using packOption. If this option is set, packOption is ignored.</p> <p>This option does not use columns, but rather uses <a href="LayeredDigraphLayout.html#columnSpacing">columnSpacing</a> to space nodes within a layer.</p> <p>The value must be a combination of the following bit flags: <a href="LayeredDigraphLayout.html#static-AlignUpperLeft">LayeredDigraphLayout.AlignUpperLeft</a>, <a href="LayeredDigraphLayout.html#static-AlignUpperRight">LayeredDigraphLayout.AlignUpperRight</a>, <a href="LayeredDigraphLayout.html#static-AlignLowerLeft">LayeredDigraphLayout.AlignLowerLeft</a>, and <a href="LayeredDigraphLayout.html#static-AlignLowerRight">LayeredDigraphLayout.AlignLowerRight</a>.</p> <p>Using <a href="LayeredDigraphLayout.html#static-AlignAll">LayeredDigraphLayout.AlignAll</a> will tend to provide the most balanced results and is what we recommend starting with.</p> <p>The default value is <a href="LayeredDigraphLayout.html#static-AlignNone">LayeredDigraphLayout.AlignNone</a>, meaning <a href="LayeredDigraphLayout.html#packOption">packOption</a> is used. <a href="LayeredDigraphLayout.html#static-AlignAll">LayeredDigraphLayout.AlignAll</a> may become the default in a future major version.</p> </div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="LayeredDigraphLayout.html#packOption">packOption</a></p> </dd><dt class="">since</dt><dd><p>2.3</p> </dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="columnSpacing" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> column<wbr/>Spacing<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#columnSpacing" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>Gets or sets the size of each column. This value must be positive and it defaults to 25.</p> <div><p>When using <a href="LayeredDigraphLayout.html#alignOption">alignOption</a>, this will act as node spacing for nodes within a layer.</p> </div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="cycleRemoveOption" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> cycle<wbr/>Remove<wbr/>Option<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">EnumValue</span><a href="#cycleRemoveOption" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>Gets or set which cycle removal option is used. The value must be one of the following values: <a href="LayeredDigraphLayout.html#static-CycleDepthFirst">LayeredDigraphLayout.CycleDepthFirst</a>, <a href="LayeredDigraphLayout.html#static-CycleGreedy">LayeredDigraphLayout.CycleGreedy</a>, or <a href="LayeredDigraphLayout.html#static-CycleFromLayers">LayeredDigraphLayout.CycleFromLayers</a>. The default value is <a href="LayeredDigraphLayout.html#static-CycleDepthFirst">LayeredDigraphLayout.CycleDepthFirst</a>.</p> </div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="direction" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> direction<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#direction" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>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.</p> </div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="initializeOption" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> initialize<wbr/>Option<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">EnumValue</span><a href="#initializeOption" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>Gets or sets which indices initialization option is being used. The value must be one of the following values: <a href="LayeredDigraphLayout.html#static-InitDepthFirstOut">LayeredDigraphLayout.InitDepthFirstOut</a>, <a href="LayeredDigraphLayout.html#static-InitDepthFirstIn">LayeredDigraphLayout.InitDepthFirstIn</a>, or <a href="LayeredDigraphLayout.html#static-InitNaive">LayeredDigraphLayout.InitNaive</a>. The default value is <a href="LayeredDigraphLayout.html#static-InitDepthFirstOut">LayeredDigraphLayout.InitDepthFirstOut</a>.</p> </div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="iterations" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> iterations<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#iterations" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>Gets or sets the number of iterations to be done. The value must be non-negative. The default value is 4.</p> </div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="layerSpacing" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> layer<wbr/>Spacing<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#layerSpacing" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>Gets or sets the space between each layer. This value must be non-negative and it defaults to 25.</p> </div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="layeringOption" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> layering<wbr/>Option<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">EnumValue</span><a href="#layeringOption" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>Gets or sets which layering option is being used. The value must be one of the following values: <a href="LayeredDigraphLayout.html#static-LayerLongestPathSink">LayeredDigraphLayout.LayerLongestPathSink</a>, <a href="LayeredDigraphLayout.html#static-LayerLongestPathSource">LayeredDigraphLayout.LayerLongestPathSource</a>, or <a href="LayeredDigraphLayout.html#static-LayerOptimalLinkLength">LayeredDigraphLayout.LayerOptimalLinkLength</a>. The default value is <a href="LayeredDigraphLayout.html#static-LayerOptimalLinkLength">LayeredDigraphLayout.LayerOptimalLinkLength</a>, which is also the slowest option.</p> </div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"><a id="maxColumn" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagReadOnly">Read-only</span> max<wbr/>Column<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#maxColumn" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>This read-only property returns the largest column value.</p> </div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"><a id="maxIndex" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagReadOnly">Read-only</span> max<wbr/>Index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#maxIndex" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>This read-only property returns the largest index value.</p> </div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"><a id="maxIndexLayer" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagReadOnly">Read-only</span> max<wbr/>Index<wbr/>Layer<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#maxIndexLayer" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>This read-only property returns the larges index layer.</p> </div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"><a id="maxLayer" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagReadOnly">Read-only</span> max<wbr/>Layer<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#maxLayer" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>This read-only property returns the largest layer value.</p> </div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"><a id="minIndexLayer" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagReadOnly">Read-only</span> min<wbr/>Index<wbr/>Layer<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#minIndexLayer" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>This read-only property returns the smallest index layer.</p> </div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="packOption" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> pack<wbr/>Option<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#packOption" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>Gets or sets the options used by the straighten and pack function; this option is deprecated -- we recommend using <a href="LayeredDigraphLayout.html#alignOption">alignOption</a> instead for better alignment and speed.</p> <div><p>The value must be a combination of the following bit flags: <a href="LayeredDigraphLayout.html#static-PackMedian">LayeredDigraphLayout.PackMedian</a>, <a href="LayeredDigraphLayout.html#static-PackStraighten">LayeredDigraphLayout.PackStraighten</a>, and <a href="LayeredDigraphLayout.html#static-PackExpand">LayeredDigraphLayout.PackExpand</a>. The default value is <a href="LayeredDigraphLayout.html#static-PackAll">LayeredDigraphLayout.PackAll</a>, which is a combination of all three flags.</p> <p>Each of the flags has a cost; PackExpand is particularly slow. However if you do not set this property, this layout will automatically turn off the PackExpand option for you if the graph is large enough. You can set this property value to <a href="LayeredDigraphLayout.html#static-PackNone">LayeredDigraphLayout.PackNone</a> to avoid most of the work.</p> <p>This option is ignored if <a href="LayeredDigraphLayout.html#alignOption">alignOption</a> is set to a value other than <a href="LayeredDigraphLayout.html#static-AlignNone">LayeredDigraphLayout.AlignNone</a>. This tends to be slower than <a href="LayeredDigraphLayout.html#alignOption">alignOption</a>, particularly for larger graphs. Larger graphs, however, will usually be more compact than when using alignOption.</p> </div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="LayeredDigraphLayout.html#alignOption">alignOption</a></p> </dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="setsPortSpots" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> sets<wbr/>Port<wbr/>Spots<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#setsPortSpots" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>Gets or sets whether the FromSpot and ToSpot of each link should be set to values appropriate for the given value of <a href="LayeredDigraphLayout.html#direction">LayeredDigraphLayout.direction</a>. The default value is true.</p> <div><p>If you set this to false, the spot values of the links and port objects will be used. If you do not set the spot values to sensible values matching the <a href="LayeredDigraphLayout.html#direction">direction</a>, the routing results may be poor and they may cross over nodes.</p> </div></div></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a id="assignLayers" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagProtected">Protected</span> <span class="tsd-flag ts-flagVirtual">Virtual</span> assign<wbr/>Layers<a href="#assignLayers" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected"><li class="tsd-signature tsd-kind-icon">assign<wbr/>Layers<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>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 &quot;layer&quot; with <a href="Layer.html">Layer</a>s that control the Z-ordering of Parts.)</p> <div><p>The layering satisfies the following relationship: if L is a link from node U to node V, then U.layer &gt; V.layer.</p> <p>This method can be overridden to customize how nodes are assigned layers. Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method. By default, this does the appropriate assignments given the value of <a href="LayeredDigraphLayout.html#layeringOption">layeringOption</a>.</p> </div><dl class="tsd-comment-tags"><dt class="">since</dt><dd><p>1.1</p> </dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a id="commitLayers" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagProtected">Protected</span> <span class="tsd-flag ts-flagVirtual">Virtual</span> commit<wbr/>Layers<a href="#commitLayers" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected"><li class="tsd-signature tsd-kind-icon">commit<wbr/>Layers<span class="tsd-signature-symbol">(</span>layerRects<span class="tsd-signature-symbol">: </span><a href="Rect.html" class="tsd-signature-type" data-tsd-kind="Class">Rect</a><span class="tsd-signature-symbol">[]</span>, offset<span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type" data-tsd-kind="Class">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>This overridable method is called by <a href="LayeredDigraphLayout.html#commitLayout">commitLayout</a> to support custom arrangement of bands or labels across each layout layer. By default this method does nothing.</p> <div><p>The co