create-gojs-kit
Version:
A CLI for downloading GoJS samples, extensions, and docs
174 lines • 55.9 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>Inspector | 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="Inspector.html">Inspector</a></li></ul><h1 class="flex items-center">Class Inspector</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-comment"><div class="tsd-comment tsd-typography"><p>This class implements an inspector for GoJS model data objects.
The constructor takes three arguments:</p>
<ul>
<li><code>divid</code> <em><strong>string</strong></em> a string referencing the HTML ID of the to-be inspector's div</li>
<li><code>diagram</code> <em><strong>Diagram</strong></em> a reference to a GoJS Diagram</li>
<li><code>options</code> <em><strong>Object</strong></em> an optional JS Object describing options for the inspector</li>
</ul>
<p>Options:</p>
<ul>
<li><code>inspectSelection</code> <em><strong>boolean</strong></em> see <a href="Inspector.html#inspectSelection" class="tsd-kind-accessor">inspectSelection</a></li>
<li><code>includesOwnProperties</code> <em><strong>boolean</strong></em> see <a href="Inspector.html#includesOwnProperties" class="tsd-kind-accessor">includesOwnProperties</a></li>
<li><code>properties</code> <em><strong>Object</strong></em> see <a href="Inspector.html#properties" class="tsd-kind-accessor">properties</a></li>
<li><code>propertyModified</code> <em><strong>function(propertyName, newValue, inspector)</strong></em> see <a href="Inspector.html#propertyModified" class="tsd-kind-accessor">propertyModified</a></li>
<li><code>multipleSelection</code> <em><strong>boolean</strong></em> see <a href="Inspector.html#multipleSelection" class="tsd-kind-accessor">multipleSelection</a></li>
<li><code>showUnionProperties</code> <em><strong>boolean</strong></em> see <a href="Inspector.html#showUnionProperties" class="tsd-kind-accessor">showUnionProperties</a></li>
<li><code>showLimit</code> <em><strong>number</strong></em> see <a href="Inspector.html#showLimit" class="tsd-kind-accessor">showLimit</a></li>
</ul>
<p>Options for properties:</p>
<ul>
<li><code>show</code> <em><strong>boolean | function</strong></em> a boolean value to show or hide the property from the inspector, or a predicate function to show conditionally.</li>
<li><code>readOnly</code> <em><strong>boolean | function</strong></em> whether or not the property is read-only</li>
<li><code>type</code> <em><strong>string</strong></em> a string describing the data type. Supported values: "string|number|boolean|color|arrayofnumber|point|rect|size|spot|margin|select|date|datetime-local|time"</li>
<li><code>defaultValue</code> <em><strong>any</strong></em> a default value for the property. Defaults to the empty string.</li>
<li><code>choices</code> <em><strong>Array | function</strong></em> when type === "select", the Array of choices to use or a function that returns the Array of choices.</li>
</ul>
<p>Example usage of Inspector:</p>
<pre><code class="language-js"><span class="hl-1">const</span><span class="hl-2"> </span><span class="hl-3">inspector</span><span class="hl-2"> = </span><span class="hl-1">new</span><span class="hl-2"> </span><span class="hl-5">Inspector</span><span class="hl-2">(</span><span class="hl-6">"myInspector"</span><span class="hl-2">, </span><span class="hl-4">myDiagram</span><span class="hl-2">,</span><br/><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-4">includesOwnProperties:</span><span class="hl-2"> </span><span class="hl-1">false</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-4">properties:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-6">"key"</span><span class="hl-4">:</span><span class="hl-2"> { </span><span class="hl-4">show:</span><span class="hl-2"> </span><span class="hl-4">Inspector</span><span class="hl-2">.</span><span class="hl-4">showIfPresent</span><span class="hl-2">, </span><span class="hl-4">readOnly:</span><span class="hl-2"> </span><span class="hl-1">true</span><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-6">"comments"</span><span class="hl-4">:</span><span class="hl-2"> { </span><span class="hl-4">show:</span><span class="hl-2"> </span><span class="hl-4">Inspector</span><span class="hl-2">.</span><span class="hl-4">showIfNode</span><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-6">"LinkComments"</span><span class="hl-4">:</span><span class="hl-2"> { </span><span class="hl-4">show:</span><span class="hl-2"> </span><span class="hl-4">Inspector</span><span class="hl-2">.</span><span class="hl-4">showIfLink</span><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-6">"chosen"</span><span class="hl-4">:</span><span class="hl-2"> { </span><span class="hl-4">show:</span><span class="hl-2"> </span><span class="hl-4">Inspector</span><span class="hl-2">.</span><span class="hl-4">showIfNode</span><span class="hl-2">, </span><span class="hl-4">type:</span><span class="hl-2"> </span><span class="hl-6">"checkbox"</span><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-6">"state"</span><span class="hl-4">:</span><span class="hl-2"> { </span><span class="hl-4">show:</span><span class="hl-2"> </span><span class="hl-4">Inspector</span><span class="hl-2">.</span><span class="hl-4">showIfNode</span><span class="hl-2">, </span><span class="hl-4">type:</span><span class="hl-2"> </span><span class="hl-6">"select"</span><span class="hl-2">, </span><span class="hl-4">choices:</span><span class="hl-2"> [</span><span class="hl-6">"Stopped"</span><span class="hl-2">, </span><span class="hl-6">"Parked"</span><span class="hl-2">, </span><span class="hl-6">"Moving"</span><span class="hl-2">] }</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> });</span>
</code><button>Copy</button></pre>
<p>This is the basic HTML Structure that the Inspector creates within the given DIV element:</p>
<pre><code class="language-html"><span class="hl-10"><</span><span class="hl-11">div</span><span class="hl-2"> </span><span class="hl-12">id</span><span class="hl-2">=</span><span class="hl-13">"divid"</span><span class="hl-2"> </span><span class="hl-12">class</span><span class="hl-2">=</span><span class="hl-13">"inspector"</span><span class="hl-10">></span><br/><span class="hl-2"> </span><span class="hl-10"><</span><span class="hl-11">tr</span><span class="hl-10">></span><br/><span class="hl-2"> </span><span class="hl-10"><</span><span class="hl-11">td</span><span class="hl-10">></span><span class="hl-2">propertyName</span><span class="hl-10"></</span><span class="hl-11">td</span><span class="hl-10">></span><br/><span class="hl-2"> </span><span class="hl-10"><</span><span class="hl-11">td</span><span class="hl-10">><</span><span class="hl-11">input</span><span class="hl-2"> </span><span class="hl-12">value</span><span class="hl-2">=</span><span class="hl-13">propertyValue</span><span class="hl-2"> </span><span class="hl-10">/></</span><span class="hl-11">td</span><span class="hl-10">></span><br/><span class="hl-2"> </span><span class="hl-10"></</span><span class="hl-11">tr</span><span class="hl-10">></span><br/><span class="hl-2"> ...</span><br/><span class="hl-10"></</span><span class="hl-11">div</span><span class="hl-10">></span>
</code><button>Copy</button></pre>
<p>If you want to experiment with this extension, try the <a href="../../samples/DataInspector.html">Data Inspector</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="Inspector.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="Inspector.html#diagram" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>diagram</span></a>
<a href="Inspector.html#div" 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>div</span></a>
<a href="Inspector.html#includesOwnProperties" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>includes<wbr/>Own<wbr/>Properties</span></a>
<a href="Inspector.html#inspectSelection" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>inspect<wbr/>Selection</span></a>
<a href="Inspector.html#inspectedObject" 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>inspected<wbr/>Object</span></a>
<a href="Inspector.html#multipleSelection" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>multiple<wbr/>Selection</span></a>
<a href="Inspector.html#properties" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>properties</span></a>
<a href="Inspector.html#propertyModified" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>property<wbr/>Modified</span></a>
<a href="Inspector.html#showLimit" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>show<wbr/>Limit</span></a>
<a href="Inspector.html#showUnionProperties" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>show<wbr/>Union<wbr/>Properties</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="Inspector.html#buildPropertyRow" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>build<wbr/>Property<wbr/>Row</span></a>
<a href="Inspector.html#canEditProperty" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>can<wbr/>Edit<wbr/>Property</span></a>
<a href="Inspector.html#canShowProperty" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>can<wbr/>Show<wbr/>Property</span></a>
<a href="Inspector.html#inspectObject" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>inspect<wbr/>Object</span></a>
<a href="Inspector.html#showIfGroup" class="tsd-index-link"><svg class="static tsd-subicon" viewBox="0 0 28 28"><g id="subicon-S,#FF4DB8"><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="M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5-3.9 19.5m-2.1-19.5-3.9 19.5" 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-2048"></use></svg><span>show<wbr/>If<wbr/>Group</span></a>
<a href="Inspector.html#showIfLink" class="tsd-index-link"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>show<wbr/>If<wbr/>Link</span></a>
<a href="Inspector.html#showIfNode" class="tsd-index-link"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>show<wbr/>If<wbr/>Node</span></a>
<a href="Inspector.html#showIfPresent" class="tsd-index-link"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>show<wbr/>If<wbr/>Present</span></a>
</div></section></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_Inspector" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Inspector</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">divid</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">HTMLDivElement</span>, <span class="tsd-kind-parameter">diagram</span><span class="tsd-signature-symbol">: </span><a href="Diagram.html" class="tsd-signature-type tsd-kind-class">Diagram</a>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">{ </span><br/><span> </span>[<span class="tsd-kind-index-signature">index</span>: <span class="tsd-signature-type">string</span>]<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Inspector.html" class="tsd-signature-type tsd-kind-class">Inspector</a><a href="#constructor.new_Inspector" 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 an Inspector and sets up properties based on the options provided.
Also sets up change listeners on the Diagram so the Inspector stays up-to-date.</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">divid</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">HTMLDivElement</span></h5><div class="tsd-comment tsd-typography"><p>a string referencing the HTML ID of the to-be Inspector's div, or a reference to an HTMLDivElement</p>
</div></li><li><h5><span class="tsd-kind-parameter">diagram</span>: <a href="Diagram.html" class="tsd-signature-type tsd-kind-class">Diagram</a></h5><div class="tsd-comment tsd-typography"><p>a reference to a GoJS Diagram</p>
</div></li><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <span class="tsd-signature-symbol">{ </span><br/><span> </span>[<span class="tsd-kind-index-signature">index</span>: <span class="tsd-signature-type">string</span>]<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></h5><div class="tsd-comment tsd-typography"><p>an optional JS Object describing options for the inspector</p>
</div><ul class="tsd-parameters"><li class="tsd-parameter-index-signature"><h5><span class="tsd-signature-symbol">[</span><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><span class="tsd-signature-type">any</span></h5></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <a href="Inspector.html" class="tsd-signature-type tsd-kind-class">Inspector</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="diagram" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>diagram</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="Diagram.html" class="tsd-signature-type tsd-kind-class">Diagram</a></div><a href="#diagram" 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 <a href="Diagram.html" class="tsd-kind-class">go.Diagram</a> associated with this Inspector.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="div" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadOnly">Readonly</code><span>div</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HTMLDivElement</span></div><a href="#div" 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 HTMLElement containing the Inspector.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="includesOwnProperties" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>includes<wbr/>Own<wbr/>Properties</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#includesOwnProperties" 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 Inspector includes all properties currently on the inspected object.</p>
<p>The default value is true.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="inspectSelection" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>inspect<wbr/>Selection</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#inspectSelection" 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 Inspector automatically inspects the associated Diagram's selection.
When set to false, the Inspector won't show anything until <a href="Inspector.html#inspectObject" class="tsd-kind-method">inspectObject</a> is called.</p>
<p>The default value is true.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="inspectedObject" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadOnly">Readonly</code><span>inspected<wbr/>Object</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type tsd-kind-interface">ObjectData</a></div><a href="#inspectedObject" 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 object currently being inspected.</p>
<p>To set the inspected object, call <a href="Inspector.html#inspectObject" class="tsd-kind-method">inspectObject</a>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="multipleSelection" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>multiple<wbr/>Selection</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#multipleSelection" 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 Inspector displays properties for multiple selected objects or just the first.</p>
<p>The default value is false, meaning only the first item in the <a href="Diagram.html#selection" class="tsd-kind-accessor">go.Diagram.selection</a> is inspected.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="properties" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>properties</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type tsd-kind-interface">ObjectData</a></div><a href="#properties" 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 properties that the Inspector will inspect, maybe setting options for those properties.
The object should contain string: Object pairs representing propertyName: propertyOptions.
Can be used to include or exclude additional properties.</p>
<p>The default value is an empty Object.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="propertyModified" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>property<wbr/>Modified</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">a</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, <span class="tsd-kind-parameter">b</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, <span class="tsd-kind-parameter">c</span><span class="tsd-signature-symbol">: </span><a href="Inspector.html" class="tsd-signature-type tsd-kind-class">Inspector</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></div><a href="#propertyModified" 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 function to be called when a property is modified by the Inspector.
The first paremeter will be the property name, the second will be the new value, and the third will be a reference to this Inspector.</p>
<p>The default value is null, meaning nothing will be done.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="showLimit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>show<wbr/>Limit</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#showLimit" 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 many objects will be displayed when <a href="Inspector.html#multipleSelection" class="tsd-kind-accessor">multipleSelection</a> is true.</p>
<p>The default value is 0, meaning all selected objects will be displayed for a given property.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="showUnionProperties" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>show<wbr/>Union<wbr/>Properties</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#showUnionProperties" 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 Inspector displays the union or intersection of properties for multiple selected objects.</p>
<p>The default value is false, meaning the intersection of properties is inspected.</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="buildPropertyRow" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>build<wbr/>Property<wbr/>Row</span><a href="#buildPropertyRow" 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="buildPropertyRow.buildPropertyRow-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">build<wbr/>Property<wbr/>Row</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">propertyName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, <span class="tsd-kind-parameter">propertyValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HTMLTableRowElement</span><a href="#buildPropertyRow.buildPropertyRow-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 sets <code>inspectedProperties[propertyName]</code> and creates the HTML table row for a given property:</p>
<pre><code class="language-html"><span class="hl-10"><</span><span class="hl-11">tr</span><span class="hl-10">></span><br/><span class="hl-2"> </span><span class="hl-10"><</span><span class="hl-11">td</span><span class="hl-10">></span><span class="hl-2">propertyName</span><span class="hl-10"></</span><span class="hl-11">td</span><span class="hl-10">></span><br/><span class="hl-2"> </span><span class="hl-10"><</span><span class="hl-11">td</span><span class="hl-10">><</span><span class="hl-11">input</span><span class="hl-2"> </span><span class="hl-12">value</span><span class="hl-2">=</span><span class="hl-13">propertyValue</span><span class="hl-2"> </span><span class="hl-10">/></</span><span class="hl-11">td</span><span class="hl-10">></span><br/><span class="hl-10"></</span><span class="hl-11">tr</span><span class="hl-10">></span>
</code><button>Copy</button></pre>
<p>This method can be customized to change how an Inspector row is rendered.</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">propertyName</span>: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>the property name</p>
</div></li><li><h5><span class="tsd-kind-parameter">propertyValue</span>: <span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><p>the property value</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">HTMLTableRowElement</span></h4><p>the table row</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="canEditProperty" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>can<wbr/>Edit<wbr/>Property</span><a href="#canEditProperty" 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="canEditProperty.canEditProperty-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">can<wbr/>Edit<wbr/>Property</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">propertyName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, <span class="tsd-kind-parameter">propertyDesc</span><span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type tsd-kind-interface">ObjectData</a>, <span class="tsd-kind-parameter">inspectedObject</span><span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type tsd-kind-interface">ObjectData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#canEditProperty.canEditProperty-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 should be false if the given property should not be editable by the user.
Normally it only checks the value of "readOnly" on the property descriptor.</p>
<p>The default value is 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">propertyName</span>: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>the property name</p>
</div></li><li><h5><span class="tsd-kind-parameter">propertyDesc</span>: <a href="ObjectData.html" class="tsd-signature-type tsd-kind-interface">ObjectData</a></h5><div class="tsd-comment tsd-typography"><p>the property descriptor</p>
</div></li><li><h5><span class="tsd-kind-parameter">inspectedObject</span>: <a href="ObjectData.html" class="tsd-signature-type tsd-kind-interface">ObjectData</a></h5><div class="tsd-comment tsd-typography"><p>the data object</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>whether a particular property should be shown in this Inspector</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="canShowProperty" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>can<wbr/>Show<wbr/>Property</span><a href="#canShowProperty" 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="canShowProperty.canShowProperty-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">can<wbr/>Show<wbr/>Property</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">propertyName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, <span class="tsd-kind-parameter">propertyDesc</span><span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type tsd-kind-interface">ObjectData</a>, <span class="tsd-kind-parameter">inspectedObject</span><span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type tsd-kind-interface">ObjectData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#canShowProperty.canShowProperty-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 should be false if the given property should not be shown.
Normally it only checks the value of "show" on the property descriptor.</p>
<p>The default value is 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">propertyName</span>: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>the property name</p>
</div></li><li><h5><span class="tsd-kind-parameter">propertyDesc</span>: <a href="ObjectData.html" class="tsd-signature-type tsd-kind-interface">ObjectData</a></h5><div class="tsd-comment tsd-typography"><p>the property descriptor</p>
</div></li><li><h5><span class="tsd-kind-parameter">inspectedObject</span>: <a href="ObjectData.html" class="tsd-signature-type tsd-kind-interface">ObjectData</a></h5><div class="tsd-comment tsd-typography"><p>the data object</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>whether a particular property should be shown in this Inspector</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="inspectObject" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>inspect<wbr/>Object</span><a href="#inspectObject" 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="inspectObject.inspectObject-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">inspect<wbr/>Object</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">object</span><span class="tsd-signature-symbol">?: </span><a href="ObjectData.html" class="tsd-signature-type tsd-kind-interface">ObjectData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#inspectObject.inspectObject-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>Update the HTML state of this Inspector with the given object.</p>
<p>If passed an object, the Inspector will inspect that object.
If passed null, this will do nothing.
If no parameter is supplied, the <a href="Inspector.html#inspectedObject" class="tsd-kind-accessor">inspectedObject</a> will be set based on the value of <a href="Inspector.html#inspectSelection" class="tsd-kind-accessor">inspectSelection</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">object</span>: <a href="ObjectData.html" class="tsd-signature-type tsd-kind-interface">ObjectData</a></h5><div class="tsd-comment tsd-typography"><p>an optional argument, used when <a href="Inspector.html#inspectSelection" class="tsd-kind-accessor">inspectSelection</a> is false to
set <a href="Inspector.html#inspectedObject" class="tsd-kind-accessor">inspectedObject</a> and show and edit that object's properties.</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="showIfGroup" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>show<wbr/>If<wbr/>Group</span><a href="#showIfGroup" 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="showIfGroup.showIfGroup-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">show<wbr/>If<wbr/>Group</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">: </span><span class="tsd-signature-type">boolean</span><a href="#showIfGroup.showIfGroup-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 function can be used as a value for the <code>show</code> option for properties.
When used, the property will only be shown when inspecting a <a href="Group.html" class="tsd-kind-class">go.Group</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">part</span>: <a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a></h5><div class="tsd-comment tsd-typography"><p>the Part being inspected</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="showIfLink" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>show<wbr/>If<wbr/>Link</span><a href="#showIfLink" 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="showIfLink.showIfLink-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">show<wbr/>If<wbr/>Link</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">: </span><span class="tsd-signature-type">boolean</span><a href="#showIfLink.showIfLink-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 function can be used as a value for the <code>show</code> option for properties.
When used, the property will only be shown when inspecting a <a href="Link.html" class="tsd-kind-class">go.Link</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">part</span>: <a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a></h5><div class="tsd-comment tsd-typography"><p>the Part being inspected</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="showIfNode" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>show<wbr/>If<wbr/>Node</span><a href="#showIfNode" 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="showIfNode.showIfNode-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">show<wbr/>If<wbr/>Node</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">: </span><span class="tsd-signature-type">boolean</span><a href="#showIfNode.showIfNode-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 function can be used as a value for the <code>show</code> option for properties.
When used, the property will only be shown when inspecting a <a href="Node.html" class="tsd-kind-class">go.Node</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">part</span>: <a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a></h5><div class="tsd-comment tsd-typography"><p>the Part being inspected</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="showIfPresent" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>show<wbr/>If<wbr/>Present</span><a href="#showIfPresent" 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="showIfPresent.showIfPresent-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">show<wbr/>If<wbr/>Present</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-kind-parameter">propname</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#showIfPresent.showIfPresent-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 function can be used as a value for the <code>show</code> option for properties.
When used, the property will only be shown if present.
Useful for properties such as <code>key</code>, which will be shown on Nodes and Groups, but normally not on 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">part</span>: <a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a></h5><div class="tsd-comment tsd-typography"><p>the Part being inspected</p>
</div></li><li><h5><span class="tsd-kind-parameter">propname</span>: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>the property to check presence of</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</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="#diagram"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>diagram</span></a></li><li><a href="#div"><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>div</span></a></li><li><a href="#includesOwnProperties"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>includes<wbr/>Own<wbr/>Properties</span></a></li><li><a href="#inspectSelection"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>inspect<wbr/>Selection</span></a></li><li><a href="#inspectedObject"><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>inspected<wbr/>Object</span></a></li><li><a href="#multipleSelection"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>multiple<wbr/>Selection</span></a></li><li><a href="#properties"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>properties</span></a></li><li><a href="#propertyModified"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>property<wbr/>Modified</span></a></li><li><a href="#showLimit"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>show<wbr/>Limit</span></a></li><li><a href="#showUnionProperties"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>show<wbr/>Union<wbr/>Properties</span></a></li><li><a href="#buildPropertyRow"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>build<wbr/>Property<wbr/>Row</span></a></li><li><a href="#canEditProperty"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>can<wbr/>Edit<wbr/>Property</span></a></li><li><a href="#canShowProperty"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>can<wbr/>Show<wbr/>Property</span></a></li><li><a href="#inspectObject"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>inspect<wbr/>Object</span></a></li><li><a href="#showIfGroup"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>show<wbr/>If<wbr/>Group</span></a></li><li><a href="#showIfLink"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>show<wbr/>If<wbr/>Link</span></a></li><li><a href="#showIfNode"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>show<wbr/>If<wbr/>Node</span></a></li><li><a href="#showIfPresent"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>show<wbr/>If<wbr/>Present</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>