UNPKG

create-gojs-kit

Version:

A CLI for downloading GoJS samples, extensions, and docs

176 lines (174 loc) 46.3 kB
<!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>ArrangingLayout | 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="ArrangingLayout.html">ArrangingLayout</a></li></ul><h1 class="flex items-center">Class ArrangingLayout</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-extension"><p>This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. See the <a href="../../intro/extensions.html">Extensions intro page</a> for more information.</p></section><section class="tsd-panel tsd-hierarchy"><h4>Hierarchy (<a class="link" href="../hierarchy.html#ArrangingLayout">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">ArrangingLayout</span></li></ul></li></ul></section><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>A custom Layout that provides one way to have a layout of layouts. It partitions nodes and links into separate subnetworks, applies a primary layout to each subnetwork, and then arranges those results by an arranging layout. Any disconnected nodes are laid out later by a side layout, by default in a grid underneath the main body of subnetworks.</p> <p>This layout uses three separate Layouts.</p> <p>One is used for laying out nodes and links that are connected together: <a href="ArrangingLayout.html#primaryLayout" class="tsd-kind-accessor">primaryLayout</a>. This defaults to null and must be set to an instance of a <a href="Layout.html" class="tsd-kind-class">go.Layout</a>, such as a <a href="TreeLayout.html" class="tsd-kind-class">go.TreeLayout</a> or a <a href="ForceDirectedLayout.html" class="tsd-kind-class">go.ForceDirectedLayout</a> or a custom Layout.</p> <p>One is used to arrange separate subnetworks of the main graph: <a href="ArrangingLayout.html#arrangingLayout" class="tsd-kind-accessor">arrangingLayout</a>. This defaults to an instance of <a href="GridLayout.html" class="tsd-kind-class">go.GridLayout</a>.</p> <p>One is used for laying out the additional nodes along one of the sides of the main graph: <a href="ArrangingLayout.html#sideLayout" class="tsd-kind-accessor">sideLayout</a>. This also defaults to an instance of <a href="GridLayout.html" class="tsd-kind-class">go.GridLayout</a>. A filter predicate, <a href="ArrangingLayout.html#filter" class="tsd-kind-accessor">filter</a>, splits up the collection of nodes and links into two subsets, one for the main layout and one for the side layout. By default, when there is no filter, it puts all nodes that have no link connections into the subset to be processed by the side layout.</p> <p>If all pairs of nodes in the main graph can be reached by some path of undirected links, there are no separate subnetworks, so the <a href="ArrangingLayout.html#arrangingLayout" class="tsd-kind-accessor">arrangingLayout</a> need not be used and the <a href="ArrangingLayout.html#primaryLayout" class="tsd-kind-accessor">primaryLayout</a> would apply to all of those nodes and links.</p> <p>But if there are disconnected subnetworks, the <a href="ArrangingLayout.html#primaryLayout" class="tsd-kind-accessor">primaryLayout</a> is applied to each subnetwork, and then all of those results are arranged by the <a href="ArrangingLayout.html#arrangingLayout" class="tsd-kind-accessor">arrangingLayout</a>. If you don&#39;t want to use an <a href="ArrangingLayout.html#arrangingLayout" class="tsd-kind-accessor">arrangingLayout</a> and you want to force the <a href="ArrangingLayout.html#primaryLayout" class="tsd-kind-accessor">primaryLayout</a> to operate on all of the subnetworks, set <a href="ArrangingLayout.html#arrangingLayout" class="tsd-kind-accessor">arrangingLayout</a> to null.</p> <p>In either case if there are any nodes in the side graph, those are arranged by the <a href="ArrangingLayout.html#sideLayout" class="tsd-kind-accessor">sideLayout</a> to be on the side of the arrangement of the main graph of nodes and links. The <a href="ArrangingLayout.html#side" class="tsd-kind-accessor">side</a> property controls which side they will be placed -- the default is BottomSide.</p> <p>Note: if you do not want to have singleton nodes be arranged by <a href="ArrangingLayout.html#sideLayout" class="tsd-kind-accessor">sideLayout</a>, set <a href="ArrangingLayout.html#filter" class="tsd-kind-accessor">filter</a> to <code>part => true</code>. That will cause all singleton nodes to be arranged by <a href="ArrangingLayout.html#arrangingLayout" class="tsd-kind-accessor">arrangingLayout</a> as if they were each their own subnetwork.</p> <p>If you both don&#39;t want to use <a href="ArrangingLayout.html#sideLayout" class="tsd-kind-accessor">sideLayout</a> and you don&#39;t want to use <a href="ArrangingLayout.html#arrangingLayout" class="tsd-kind-accessor">arrangingLayout</a> to lay out connected subnetworks, don&#39;t use this ArrangingLayout at all -- just use whatever Layout you would have assigned to <a href="ArrangingLayout.html#primaryLayout" class="tsd-kind-accessor">primaryLayout</a>.</p> <p>If you want to experiment with this extension, try the <a href="../../samples/Arranging.html">Arranging Layout</a> sample.</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="ArrangingLayout.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="ArrangingLayout.html#arrangingLayout" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>arranging<wbr/>Layout</span></a> <a href="ArrangingLayout.html#filter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>filter</span></a> <a href="ArrangingLayout.html#primaryLayout" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>primary<wbr/>Layout</span></a> <a href="ArrangingLayout.html#side" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>side</span></a> <a href="ArrangingLayout.html#sideLayout" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>side<wbr/>Layout</span></a> <a href="ArrangingLayout.html#spacing" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>spacing</span></a> </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="ArrangingLayout.html#moveSideCollection" 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/>Side<wbr/>Collection</span></a> <a href="ArrangingLayout.html#moveSubgraph" 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/>Subgraph</span></a> <a href="ArrangingLayout.html#preparePrimaryLayout" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>prepare<wbr/>Primary<wbr/>Layout</span></a> <a href="ArrangingLayout.html#prepareSideLayout" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>prepare<wbr/>Side<wbr/>Layout</span></a> <a href="ArrangingLayout.html#splitParts" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>split<wbr/>Parts</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"><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>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#commitLayout" 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.commit<wbr/>Layout</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#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>Layout.create<wbr/>Network</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_ArrangingLayout" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Arranging<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">&lt;</span><a href="ArrangingLayout.html" class="tsd-signature-type tsd-kind-class">ArrangingLayout</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ArrangingLayout.html" class="tsd-signature-type tsd-kind-class">ArrangingLayout</a><a href="#constructor.new_ArrangingLayout" 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-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">&lt;</span><a href="ArrangingLayout.html" class="tsd-signature-type tsd-kind-class">ArrangingLayout</a><span class="tsd-signature-symbol">&gt;</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <a href="ArrangingLayout.html" class="tsd-signature-type tsd-kind-class">ArrangingLayout</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="arrangingLayout" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>arranging<wbr/>Layout</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="Layout.html" class="tsd-signature-type tsd-kind-class">Layout</a></div><a href="#arrangingLayout" 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 Layout used to arrange multiple separate connected subnetworks of the main graph. The default value is an instance of GridLayout. Set this property to null in order to get the <a href="ArrangingLayout.html#primaryLayout" class="tsd-kind-accessor">primaryLayout</a> to operate on all connected graphs as a whole.</p> </div></li></ul></section><section class="tsd-panel tsd-member"><a id="filter" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>filter</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">part</span><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"> =&gt; </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span></div><a href="#filter" 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 predicate function to call on each non-Link. If the predicate returns true, the part will be laid out by the main layouts, the primaryLayouts and the arrangingLayout, otherwise by the sideLayout. The default value is a function that is true when there are any links connecting with the node. Such default behavior will have the sideLayout position all of the singleton nodes.</p> </div></li></ul></section><section class="tsd-panel tsd-member"><a id="primaryLayout" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>primary<wbr/>Layout</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="Layout.html" class="tsd-signature-type tsd-kind-class">Layout</a></div><a href="#primaryLayout" 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 Layout used for the main part of the diagram. The default value is an instance of GridLayout. Any new value must not be null.</p> </div></li></ul></section><section class="tsd-panel tsd-member"><a id="side" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>side</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type tsd-kind-class">Spot</a></div><a href="#side" 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 side <a href="Spot.html" class="tsd-kind-class">go.Spot</a> where the side nodes and links should be laid out, relative to the results of the main Layout. The default value is Spot.BottomSide.</p> <p>If the value is Spot.Bottom, Spot.Top, Spot.Right, or Spot.Left, the side nodes will be centered along that side.</p> <p>Currently only handles a single side.</p> </div></li></ul></section><section class="tsd-panel tsd-member"><a id="sideLayout" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>side<wbr/>Layout</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="Layout.html" class="tsd-signature-type tsd-kind-class">Layout</a></div><a href="#sideLayout" 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 Layout used to arrange the &#39;side&#39; nodes and links -- those outside of the main layout. The default value is an instance of GridLayout. Any new value must not be null.</p> </div></li></ul></section><section class="tsd-panel tsd-member"><a id="spacing" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>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="#spacing" 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 the main layout and the side layout. The default value is Size(20, 20).</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="moveSideCollection" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>move<wbr/>Side<wbr/>Collection</span><a href="#moveSideCollection" 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="moveSideCollection.moveSideCollection-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">move<wbr/>Side<wbr/>Collection</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sidecoll</span><span class="tsd-signature-symbol">: </span><a href="Set.html" class="tsd-signature-type tsd-kind-class">Set</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">&gt;</span>, <span class="tsd-kind-parameter">mainbounds</span><span class="tsd-signature-symbol">: </span><a href="Rect.html" class="tsd-signature-type tsd-kind-class">Rect</a>, <span class="tsd-kind-parameter">sidebounds</span><span class="tsd-signature-symbol">: </span><a href="Rect.html" class="tsd-signature-type tsd-kind-class">Rect</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#moveSideCollection.moveSideCollection-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 method is called just after the sideLayout has been performed in order to move its parts to the desired area relative to the results of the main layouts. By default this calls <a href="Diagram.html#moveParts" class="tsd-kind-method">go.Diagram.moveParts</a> on the sidecoll collection to the <a href="ArrangingLayout.html#side" class="tsd-kind-accessor">side</a> of the mainbounds. This won&#39;t get called if there are no Parts in the sidecoll collection.</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">sidecoll</span>: <a href="Set.html" class="tsd-signature-type tsd-kind-class">Set</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">&gt;</span></h5><div class="tsd-comment tsd-typography"><p>a collection of Parts that were laid out by the sideLayout</p> </div></li><li><h5><span class="tsd-kind-parameter">mainbounds</span>: <a href="Rect.html" class="tsd-signature-type tsd-kind-class">Rect</a></h5><div class="tsd-comment tsd-typography"><p>the area occupied by the results of the main layouts</p> </div></li><li><h5><span class="tsd-kind-parameter">sidebounds</span>: <a href="Rect.html" class="tsd-signature-type tsd-kind-class">Rect</a></h5><div class="tsd-comment tsd-typography"><p>the area occupied by the results of the sideLayout</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="moveSubgraph" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>move<wbr/>Subgraph</span><a href="#moveSubgraph" 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="moveSubgraph.moveSubgraph-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">move<wbr/>Subgraph</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">subColl</span><span class="tsd-signature-symbol">: </span><a href="Set.html" class="tsd-signature-type tsd-kind-class">Set</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">&gt;</span>, <span class="tsd-kind-parameter">subbounds</span><span class="tsd-signature-symbol">: </span><a href="Rect.html" class="tsd-signature-type tsd-kind-class">Rect</a>, <span class="tsd-kind-parameter">bounds</span><span class="tsd-signature-symbol">: </span><a href="Rect.html" class="tsd-signature-type tsd-kind-class">Rect</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#moveSubgraph.moveSubgraph-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>Move a Set of Nodes and Links to the given area.</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">subColl</span>: <a href="Set.html" class="tsd-signature-type tsd-kind-class">Set</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">&gt;</span></h5><div class="tsd-comment tsd-typography"><p>the Set of Nodes and Links that form a separate connected subnetwork</p> </div></li><li><h5><span class="tsd-kind-parameter">subbounds</span>: <a href="Rect.html" class="tsd-signature-type tsd-kind-class">Rect</a></h5><div class="tsd-comment tsd-typography"><p>the area occupied by the subColl</p> </div></li><li><h5><span class="tsd-kind-parameter">bounds</span>: <a href="Rect.html" class="tsd-signature-type tsd-kind-class">Rect</a></h5><div class="tsd-comment tsd-typography"><p>the area where they should be moved according to the arrangingLayout</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="preparePrimaryLayout" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>prepare<wbr/>Primary<wbr/>Layout</span><a href="#preparePrimaryLayout" 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="preparePrimaryLayout.preparePrimaryLayout-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepare<wbr/>Primary<wbr/>Layout</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">primaryLayout</span><span class="tsd-signature-symbol">: </span><a href="Layout.html" class="tsd-signature-type tsd-kind-class">Layout</a>, <span class="tsd-kind-parameter">mainColl</span><span class="tsd-signature-symbol">: </span><a href="Set.html" class="tsd-signature-type tsd-kind-class">Set</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#preparePrimaryLayout.preparePrimaryLayout-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 method is called just before the primaryLayout is performed so that there can be adjustments made to the primaryLayout, if desired. By default this method makes no adjustments to the primaryLayout.</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">primaryLayout</span>: <a href="Layout.html" class="tsd-signature-type tsd-kind-class">Layout</a></h5><div class="tsd-comment tsd-typography"><p>the primaryLayout that may be modified for the achieving different results from that layout</p> </div></li><li><h5><span class="tsd-kind-parameter">mainColl</span>: <a href="Set.html" class="tsd-signature-type tsd-kind-class">Set</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">&gt;</span></h5><div class="tsd-comment tsd-typography"><p>the Nodes and Links to be laid out by primaryLayout after being separated into subnetworks</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="prepareSideLayout" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>prepare<wbr/>Side<wbr/>Layout</span><a href="#prepareSideLayout" 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="prepareSideLayout.prepareSideLayout-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepare<wbr/>Side<wbr/>Layout</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sideLayout</span><span class="tsd-signature-symbol">: </span><a href="Layout.html" class="tsd-signature-type tsd-kind-class">Layout</a>, <span class="tsd-kind-parameter">sideColl</span><span class="tsd-signature-symbol">: </span><a href="Set.html" class="tsd-signature-type tsd-kind-class">Set</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">&gt;</span>, <span class="tsd-kind-parameter">mainBounds</span><span class="tsd-signature-symbol">: </span><a href="Rect.html" class="tsd-signature-type tsd-kind-class">Rect</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#prepareSideLayout.prepareSideLayout-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 method is called just after the main layouts (the primaryLayouts and arrangingLayout) have been performed and just before the sideLayout is performed so that there can be adjustments made to the sideLayout, if desired. By default this method makes no adjustments to the sideLayout.</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">sideLayout</span>: <a href="Layout.html" class="tsd-signature-type tsd-kind-class">Layout</a></h5><div class="tsd-comment tsd-typography"><p>the sideLayout that may be modified for the results of the main layouts</p> </div></li><li><h5><span class="tsd-kind-parameter">sideColl</span>: <a href="Set.html" class="tsd-signature-type tsd-kind-class">Set</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">&gt;</span></h5><div class="tsd-comment tsd-typography"><p>the Nodes and Links filtered out to be laid out by sideLayout</p> </div></li><li><h5><span class="tsd-kind-parameter">mainBounds</span>: <a href="Rect.html" class="tsd-signature-type tsd-kind-class">Rect</a></h5><div class="tsd-comment tsd-typography"><p>the area occupied by the nodes and links of the main layout, after it was performed</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="splitParts" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>split<wbr/>Parts</span><a href="#splitParts" 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="splitParts.splitParts-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">split<wbr/>Parts</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">coll</span><span class="tsd-signature-symbol">: </span><a href="Set.html" class="tsd-signature-type tsd-kind-class">Set</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">&gt;</span>, <span class="tsd-kind-parameter">maincoll</span><span class="tsd-signature-symbol">: </span><a href="Set.html" class="tsd-signature-type tsd-kind-class">Set</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">&gt;</span>, <span class="tsd-kind-parameter">sidecoll</span><span class="tsd-signature-symbol">: </span><a href="Set.html" class="tsd-signature-type tsd-kind-class">Set</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#splitParts.splitParts-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>Assign all of the Parts in the given collection into either the set of Nodes and Links for the main graph or the set of Nodes and Links for the side graph.</p> <p>By default this just calls the <a href="ArrangingLayout.html#filter" class="tsd-kind-accessor">filter</a> on each non-Link to decide, and then looks at each Link&#39;s connected Nodes to decide.</p> <p>A null filter assigns all Nodes that have connected Links to the main graph, and all Links will be assigned to the main graph, and the side graph will only contain Parts with no connected Links.</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="Set.html" class="tsd-signature-type tsd-kind-class">Set</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">&gt;</span></h5></li><li><h5><span class="tsd-kind-parameter">maincoll</span>: <a href="Set.html" class="tsd-signature-type tsd-kind-class">Set</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">&gt;</span></h5></li><li><h5><span class="tsd-kind-parameter">sidecoll</span>: <a href="Set.html" class="tsd-signature-type tsd-kind-class">Set</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">&gt;</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></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="#arrangingLayout"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>arranging<wbr/>Layout</span></a></li><li><a href="#filter"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>filter</span></a></li><li><a href="#primaryLayout"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>primary<wbr/>Layout</span></a></li><li><a href="#side"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>side</span></a></li><li><a href="#sideLayout"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>side<wbr/>Layout</span></a></li><li><a href="#spacing"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>spacing</span></a></li><li><a href="#moveSideCollection"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>move<wbr/>Side<wbr/>Collection</span></a></li><li><a href="#moveSubgraph"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>move<wbr/>Subgraph</span></a></li><li><a href="#preparePrimaryLayout"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>prepare<wbr/>Primary<wbr/>Layout</span></a></li><li><a href="#prepareSideLayout"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>prepare<wbr/>Side<wbr/>Layout</span></a></li><li><a href="#splitParts"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>split<wbr/>Parts</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>