create-gojs-kit
Version:
A CLI for downloading GoJS samples, extensions, and docs
333 lines • 94 kB
HTML
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><link rel="stylesheet" href="../../assets/css/style.css"/><link rel="preconnect" href="https://rsms.me/"/><link rel="stylesheet" href="https://rsms.me/inter/inter.css"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ForceDirectedLayout | 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/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script type="text/javascript">// formerly in api.js
var hash = null;
function changeHash() {
var panels = document.getElementsByClassName("tsd-panel");
for (let i = 0; i < panels.length; i++) {
var p = panels[i];
p.classList.remove("targeted");
}
hash = window.location.hash.slice(1);
if (hash) {
var elt = document.getElementById(hash);
if (elt) elt.parentNode.classList.add("targeted");
}
}
document.addEventListener("DOMContentLoaded", changeHash);
window.addEventListener("hashchange", changeHash);</script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header><nav id="navTop" class="w-full h-[var(--topnav-h)] z-30 bg-[var(--color-background-secondary)] border-b border-b-[var(--color-accent)]"><div class="max-w-screen-xl mx-auto flex flex-wrap items-start justify-between px-4"><a class="!text-white bg-nwoods-primary font-bold !leading-[calc(var(--topnav-h)_-_1px)] my-0 px-2 text-4xl lg:text-5xl logo" href="../../index.html">GoJS</a><div class="relative"><button id="topnavButton" class="h-[calc(var(--topnav-h)_-_1px)] px-2 m-0 text-[var(--color-text)] bg-inherit shadow-none md:hidden hover:!bg-inherit hover:!text-nwoods-accent hover:!shadow-none" aria-label="Navigation"><svg class="h-7 w-7 block" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div id="topnavList" class="hidden md:block"><div class="absolute right-0 z-30 flex flex-col items-end rounded border border-[var(--color-accent)] p-4 pl-12 shadow bg-[var(--color-background-secondary)] text-[var(--color-text)] font-semibold
md:flex-row md:space-x-4 md:items-start md:border-0 md:p-0 md:shadow-none md:!bg-inherit"><a href="../../learn/index.html">Learn</a><a href="../../samples/index.html">Samples</a><a href="../../intro/index.html">Intro</a><a class="active" href="../../api/index.html">API</a><a href="../../download.html">Download</a><a href="https://forum.nwoods.com/c/gojs/11" target="_blank" rel="noopener">Forum</a><a href="https://nwoods.com/contact.html" target="_blank" rel="noopener" id="contactBtn">Contact</a><a href="https://nwoods.com/sales/index.html" target="_blank" rel="noopener" id="buyBtn">Buy</a></div></div></div></div></nav><script>window.addEventListener("DOMContentLoaded", function () {
// topnav
var topButton = document.getElementById("topnavButton");
var topnavList = document.getElementById("topnavList");
if (topButton && topnavList) {
topButton.addEventListener("click", function (e) {
topnavList
.classList
.toggle("hidden");
e.stopPropagation();
});
document.addEventListener("click", function (e) {
// if the clicked element isn't the list, close the list
if (!topnavList.classList.contains("hidden") && !e.target.closest("#topnavList")) {
topButton.click();
}
});
// set active <a> element
// done via active tag below, always API
}
});</script><div class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><div id="tsd-search-help"><code class="!text-lg">/</code> to search</div><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></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"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><div class="flex w-full max-w-screen-xl mx-auto px-2 items-center justify-between"><div><ul class="tsd-breadcrumb"><li><a href="../index.html">GoJS API</a></li><li><a href="ForceDirectedLayout.html">ForceDirectedLayout</a></li></ul><h1 class="flex items-center">Class ForceDirectedLayout</h1></div><div class="text-xs"><b>GoJS</b>® Diagramming Components<br/>version 3.1.0<br/>by <a href="https://nwoods.com/">Northwoods Software®</a></div></div></div><section class="tsd-panel tsd-hierarchy"><h4>Hierarchy (<a class="link" href="../hierarchy.html#ForceDirectedLayout">view full</a>)</h4><ul class="tsd-hierarchy"><li><a href="Layout.html" class="tsd-signature-type tsd-kind-class">Layout</a><ul class="tsd-hierarchy"><li><span class="target">ForceDirectedLayout</span></li></ul></li></ul></section><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Force-directed layout treats the graph as if it were a system of physical bodies
with repulsive electrical, attractional gravitational, and spring forces acting on them and between them.</p>
<p>Electrical forces come both from the field at the vertex's location as well as from neighboring vertexes and are quadratic by distance.
Gravitational forces come from the field at the vertex's location and are constant.
Spring forces are only exerted between two different vertexes that are connected by an edge and are linear by distance.</p>
<p>The electrical forces on a vertex are the sum of the electrical charge times the electrical field at that location
(<a href="ForceDirectedLayout.html#electricalCharge" class="tsd-kind-method">electricalCharge</a>, <a href="ForceDirectedLayout.html#electricalFieldX" class="tsd-kind-method">electricalFieldX</a>, <a href="ForceDirectedLayout.html#electricalFieldY" class="tsd-kind-method">electricalFieldY</a>)
and the electrical forces of all nearby vertexes divided by the square of the distance between them.
You can easily assign the electrical charge for all vertexes by assigning <a href="ForceDirectedLayout.html#defaultElectricalCharge" class="tsd-kind-accessor">defaultElectricalCharge</a>.
By default there is no electrical field, so all forces are due to nearby charged vertexes.
For efficiency, <a href="ForceDirectedLayout.html#infinityDistance" class="tsd-kind-accessor">infinityDistance</a> determines a cut-off distance between vertexes for which to consider any influence.</p>
<p>The gravitational forces on a vertex are the sum of the gravitational mass times the gravitational field at that location
(<a href="ForceDirectedLayout.html#gravitationalMass" class="tsd-kind-method">gravitationalMass</a>, <a href="ForceDirectedLayout.html#gravitationalFieldX" class="tsd-kind-method">gravitationalFieldX</a>, <a href="ForceDirectedLayout.html#gravitationalFieldY" class="tsd-kind-method">gravitationalFieldY</a>).
You can easily assign the gravitational mass for all vertexes by assigning <a href="ForceDirectedLayout.html#defaultGravitationalMass" class="tsd-kind-accessor">defaultGravitationalMass</a>.
By default there is no gravitational field.</p>
<p>The spring forces on a vertex are only exerted by the edges connecting it with other vertexes.
The force along an edge is the stiffness of the spring times the difference of the distance between the vertexes and the nominal length of the spring
(<a href="ForceDirectedLayout.html#springStiffness" class="tsd-kind-method">springStiffness</a>, <a href="ForceDirectedLayout.html#springLength" class="tsd-kind-method">springLength</a>) divided by the distance between the vertexes.
When the distance is less than the nominal length, the force pushes the vertexes apart; when the distance is greater, the force pulls them together.
You can easily assign the spring length and stiffness for all edges by assigning <a href="ForceDirectedLayout.html#defaultSpringLength" class="tsd-kind-accessor">defaultSpringLength</a> and <a href="ForceDirectedLayout.html#defaultSpringStiffness" class="tsd-kind-accessor">defaultSpringStiffness</a>.</p>
<p>When the distance between two vertexes is less than one unit, this uses a random number generator to decide which direction the forces should go.
For layouts that start with all of the vertexes at the same location, this results in potentially dramatically different results.
Set <a href="ForceDirectedLayout.html#randomNumberGenerator" class="tsd-kind-accessor">randomNumberGenerator</a> to null in order to produce reproducible results given the same initial vertex locations.</p>
<p>The algorithm seeks a configuration of the bodies with locally minimal energy,
i.e. vertex positions such that the sum of the forces on each vertex is zero.
This is achieved by repeatedly computing the forces on each vertex, moving them, and repeating.
Computations stop when no vertex moves more than <a href="ForceDirectedLayout.html#epsilonDistance" class="tsd-kind-accessor">epsilonDistance</a> or when <a href="ForceDirectedLayout.html#maxIterations" class="tsd-kind-accessor">maxIterations</a> have happened.</p>
<p>The layout cannot guarantee that it provides optimal positioning of nodes.
Nodes will normally not overlap each other, but when there is a dense interconnectivity overlaps might not be avoidable.</p>
<p class="boxrun">
If you want to experiment interactively with most of the properties, try the <a href="../../samples/fdLayout.html">Force Directed Layout</a> sample.
See samples that make use of ForceDirectedLayout in the <a href="../../samples/index.html#force-directed">samples index</a>.
</p>
<p>This layout makes use of a <a href="LayoutNetwork.html" class="tsd-kind-class">LayoutNetwork</a> of
<a href="ForceDirectedVertex.html" class="tsd-kind-class">ForceDirectedVertex</a>es and <a href="ForceDirectedEdge.html" class="tsd-kind-class">ForceDirectedEdge</a>s that normally
correspond to the <a href="Node.html" class="tsd-kind-class">Node</a>s and <a href="Link.html" class="tsd-kind-class">Link</a>s of the <a href="Diagram.html" class="tsd-kind-class">Diagram</a>.</p>
</div></section><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="true" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="ForceDirectedLayout.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Accessors</h3><div class="tsd-index-list"><a href="ForceDirectedLayout.html#arrangementSpacing" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>arrangement<wbr/>Spacing</span></a>
<a href="ForceDirectedLayout.html#arrangesToOrigin" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>arranges<wbr/>To<wbr/>Origin</span></a>
<a href="ForceDirectedLayout.html#comments" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>comments</span></a>
<a href="ForceDirectedLayout.html#currentIteration" class="tsd-index-link"><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><g id="subicon-R,#FF4D4D"><rect fill="var(--color-icon-background)" width="28" height="28" rx="14"></rect><path transform="translate(2, 2)" fill="none" stroke-width="1.5" stroke="var(--color-text)" d="M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z" stroke-linecap="round" stroke-linejoin="round"></path></g></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>current<wbr/>Iteration</span></a>
<a href="ForceDirectedLayout.html#defaultCommentElectricalCharge" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>default<wbr/>Comment<wbr/>Electrical<wbr/>Charge</span></a>
<a href="ForceDirectedLayout.html#defaultCommentSpringLength" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>default<wbr/>Comment<wbr/>Spring<wbr/>Length</span></a>
<a href="ForceDirectedLayout.html#defaultElectricalCharge" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>default<wbr/>Electrical<wbr/>Charge</span></a>
<a href="ForceDirectedLayout.html#defaultGravitationalMass" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>default<wbr/>Gravitational<wbr/>Mass</span></a>
<a href="ForceDirectedLayout.html#defaultSpringLength" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>default<wbr/>Spring<wbr/>Length</span></a>
<a href="ForceDirectedLayout.html#defaultSpringStiffness" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>default<wbr/>Spring<wbr/>Stiffness</span></a>
<a href="ForceDirectedLayout.html#epsilonDistance" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>epsilon<wbr/>Distance</span></a>
<a href="ForceDirectedLayout.html#infinityDistance" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>infinity<wbr/>Distance</span></a>
<a href="ForceDirectedLayout.html#maxIterations" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>max<wbr/>Iterations</span></a>
<a href="ForceDirectedLayout.html#maxPrelayoutIterations" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>max<wbr/>Prelayout<wbr/>Iterations</span></a>
<a href="ForceDirectedLayout.html#moveLimit" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>move<wbr/>Limit</span></a>
<a href="ForceDirectedLayout.html#prelayoutQuality" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>prelayout<wbr/>Quality</span></a>
<a href="ForceDirectedLayout.html#prelayoutSpread" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>prelayout<wbr/>Spread</span></a>
<a href="ForceDirectedLayout.html#randomNumberGenerator" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>random<wbr/>Number<wbr/>Generator</span></a>
<a href="ForceDirectedLayout.html#setsPortSpots" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>sets<wbr/>Port<wbr/>Spots</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="ForceDirectedLayout.html#addComments" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Comments</span></a>
<a href="ForceDirectedLayout.html#commitLayout" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>commit<wbr/>Layout</span></a>
<a href="ForceDirectedLayout.html#commitLinks" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>commit<wbr/>Links</span></a>
<a href="ForceDirectedLayout.html#commitNodes" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>commit<wbr/>Nodes</span></a>
<a href="ForceDirectedLayout.html#createNetwork" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create<wbr/>Network</span></a>
<a href="ForceDirectedLayout.html#doLayout" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Layout</span></a>
<a href="ForceDirectedLayout.html#electricalCharge" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>electrical<wbr/>Charge</span></a>
<a href="ForceDirectedLayout.html#electricalFieldX" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>electrical<wbr/>FieldX</span></a>
<a href="ForceDirectedLayout.html#electricalFieldY" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>electrical<wbr/>FieldY</span></a>
<a href="ForceDirectedLayout.html#gravitationalFieldX" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>gravitational<wbr/>FieldX</span></a>
<a href="ForceDirectedLayout.html#gravitationalFieldY" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>gravitational<wbr/>FieldY</span></a>
<a href="ForceDirectedLayout.html#gravitationalMass" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>gravitational<wbr/>Mass</span></a>
<a href="ForceDirectedLayout.html#isFixed" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Fixed</span></a>
<a href="ForceDirectedLayout.html#moveFixedVertex" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>move<wbr/>Fixed<wbr/>Vertex</span></a>
<a href="ForceDirectedLayout.html#needsPrelayout" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>needs<wbr/>Prelayout</span></a>
<a href="ForceDirectedLayout.html#shouldInteract" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>should<wbr/>Interact</span></a>
<a href="ForceDirectedLayout.html#springLength" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>spring<wbr/>Length</span></a>
<a href="ForceDirectedLayout.html#springStiffness" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>spring<wbr/>Stiffness</span></a>
</div></section></div></details></section></section><section class="tsd-panel-group tsd-index-group tsd-is-inherited"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-index-accordion"><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Inherited Index</h5></summary><div class="tsd-accordion-details"><div class="tsd-index-content"><section class="tsd-index-section"><h3 class="tsd-index-heading">Accessors</h3><div class="tsd-index-list"><a href="Layout.html#arrangementOrigin" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Layout.arrangement<wbr/>Origin</span></a>
<a href="Layout.html#boundsComputation" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Layout.bounds<wbr/>Computation</span></a>
<a href="Layout.html#diagram" class="tsd-index-link"><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF4D4D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Layout.diagram</span></a>
<a href="Layout.html#group" class="tsd-index-link"><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF4D4D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Layout.group</span></a>
<a href="Layout.html#isInitial" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Layout.is<wbr/>Initial</span></a>
<a href="Layout.html#isOngoing" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Layout.is<wbr/>Ongoing</span></a>
<a href="Layout.html#isRealtime" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Layout.is<wbr/>Realtime</span></a>
<a href="Layout.html#isRouting" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Layout.is<wbr/>Routing</span></a>
<a href="Layout.html#isValidLayout" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Layout.is<wbr/>Valid<wbr/>Layout</span></a>
<a href="Layout.html#isViewportSized" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Layout.is<wbr/>Viewport<wbr/>Sized</span></a>
<a href="Layout.html#network" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Layout.network</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="Layout.html#collectParts" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Layout.collect<wbr/>Parts</span></a>
<a href="Layout.html#copy" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Layout.copy</span></a>
<a href="Layout.html#getLayoutBounds" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Layout.get<wbr/>Layout<wbr/>Bounds</span></a>
<a href="Layout.html#initialOrigin" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Layout.initial<wbr/>Origin</span></a>
<a href="Layout.html#invalidateLayout" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Layout.invalidate<wbr/>Layout</span></a>
<a href="Layout.html#makeNetwork" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Layout.make<wbr/>Network</span></a>
<a href="Layout.html#updateParts" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Layout.update<wbr/>Parts</span></a>
</div></section></div></div></details></section></section><section class="tsd-panel-group tsd-member-group"><h2>Constructors</h2><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_ForceDirectedLayout" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Force<wbr/>Directed<wbr/>Layout</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">init</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="ForceDirectedLayout.html" class="tsd-signature-type tsd-kind-class">ForceDirectedLayout</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ForceDirectedLayout.html" class="tsd-signature-type tsd-kind-class">ForceDirectedLayout</a><a href="#constructor.new_ForceDirectedLayout" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Constructs a <a href="ForceDirectedLayout.html" class="tsd-kind-class">ForceDirectedLayout</a> with no <a href="Layout.html#network" class="tsd-kind-accessor">Layout.network</a>
and with no owning <a href="Layout.html#diagram" class="tsd-kind-accessor">Layout.diagram</a>.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">init</span>: <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="ForceDirectedLayout.html" class="tsd-signature-type tsd-kind-class">ForceDirectedLayout</a><span class="tsd-signature-symbol">></span></h5><div class="tsd-comment tsd-typography"><p>Optional initialization properties.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="ForceDirectedLayout.html" class="tsd-signature-type tsd-kind-class">ForceDirectedLayout</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group"><h2>Accessors</h2><section class="tsd-panel tsd-member"><a id="arrangementSpacing" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>arrangement<wbr/>Spacing</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="Size.html" class="tsd-signature-type tsd-kind-class">Size</a></div><a href="#arrangementSpacing" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the space between which the layout
will position the connected graphs that together compose the network.
This defaults to Size(100, 100).
These distances are used during a clustered layout;
afterwards the normal force-directed layout
will likely cause the size of any space between connected graphs to change,
perhaps considerably.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="arrangesToOrigin" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>arranges<wbr/>To<wbr/>Origin</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#arrangesToOrigin" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets whether <a href="ForceDirectedLayout.html#commitNodes" class="tsd-kind-method">commitNodes</a> should move all of the
nodes so that the nodes all fit with the top-left corner at the
<a href="Layout.html#arrangementOrigin" class="tsd-kind-accessor">Layout.arrangementOrigin</a>.
By default this is false -- the <a href="Layout.html#arrangementOrigin" class="tsd-kind-accessor">Layout.arrangementOrigin</a> is ignored.
When this is true, nodes are moved even though <a href="ForceDirectedLayout.html#isFixed" class="tsd-kind-method">isFixed</a> was true.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="comments" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>comments</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#comments" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets whether this layout should find all <a href="Node.html" class="tsd-kind-class">Node</a>s
whose category is "Comment" and
whose anchors are nodes represented in the network,
and add <a href="ForceDirectedVertex.html" class="tsd-kind-class">ForceDirectedVertex</a>es representing those balloon comments
as nodes in the network.
The default value is false.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="currentIteration" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadOnly">Readonly</code><span>current<wbr/>Iteration</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#currentIteration" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This read-only property returns the current iteration count, valid during a call to <a href="ForceDirectedLayout.html#doLayout" class="tsd-kind-method">doLayout</a>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="defaultCommentElectricalCharge" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>default<wbr/>Comment<wbr/>Electrical<wbr/>Charge</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#defaultCommentElectricalCharge" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the default value computed by <a href="ForceDirectedLayout.html#electricalCharge" class="tsd-kind-method">electricalCharge</a>.
The initial value is 5.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="defaultCommentSpringLength" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>default<wbr/>Comment<wbr/>Spring<wbr/>Length</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#defaultCommentSpringLength" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the default value computed by <a href="ForceDirectedLayout.html#springLength" class="tsd-kind-method">springLength</a>.
The initial value is 10.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="defaultElectricalCharge" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>default<wbr/>Electrical<wbr/>Charge</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#defaultElectricalCharge" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the default value computed by <a href="ForceDirectedLayout.html#electricalCharge" class="tsd-kind-method">electricalCharge</a>.
The initial value is 150.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="defaultGravitationalMass" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>default<wbr/>Gravitational<wbr/>Mass</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#defaultGravitationalMass" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the default value computed by <a href="ForceDirectedLayout.html#gravitationalMass" class="tsd-kind-method">gravitationalMass</a>.
The initial value is zero.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="defaultSpringLength" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>default<wbr/>Spring<wbr/>Length</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#defaultSpringLength" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the default value computed by <a href="ForceDirectedLayout.html#springLength" class="tsd-kind-method">springLength</a>.
The initial value is 50.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="defaultSpringStiffness" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>default<wbr/>Spring<wbr/>Stiffness</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#defaultSpringStiffness" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the default value computed by <a href="ForceDirectedLayout.html#springStiffness" class="tsd-kind-method">springStiffness</a>.
The initial value is 0.05.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="epsilonDistance" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>epsilon<wbr/>Distance</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#epsilonDistance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets approximately how far a node must move in order for the iterations to continue.
The default value is 1.
The value must be larger than zero.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="infinityDistance" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>infinity<wbr/>Distance</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#infinityDistance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets a threshold for the distance beyond which the electrical charge forces may be ignored.
The default value is 1000.
The value must be larger than 1.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="maxIterations" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>max<wbr/>Iterations</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#maxIterations" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the maximum number of iterations to perform when doing the
force-directed auto layout.
The value must be non-negative.
The default value is 300.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="maxPrelayoutIterations" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>max<wbr/>Prelayout<wbr/>Iterations</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#maxPrelayoutIterations" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the maximum number of iterations to perform when doing the force-directed
spring-based prelayout.
The value must be non-negative.
The default value is 100.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="moveLimit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>move<wbr/>Limit</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#moveLimit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets how far a vertex may be moved in an iteration.
The default value is 10.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="prelayoutQuality" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>prelayout<wbr/>Quality</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#prelayoutQuality" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the quality of the prelayout operation.
The value must be greater than or equal to zero, with 0 meaning no prelayout operation
and Infinity meaning the highest quality possible prelayout.
Lower values will reduce memory usage: if the value is Infinity or greater than the size of the graph,
the algorithm will use quadratic space; if the value is 1 linear space will be used.</p>
<p>The default value is NaN, which will attempt to find a good value based on the number of nodes and links
in each connected subgraph.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="prelayoutSpread" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>prelayout<wbr/>Spread</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#prelayoutSpread" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the of the prelayout operation. Increasing this number will
cause the graph to be significantly more spread out, which is particularly useful in graphs with large node sizes.
Decreasing this number may reduce the number of long links in the graph.
The default value is 10.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="randomNumberGenerator" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>random<wbr/>Number<wbr/>Generator</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">random</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div><a href="#randomNumberGenerator" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets a random number generator.
The default value is Math, which results in calling Math.random().
Change this to null in order to use an instance of an internal repeatable pseudo-random number generator,
which will become the new value of this property.</p>
<p>The new value must be either null or an Object with a method named "random" taking zero arguments
and returning a random number between zero (inclusive) and one (exclusive).</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="setsPortSpots" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>sets<wbr/>Port<wbr/>Spots</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#setsPortSpots" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets whether the fromSpot and the toSpot of every <a href="Link.html" class="tsd-kind-class">Link</a>
should be set to <a href="Spot.html#Default" class="tsd-kind-property">Spot.Default</a>.
The default value is true.</p>
</div></li></ul></section></section><section class="tsd-panel-group tsd-member-group"><h2>Methods</h2><section class="tsd-panel tsd-member"><a id="addComments" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>add<wbr/>Comments</span><a href="#addComments" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="addComments.addComments-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">add<wbr/>Comments</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">v</span><span class="tsd-signature-symbol">: </span><a href="ForceDirectedVertex.html" class="tsd-signature-type tsd-kind-class">ForceDirectedVertex</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#addComments.addComments-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Find any associated objects to be positioned along with the <a href="LayoutVertex.html#node" class="tsd-kind-accessor">LayoutVertex.node</a>.</p>
<p>This method is called for each vertex in the network, when <a href="ForceDirectedLayout.html#comments" class="tsd-kind-accessor">comments</a> is true.
The standard behavior is to look for <a href="Node.html" class="tsd-kind-class">Node</a>s whose <a href="Part.html#category" class="tsd-kind-accessor">Part.category</a>
is "Comment" and that refer to the <a href="LayoutVertex.html#node" class="tsd-kind-accessor">LayoutVertex.node</a>.
By default this method will not be called unless you set <a href="ForceDirectedLayout.html#comments" class="tsd-kind-accessor">comments</a> to true.</p>
<p>You may want to override this method in order to customize how any
associated objects are found and how a new <a href="ForceDirectedVertex.html" class="tsd-kind-class">ForceDirectedVertex</a>
and <a href="ForceDirectedEdge.html" class="tsd-kind-class">ForceDirectedEdge</a>
may be added to the network to represent the (balloon?) comment.
This method sets the new vertex's <a href="ForceDirectedVertex.html#charge" class="tsd-kind-accessor">ForceDirectedVertex.charge</a>
to the value of <a href="ForceDirectedLayout.html#defaultCommentElectricalCharge" class="tsd-kind-accessor">defaultCommentElectricalCharge</a>,
and sets the new edge's <a href="ForceDirectedEdge.html#length" class="tsd-kind-accessor">ForceDirectedEdge.length</a>
to the value of <a href="ForceDirectedLayout.html#defaultCommentSpringLength" class="tsd-kind-accessor">defaultCommentSpringLength</a>.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">v</span>: <a href="ForceDirectedVertex.html" class="tsd-signature-type tsd-kind-class">ForceDirectedVertex</a></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="commitLayout" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOverride">Override</code><span>commit<wbr/>Layout</span><a href="#commitLayout" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="commitLayout.commitLayout-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">commit<wbr/>Layout</span><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><a href="#commitLayout.commitLayout-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Set the fromSpot and toSpot on each Link, position each Node according
to the vertex position, and then position/route the Links.</p>
<p>This calls the <a href="ForceDirectedLayout.html#commitNodes" class="tsd-kind-method">commitNodes</a> and <a href="ForceDirectedLayout.html#commitLinks" class="tsd-kind-method">commitLinks</a> methods, the latter only if isRouting is true.
You should not call this method -- it is a "protected virtual" method.
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.</p>
</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-is-protected"><a id="commitLinks" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <code class="tsd-tag ts-flagVirtual">Virtual</code><span>commit<wbr/>Links</span><a href="#commitLinks" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected"><li class="tsd-signature tsd-anchor-link"><a id="commitLinks.commitLinks-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">commit<wbr/>Links</span><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><a href="#commitLinks.commitLinks-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Routes the links.</p>
<p>This is called by <a href="ForceDirectedLayout.html#commitLayout" class="tsd-kind-method">commitLayout</a>.
This is only called if <a href="Layout.html#isRouting" class="tsd-kind-accessor">Layout.isRouting</a> is true.
See also <a href="ForceDirectedLayout.html#commitNodes" class="tsd-kind-method">commitNodes</a>.
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.</p>
</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-is-protected"><a id="commitNodes" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <code class="tsd-tag ts-flagVirtual">Virtual</code><span>commit<wbr/>Nodes</span><a href="#commitNodes" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected"><li class="tsd-signature tsd-anchor-link"><a id="commitNodes.commitNodes-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">commit<wbr/>Nodes</span><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><a href="#commitNodes.commitNodes-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Commit the position of all nodes.</p>
<p>This is called by <a href="ForceDirectedLayout.html#commitLayout" class="tsd-kind-method">commitLayout</a>.
See also <a href="ForceDirectedLayout.html#commitLinks" class="tsd-kind-method">commitLinks</a>.
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.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="createNetwork" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOverride">Override</code><span>create<wbr/>Network</span><a href="#createNetwork" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="createNetwork.createNetwork-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">create<wbr/>Network</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ForceDirectedNetwork.html" class="tsd-signature-type tsd-kind-class">ForceDirectedNetwork</a><a href="#createNetwork.createNetwork-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Create a new <a href="LayoutNetwork.html" class="tsd-kind-class">LayoutNetwork</a> of <a href="ForceDirectedVertex.html" class="tsd-kind-class">ForceDirectedVertex</a>es and <a href="ForceDirectedEdge.html" class="tsd-kind-class">ForceDirectedEdge</a>s.</p>
</div><h4 class="tsd-returns-title">Returns <a href="ForceDirectedNetwork.html" class="tsd-signature-type tsd-kind-class">ForceDirectedNetwork</a></h4><p>a new <a href="LayoutNetwork.html" class="tsd-kind-class">LayoutNetwork</a>.</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="doLayout" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOverride">Override</code><span>do<wbr/>Layout</span><a href="#doLayout" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="doLayout.doLayout-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">do<wbr/>Layout</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">coll</span><span class="tsd-signature-symbol">: </span><a href="Diagram.html" class="tsd-signature-type tsd-kind-class">Diagram</a><span class="tsd-signature-symbol"> | </span><a href="Iterable.html" class="tsd-signature-type tsd-kind-interface">Iterable</a><span class="tsd-signature-symbol"><</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> | </span><a href="Group.html" class="tsd-signature-type tsd-kind-class">Group</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#doLayout.doLayout-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Perform the force-directed layout.</p>
<p>If there is no <a href="Layout.html#network" class="tsd-kind-accessor">Layout.network</a>, this calls makeNetwork to create a <a href="LayoutNetwork.html" class="tsd-kind-class">LayoutNetwork</a> from the given collection of Parts.
This removes any reflexive edges in the network, since they should be ignored.</p>
<p>For each vertex this calls and remembers the result of <a href="ForceDirectedLayout.html#electricalCharge" class="tsd-kind-method">electricalCharge</a> as the <a href="ForceDirectedVertex.html#charge" class="tsd-kind-accessor">ForceDirectedVertex.charge</a>
and the result of <a href="ForceDirectedLayout.html#gravitationalMass" class="tsd-kind-method">gravitationalMass</a> as the <a href="ForceDirectedVertex.html#mass" class="tsd-kind-accessor">ForceDirectedVertex.mass</a>.</p>
<p>For each edge this calls and remembers the result of <a href="ForceDirectedLayout.html#springStiffness" class="tsd-kind-method">springStiffness</a> as the <a href="ForceDirectedEdge.html#stiffness" class="tsd-kind-accessor">ForceDirectedEdge.stiffness</a>
and the result of <a href="ForceDirectedLayout.html#springLength" class="tsd-kind-method">springLength</a> as the <a href="ForceDirectedEdge.html#length" class="tsd-kind-accessor">ForceDirectedEdge.length</a>.</p>
<p>This then iterates, updating the position of each vertex according to the forces upon it,
until reaching <a href="ForceDirectedLayout.html#maxIterations" class="tsd-kind-accessor">maxIterations</a> or until no vertex moves more than about <a href="ForceDirectedLayout.html#epsilonDistance" class="tsd-kind-accessor">epsilonDistance</a>.</p>
<p>Finally this calls <a href="Layout.html#updateParts" class="tsd-kind-method">Layout.updateParts</a> to commit the Node positions from the vertex positions.
<a href="Layout.html#updateParts" class="tsd-kind-method">Layout.updateParts</a> calls <a href="ForceDirectedLayout.html#commitLayout" class="tsd-kind-method">commitLayout</a> within a transaction.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">coll</span>: <a href="Diagram.html" class="tsd-signature-type tsd-kind-class">Diagram</a><span class="tsd-signature-symbol"> | </span><a href="Iterable.html" class="tsd-signature-type tsd-kind-interface">Iterable</a><span class="tsd-signature-symbol"><</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> | </span><a href="Group.html" class="tsd-signature-type tsd-kind-class">Group</a></h5><div class="tsd-comment tsd-typography"><p>A <a href="Diagram.html" class="tsd-kind-class">Diagram</a> or a <a href="Group.html" class="tsd-kind-class">Group</a> or a collection of <a href="Part.html" class="tsd-kind-class">Part</a>s</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="electricalCharge" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>electrical<wbr/>Charge</span><a href="#electricalCharge" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="electricalCharge.electricalCharge-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">electrical<wbr/>Charge</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">v</span><span class="tsd-signature-symbol">: </span><a href="ForceDirectedVertex.html" class="tsd-signature-type tsd-kind-class">ForceDirectedVertex</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#electricalCharge.electricalCharge-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the charge of the vertex,
the value of <a href="ForceDirectedVertex.html#charge" class="tsd-kind-accessor">ForceDirectedVertex.charge</a> if it's a number,
or else the value of <a href="ForceDirectedLayout.html#defaultElectricalCharge" class="tsd-kind-accessor">defaultElectricalCharge</a>.</p>
<p>The electrical forces between two vertexes decrease by the square of the distance between them.
Vertexes that are more than <a href="ForceDirectedLayout.html#infinityDistance" class="tsd-kind-accessor">infinityDistance</a> apart are assumed to have no electrical charge effect on each other.</p>
<p>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.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">v</span>: <a href="ForceDirectedVertex.html" class="tsd-signature-type tsd-kind-class">ForceDirectedVertex</a></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="electricalFieldX" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>electrical<wbr/>FieldX</span><a href="#electricalFieldX" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="electricalFieldX.electricalFieldX-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">electrical<wbr/>FieldX</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">x</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">y</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#electricalFieldX.electricalFieldX-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the electrical field in the X direction acting on a vertex at the given point.
By default there is no electrical field at any location.</p>
<p>Used to define an external electrical field at a point independent of the vertex charges.
A vertex L is acted upon by a force in the X direction of proportional to
<code>electricalFieldX(L.center.x, L.center.y) * electricalCharge(L)</code>.
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.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">x</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">y</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>the default implementation returns zero.</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="electricalFieldY" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>electrical<wbr/>FieldY</span><a href="#electricalFieldY" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="electricalFieldY.electricalFieldY-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">electrical<wbr/>FieldY</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">x</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">y</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#electricalFieldY.electricalFieldY-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the electrical field in the Y direction acting on a vertex at the given point.
By default there is no electrical field at any location.</p>
<p>Used to define an external electrical field at a point independent of the vertex charges.
A vertex L is acted upon by a force in the Y direction of proportional to
<code>electricalFieldY(L.center.x, L.center.y) * electricalCharge(L)</code>.
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.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">x</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">y</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>the default implementation returns zero.</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="gravitationalFieldX" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>gravitational<wbr/>FieldX</span><a href="#gravitationalFieldX" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="gravitationalFieldX.gravitationalFieldX-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">gravitational<wbr/>FieldX</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">x</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">y</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#gravitationalFieldX.gravitationalFieldX-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This returns the gravitational field in the X direction acting on a vertex at the given point.
By default there is no gravitational field at any location.</p>
<p>Used to define an external gravitational field at a point independent of the vertex masses.
A vertex L is acted upon by a force in the X direction of proportional to
<code>gravitationalFieldX(L.center.x, L.center.y) * gravitationalMass(L)</code>.
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.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">x</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">y</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>the default implementation returns zero.</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="gravitationalFieldY" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>gravitational<wbr/>FieldY</span><a href="#gravitationalFieldY" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="gravitationalFieldY.gravitationalFieldY-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">gravitational<wbr/>FieldY</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">x</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">y</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#gravitationalFieldY.gravitationalFieldY-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This returns the gravitational field in the Y direction acting on a vertex at the given point.
By default there is no gravitational field at any location.</p>
<p>Used to define an external gravitational field at a point independent of the vertex masses.
A vertex L is acted upon by a force in the Y direction of proportional to
<code>gravitationalFieldY(L.center.x, L.center.y) * gravitationalMass(L)</code>.
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.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">x</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">y</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>the default implementation returns zero.</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="gravitationalMass" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>gravitational<wbr/>Mass</span><a href="#gravitationalMass" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="gravitationalMass.gravitationalMass-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">gravitational<wbr/>Mass</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">v</span><span class="tsd-signature-symbol">: </span><a href="ForceDirectedVertex.html" class="tsd-signature-type tsd-kind-class">ForceDirectedVertex</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#gravitationalMass.gravitationalMass-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the mass of the vertex,
the value of <a href="ForceDirectedVertex.html#mass" class="tsd-kind-accessor">ForceDirectedVertex.mass</a> if it's a number,
or else the value of <a href="ForceDirectedLayout.html#defaultGravitationalMass" class="tsd-kind-accessor">defaultGravitationalMass</a>.
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.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">v</span>: <a href="ForceDirectedVertex.html" class="tsd-signature-type tsd-kind-class">ForceDirectedVertex</a></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="isFixed" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>is<wbr/>Fixed</span><a href="#isFixed" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="isFixed.isFixed-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">is<wbr/>Fixed</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">v</span><span class="tsd-signature-symbol">: </span><a href="ForceDirectedVertex.html" class="tsd-signature-type tsd-kind-class">ForceDirectedVertex</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isFixed.isFixed-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This predicate returns true if the vertex should not be moved
by the layout algorithm but still have an effect on nearby and connected vertexes.
The default implementation returns <a href="ForceDirectedVertex.html#isFixed" class="tsd-kind-accessor">ForceDirectedVertex.isFixed</a>.
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.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">v</span>: <a href="ForceDirectedVertex.html" class="tsd-signature-type tsd-kind-class">ForceDirectedVertex</a></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>returns true if the node should not be moved by the layout algorithm.</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="moveFixedVertex" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>move<wbr/>Fixed<wbr/>Vertex</span><a href="#moveFixedVertex" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="moveFixedVertex.moveFixedVertex-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">move<wbr/>Fixed<wbr/>Vertex</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">v</span><span class="tsd-signature-symbol">: </span><a href="ForceDirectedVertex.html" class="tsd-signature-type tsd-kind-class">ForceDirectedVertex</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#moveFixedVertex.moveFixedVertex-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Maybe move a vertex that <a href="ForceDirectedLayout.html#isFixed" class="tsd-kind-method">isFixed</a>.
This is called each iteration on each such vertex.
By default this does nothing.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">v</span>: <a href="ForceDirectedVertex.html" class="tsd-signature-type tsd-kind-class">ForceDirectedVertex</a></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="needsPrelayout" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>needs<wbr/>Prelayout</span><a href="#needsPrelayout" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="needsPrelayout.needsPrelayout-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">needs<wbr/>Prelayout</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#needsPrelayout.needsPrelayout-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Determines whether a spring-based prelayout should be performed before the main force-directed layout operation.
In general this should occur when the network has not already been laid out either by ForceDirectedLayout or some other algorithm.</p>
<p>By default, this function will return true if any node in the network has a NaN position, likely meaning it has not
been positioned yet, or if a large number of nodes in the network in the network overlap. This function can be overriden
to provide custom logic for determining whether a prelayout should be performed.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">since</code><p>3.0</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="shouldInteract" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>should<wbr/>Interact</span><a href="#shouldInteract" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="shouldInteract.shouldInteract-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">should<wbr/>Interact</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">v1</span><span class="tsd-signature-symbol">: </span><a href="ForceDirectedVertex.html" class="tsd-signature-type tsd-kind-class">ForceDirectedVertex</a>, <span class="tsd-kind-parameter">v2</span><span class="tsd-signature-symbol">: </span><a href="ForceDirectedVertex.html" class="tsd-signature-type tsd-kind-class">ForceDirectedVertex</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#shouldInteract.shouldInteract-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Determines whether the layout should calculate electrical forces between two given vertexes,
for example, for layouts that should stop moving vertexes once they no longer physically overlap.</p>
<p>By default, this always returns true.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">v1</span>: <a href="ForceDirectedVertex.html" class="tsd-signature-type tsd-kind-class">ForceDirectedVertex</a></h5></li><li><h5><span class="tsd-kind-parameter">v2</span>: <a href="ForceDirectedVertex.html" class="tsd-signature-type tsd-kind-class">ForceDirectedVertex</a></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">since</code><p>3.0</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="springLength" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>spring<wbr/>Length</span><a href="#springLength" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="springLength.springLength-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">spring<wbr/>Length</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">e</span><span class="tsd-signature-symbol">: </span><a href="ForceDirectedEdge.html" class="tsd-signature-type tsd-kind-class">ForceDirectedEdge</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#springLength.springLength-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the length of the spring representing an edge.
The two vertexes connected by the edge E are acted upon by a force of proportional to
<code>springStiffness(E) * (getNodeDistance(E.fromVertex, E.toVertex) - springLength(E))</code> divided by the distance between the vertexes.
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.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">e</span>: <a href="ForceDirectedEdge.html" class="tsd-signature-type tsd-kind-class">ForceDirectedEdge</a></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>Returns the length of the edge representing a link,
the value of <a href="ForceDirectedEdge.html#length" class="tsd-kind-accessor">ForceDirectedEdge.length</a> if it's a number,
or else the value of <a href="ForceDirectedLayout.html#defaultSpringLength" class="tsd-kind-accessor">defaultSpringLength</a>.</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="springStiffness" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>spring<wbr/>Stiffness</span><a href="#springStiffness" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="springStiffness.springStiffness-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">spring<wbr/>Stiffness</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">e</span><span class="tsd-signature-symbol">: </span><a href="ForceDirectedEdge.html" class="tsd-signature-type tsd-kind-class">ForceDirectedEdge</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#springStiffness.springStiffness-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the stiffness of the spring representing an edge.</p>
<p>The spring force between two vertexes connected by an edge is linearly proportional by distance
to the difference between the <a href="ForceDirectedLayout.html#springLength" class="tsd-kind-method">springLength</a> and the distance.
When the distance is greater than the length, the force pulls the vertexes closer to each other.
When the distance is less than the length, the force pushes them apart.</p>
<p>The two vertexes connected by the edge E are acted upon by a force of proportional to
<code>springStiffness(E) * (getNodeDistance(E.fromVertex, E.toVertex) - springLength(E))</code> divided by the distance between the vertexes.
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.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">e</span>: <a href="ForceDirectedEdge.html" class="tsd-signature-type tsd-kind-class">ForceDirectedEdge</a></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>Returns the stiffness of the edge representing a link,
the value of <a href="ForceDirectedEdge.html#stiffness" class="tsd-kind-accessor">ForceDirectedEdge.stiffness</a> if it's a number,
or else the value of <a href="ForceDirectedLayout.html#defaultSpringStiffness" class="tsd-kind-accessor">defaultSpringStiffness</a>.</p>
</li></ul></section></section></div><div class="col-sidebar"><div class="page-menu"><details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><ul><li><a href="#constructor"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></li><li><a href="#arrangementSpacing"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>arrangement<wbr/>Spacing</span></a></li><li><a href="#arrangesToOrigin"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>arranges<wbr/>To<wbr/>Origin</span></a></li><li><a href="#comments"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>comments</span></a></li><li><a href="#currentIteration"><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF4D4D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>current<wbr/>Iteration</span></a></li><li><a href="#defaultCommentElectricalCharge"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>default<wbr/>Comment<wbr/>Electrical<wbr/>Charge</span></a></li><li><a href="#defaultCommentSpringLength"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>default<wbr/>Comment<wbr/>Spring<wbr/>Length</span></a></li><li><a href="#defaultElectricalCharge"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>default<wbr/>Electrical<wbr/>Charge</span></a></li><li><a href="#defaultGravitationalMass"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>default<wbr/>Gravitational<wbr/>Mass</span></a></li><li><a href="#defaultSpringLength"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>default<wbr/>Spring<wbr/>Length</span></a></li><li><a href="#defaultSpringStiffness"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>default<wbr/>Spring<wbr/>Stiffness</span></a></li><li><a href="#epsilonDistance"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>epsilon<wbr/>Distance</span></a></li><li><a href="#infinityDistance"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>infinity<wbr/>Distance</span></a></li><li><a href="#maxIterations"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>max<wbr/>Iterations</span></a></li><li><a href="#maxPrelayoutIterations"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>max<wbr/>Prelayout<wbr/>Iterations</span></a></li><li><a href="#moveLimit"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>move<wbr/>Limit</span></a></li><li><a href="#prelayoutQuality"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>prelayout<wbr/>Quality</span></a></li><li><a href="#prelayoutSpread"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>prelayout<wbr/>Spread</span></a></li><li><a href="#randomNumberGenerator"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>random<wbr/>Number<wbr/>Generator</span></a></li><li><a href="#setsPortSpots"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>sets<wbr/>Port<wbr/>Spots</span></a></li><li><a href="#addComments"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Comments</span></a></li><li><a href="#commitLayout"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>commit<wbr/>Layout</span></a></li><li><a href="#commitLinks" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>commit<wbr/>Links</span></a></li><li><a href="#commitNodes" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>commit<wbr/>Nodes</span></a></li><li><a href="#createNetwork"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create<wbr/>Network</span></a></li><li><a href="#doLayout"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Layout</span></a></li><li><a href="#electricalCharge"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>electrical<wbr/>Charge</span></a></li><li><a href="#electricalFieldX"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>electrical<wbr/>FieldX</span></a></li><li><a href="#electricalFieldY"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>electrical<wbr/>FieldY</span></a></li><li><a href="#gravitationalFieldX"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>gravitational<wbr/>FieldX</span></a></li><li><a href="#gravitationalFieldY"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>gravitational<wbr/>FieldY</span></a></li><li><a href="#gravitationalMass"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>gravitational<wbr/>Mass</span></a></li><li><a href="#isFixed"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Fixed</span></a></li><li><a href="#moveFixedVertex"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>move<wbr/>Fixed<wbr/>Vertex</span></a></li><li><a href="#needsPrelayout"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>needs<wbr/>Prelayout</span></a></li><li><a href="#shouldInteract"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>should<wbr/>Interact</span></a></li><li><a href="#springLength"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>spring<wbr/>Length</span></a></li><li><a href="#springStiffness"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>spring<wbr/>Stiffness</span></a></li></ul></div></details><div class="tsd-navigation settings"><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">System</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>GoJS API</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><div class="tsd w-full max-w-screen-xl mx-auto px-2"><div class="bottom-copyright">Copyright © 1998-2025 by Northwoods Software Corporation.</div></div><div class="overlay"></div><script async src="https://www.googletagmanager.com/gtag/js?id=G-S5QK8VSK84"></script><script>window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-S5QK8VSK84');
var getOutboundLink = function(url, label) {
gtag('event', 'click', {
'event_category': 'outbound',
'event_label': label,
'transport_type': 'beacon'
});
}
document.getElementById("contactBtn").addEventListener("click", function() {
getOutboundLink('https://nwoods.com/contact.html', 'contact');
});
document.getElementById("buyBtn").addEventListener("click", function() {
getOutboundLink('https://nwoods.com/sales/index.html', 'buy');
});</script></body></html>