gojs
Version:
Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams
768 lines (767 loc) • 44.5 kB
HTML
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Inspector | GoJS API</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../assets/css/bootstrap.min.css">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<!-- non-fixed navbar -->
<nav id="non-fixed-nav" class="navbar navbar-inverse navbar-top">
<div class="container-fluid">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#navbar">
<a id="toplogo" class="navbar-brand" href="../../index.html">GoJS</a>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
</div>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="../../index.html">Home</a></li>
<li><a href="../../learn/index.html">Learn</a></li>
<li><a href="../../samples/index.html">Samples</a></li>
<li><a href="../../intro/index.html">Intro</a></li>
<li><a href="../../api/index.html" target="api">API</a></li>
<li><a href="https://www.nwoods.com/components/evalform.htm">Register</a></li>
<li><a href="../../download.html">Download</a></li>
<li><a href="https://forum.nwoods.com/c/gojs">Forum</a></li>
<li><a href="https://www.nwoods.com/contact.html" onclick="ga('send','event','Outbound Link','click','contact');">Contact</a></li>
<li class="buy"><a href="https://www.nwoods.com/sales/index.html" onclick="ga('send','event','Outbound Link','click','buy');">Buy</a></li>
<li class="activate"><a href="https://www.nwoods.com/app/activate.aspx?sku=gojs">Activate</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="tsd-page-header">
<div class="tsd-page-toolbar">
<div class="container-fluid plr15">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">GoJS API</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container-fluid plr15">
<div class="top-copyright">
<!--<b>GoJS</b>® Diagramming Components<br/>version <br/>version 2.1.18 for TypeScript/HTML<br/>by <a href="https://www.nwoods.com/">Northwoods Software®</a>-->
<b>GoJS</b>® Diagramming Components<br/>version 2.1.18<br/>by <a href="https://www.nwoods.com/">Northwoods Software®</a>
</div>
<div>
<h1>Class Inspector</h1>
</div>
</div>
</div>
</div>
</header>
<div class="container-fluid container-main plr15">
<div class="row">
<div class="col-8 col-content">
<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.
Extensions can be found in the GoJS kit under the <code>extensions</code> or <code>extensionsTS</code> folders.
See the <a href="../../intro/extensions.html">Extensions intro page</a> for more information.
</p>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="target">Inspector</span>
</li>
</ul>
</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> <strong><em>string</em></strong> a string referencing the HTML ID of the to-be inspector's div</li>
<li><code>diagram</code> <strong><em>Diagram</em></strong> a reference to a GoJS Diagram</li>
<li><code>options</code> <strong><em>Object</em></strong> an optional JS Object describing options for the inspector</li>
</ul>
<p>Options:</p>
<ul>
<li><code>inspectSelection</code> <strong><em>boolean</em></strong> see <a href="Inspector.html#inspectSelection">inspectSelection</a></li>
<li><code>includesOwnProperties</code> <strong><em>boolean</em></strong> see <a href="Inspector.html#includesOwnProperties">includesOwnProperties</a></li>
<li><code>properties</code> <strong><em>Object</em></strong> see <a href="Inspector.html#properties">properties</a></li>
<li><code>propertyModified</code> <strong><em>function(propertyName, newValue, inspector)</em></strong> see <a href="Inspector.html#propertyModified">propertyModified</a></li>
<li><code>multipleSelection</code> <strong><em>boolean</em></strong> see <a href="Inspector.html#multipleSelection">multipleSelection</a></li>
<li><code>showUnionProperties</code> <strong><em>boolean</em></strong> see <a href="Inspector.html#showUnionProperties">showUnionProperties</a></li>
<li><code>showLimit</code> <strong><em>number</em></strong> see <a href="Inspector.html#showLimit">showLimit</a></li>
</ul>
<p>Options for properties:</p>
<ul>
<li><code>show</code> <strong><em>boolean | function</em></strong> a boolean value to show or hide the property from the inspector, or a predicate function to show conditionally.</li>
<li><code>readOnly</code> <strong><em>boolean | function</em></strong> whether or not the property is read-only</li>
<li><code>type</code> <strong><em>string</em></strong> a string describing the data type. Supported values: "string|number|boolean|color|arrayofnumber|point|rect|size|spot|margin|select"</li>
<li><code>defaultValue</code> <strong><em>any</em></strong> a default value for the property. Defaults to the empty string.</li>
<li><code>choices</code> <strong><em>Array | function</em></strong> 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="hljs js"><span class="hljs-keyword">var</span> inspector = <span class="hljs-keyword">new</span> Inspector(<span class="hljs-string">"myInspector"</span>, myDiagram,
{
<span class="hljs-attr">includesOwnProperties</span>: <span class="hljs-literal">false</span>,
<span class="hljs-attr">properties</span>: {
<span class="hljs-string">"key"</span>: { <span class="hljs-attr">show</span>: Inspector.showIfPresent, <span class="hljs-attr">readOnly</span>: <span class="hljs-literal">true</span> },
<span class="hljs-string">"comments"</span>: { <span class="hljs-attr">show</span>: Inspector.showIfNode },
<span class="hljs-string">"LinkComments"</span>: { <span class="hljs-attr">show</span>: Inspector.showIfLink },
<span class="hljs-string">"chosen"</span>: { <span class="hljs-attr">show</span>: Inspector.showIfNode, <span class="hljs-attr">type</span>: <span class="hljs-string">"checkbox"</span> },
<span class="hljs-string">"state"</span>: { <span class="hljs-attr">show</span>: Inspector.showIfNode, <span class="hljs-attr">type</span>: <span class="hljs-string">"select"</span>, <span class="hljs-attr">choices</span>: [<span class="hljs-string">"Stopped"</span>, <span class="hljs-string">"Parked"</span>, <span class="hljs-string">"Moving"</span>] }
}
});</code></pre>
<p>This is the basic HTML Structure that the Inspector creates within the given DIV element:</p>
<pre><code class="hljs html"><span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"divid"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"inspector"</span>></span>
<span class="hljs-tag"><<span class="hljs-name">tr</span>></span>
<span class="hljs-tag"><<span class="hljs-name">td</span>></span>propertyName<span class="hljs-tag"></<span class="hljs-name">td</span>></span>
<span class="hljs-tag"><<span class="hljs-name">td</span>></span><span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">value</span>=<span class="hljs-string">propertyValue</span> /></span><span class="hljs-tag"></<span class="hljs-name">td</span>></span>
<span class="hljs-tag"></<span class="hljs-name">tr</span>></span>
...
<span class="hljs-tag"></<span class="hljs-name">div</span>></span></code></pre>
<p>If you want to experiment with this extension, try the <a href="../../extensionsTS/DataInspector.html">Data Inspector</a> sample.</p>
</div>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Constructors</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-constructor tsd-parent-kind-class"><a href="Inspector.html#constructor" class="tsd-kind-icon">constructor</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Inspector.html#diagram" class="tsd-kind-icon">diagram</a></li>
<li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="Inspector.html#div" class="tsd-kind-icon">div</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Inspector.html#includesOwnProperties" class="tsd-kind-icon">includes<wbr>Own<wbr>Properties</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Inspector.html#inspectSelection" class="tsd-kind-icon">inspect<wbr>Selection</a></li>
<li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="Inspector.html#inspectedObject" class="tsd-kind-icon">inspected<wbr>Object</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Inspector.html#multipleSelection" class="tsd-kind-icon">multiple<wbr>Selection</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Inspector.html#properties" class="tsd-kind-icon">properties</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Inspector.html#propertyModified" class="tsd-kind-icon">property<wbr>Modified</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Inspector.html#showLimit" class="tsd-kind-icon">show<wbr>Limit</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Inspector.html#showUnionProperties" class="tsd-kind-icon">show<wbr>Union<wbr>Properties</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Methods</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Inspector.html#buildPropertyRow" class="tsd-kind-icon">build<wbr>Property<wbr>Row</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Inspector.html#canEditProperty" class="tsd-kind-icon">can<wbr>Edit<wbr>Property</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Inspector.html#canShowProperty" class="tsd-kind-icon">can<wbr>Show<wbr>Property</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Inspector.html#inspectObject" class="tsd-kind-icon">inspect<wbr>Object</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="Inspector.html#static-showIfGroup" class="tsd-kind-icon">show<wbr>IfGroup</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="Inspector.html#static-showIfLink" class="tsd-kind-icon">show<wbr>IfLink</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="Inspector.html#static-showIfNode" class="tsd-kind-icon">show<wbr>IfNode</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="Inspector.html#static-showIfPresent" class="tsd-kind-icon">show<wbr>IfPresent</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Constructors</h2>
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class">
<a name="constructor" class="tsd-anchor"></a>
<h3>
constructor
</h3>
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">new <wbr>Inspector<span class="tsd-signature-symbol">(</span>divid<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, diagram<span class="tsd-signature-symbol">: </span><a href="Diagram.html" class="tsd-signature-type">Diagram</a>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Inspector.html" class="tsd-signature-type">Inspector</a></li>
</ul>
<ul class="tsd-descriptions">
<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>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>divid: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>a string referencing the HTML ID of the to-be Inspector's div</p>
</div>
</li>
<li>
<h5>diagram: <a href="Diagram.html" class="tsd-signature-type">Diagram</a></h5>
<div class="tsd-comment tsd-typography">
<p>a reference to a GoJS Diagram</p>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <span class="tsd-signature-type">object</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>index: <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>
<h4 class="tsd-returns-title">Returns <a href="Inspector.html" class="tsd-signature-type">Inspector</a></h4>
</li>
</ul>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
<a name="diagram" class="tsd-anchor"></a>
<h3>
diagram
<span class="tsd-signature-symbol">: </span><a href="Diagram.html" class="tsd-signature-type">Diagram</a> </h3>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>Gets or sets the <a href="Diagram.html">Diagram</a> associated with this Inspector.</p>
</div>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class">
<a name="div" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagReadOnly">Read-only</span>
div
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HTMLDivElement</span> </h3>
<ul class="tsd-descriptions">
<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 tsd-kind-accessor tsd-parent-kind-class">
<a name="includesOwnProperties" class="tsd-anchor"></a>
<h3>
includes<wbr>Own<wbr>Properties
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span> </h3>
<ul class="tsd-descriptions">
<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 tsd-kind-accessor tsd-parent-kind-class">
<a name="inspectSelection" class="tsd-anchor"></a>
<h3>
inspect<wbr>Selection
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span> </h3>
<ul class="tsd-descriptions">
<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">inspectObject</a> is called.</p>
<p>The default value is true.</p>
</div>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class">
<a name="inspectedObject" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagReadOnly">Read-only</span>
inspected<wbr>Object
<span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type">ObjectData</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span> </h3>
<ul class="tsd-descriptions">
<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">inspectObject</a>.</p>
</div>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
<a name="multipleSelection" class="tsd-anchor"></a>
<h3>
multiple<wbr>Selection
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span> </h3>
<ul class="tsd-descriptions">
<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">Diagram.selection</a> is inspected.</p>
</div>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
<a name="properties" class="tsd-anchor"></a>
<h3>
properties
<span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type">ObjectData</a> </h3>
<ul class="tsd-descriptions">
<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 represnting 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 tsd-kind-accessor tsd-parent-kind-class">
<a name="propertyModified" class="tsd-anchor"></a>
<h3>
property<wbr>Modified
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">function</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">a</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">b</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">c</span><span class="tsd-signature-symbol">: </span><a href="Inspector.html" class="tsd-signature-type">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><span class="tsd-signature-type">null</span> </h3>
<ul class="tsd-descriptions">
<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 tsd-kind-accessor tsd-parent-kind-class">
<a name="showLimit" class="tsd-anchor"></a>
<h3>
show<wbr>Limit
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span> </h3>
<ul class="tsd-descriptions">
<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">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 tsd-kind-accessor tsd-parent-kind-class">
<a name="showUnionProperties" class="tsd-anchor"></a>
<h3>
show<wbr>Union<wbr>Properties
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span> </h3>
<ul class="tsd-descriptions">
<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 tsd-kind-method tsd-parent-kind-class">
<a name="buildPropertyRow" class="tsd-anchor"></a>
<h3>
build<wbr>Property<wbr>Row
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">build<wbr>Property<wbr>Row<span class="tsd-signature-symbol">(</span>propertyName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, propertyValue<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></li>
</ul>
<ul class="tsd-descriptions">
<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="hljs html"><span class="hljs-tag"><<span class="hljs-name">tr</span>></span>
<span class="hljs-tag"><<span class="hljs-name">td</span>></span>propertyName<span class="hljs-tag"></<span class="hljs-name">td</span>></span>
<span class="hljs-tag"><<span class="hljs-name">td</span>></span><span class="hljs-tag"><<span class="hljs-name">input</span> <span class="hljs-attr">value</span>=<span class="hljs-string">propertyValue</span> /></span><span class="hljs-tag"></<span class="hljs-name">td</span>></span>
<span class="hljs-tag"></<span class="hljs-name">tr</span>></span></code></pre>
<p>This method can be customized to change how an Inspector row is rendered.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>propertyName: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>the property name</p>
</div>
</li>
<li>
<h5>propertyValue: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>the property value</p>
</div>
</li>
</ul>
<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 tsd-kind-method tsd-parent-kind-class">
<a name="canEditProperty" class="tsd-anchor"></a>
<h3>
can<wbr>Edit<wbr>Property
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Edit<wbr>Property<span class="tsd-signature-symbol">(</span>propertyName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, propertyDesc<span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type">ObjectData</a>, inspectedObject<span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type">ObjectData</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<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>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>propertyName: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>the property name</p>
</div>
</li>
<li>
<h5>propertyDesc: <a href="ObjectData.html" class="tsd-signature-type">ObjectData</a></h5>
<div class="tsd-comment tsd-typography">
<p>the property descriptor</p>
</div>
</li>
<li>
<h5>inspectedObject: <a href="ObjectData.html" class="tsd-signature-type">ObjectData</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span></h5>
<div class="tsd-comment tsd-typography">
<p>the data object</p>
</div>
</li>
</ul>
<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 tsd-kind-method tsd-parent-kind-class">
<a name="canShowProperty" class="tsd-anchor"></a>
<h3>
can<wbr>Show<wbr>Property
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Show<wbr>Property<span class="tsd-signature-symbol">(</span>propertyName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, propertyDesc<span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type">ObjectData</a>, inspectedObject<span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type">ObjectData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<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>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>propertyName: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>the property name</p>
</div>
</li>
<li>
<h5>propertyDesc: <a href="ObjectData.html" class="tsd-signature-type">ObjectData</a></h5>
<div class="tsd-comment tsd-typography">
<p>the property descriptor</p>
</div>
</li>
<li>
<h5>inspectedObject: <a href="ObjectData.html" class="tsd-signature-type">ObjectData</a></h5>
<div class="tsd-comment tsd-typography">
<p>the data object</p>
</div>
</li>
</ul>
<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 tsd-kind-method tsd-parent-kind-class">
<a name="inspectObject" class="tsd-anchor"></a>
<h3>
inspect<wbr>Object
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">inspect<wbr>Object<span class="tsd-signature-symbol">(</span>object<span class="tsd-signature-symbol">?: </span><a href="ObjectData.html" class="tsd-signature-type">ObjectData</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>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">inspectedObject</a> will be set based on the value of <a href="Inspector.html#inspectSelection">inspectSelection</a>.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> object: <a href="ObjectData.html" class="tsd-signature-type">ObjectData</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span></h5>
<div class="tsd-comment tsd-typography">
<p>an optional argument, used when <a href="Inspector.html#inspectSelection">inspectSelection</a> is false to
set <a href="Inspector.html#inspectedObject">inspectedObject</a> and show and edit that object's properties.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static">
<a name="static-showIfGroup" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagStatic">Static</span>
show<wbr>IfGroup
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static">
<li class="tsd-signature tsd-kind-icon">show<wbr>IfGroup<span class="tsd-signature-symbol">(</span>part<span class="tsd-signature-symbol">: </span><a href="Part.html" class="tsd-signature-type">Part</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<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">Group</a>.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>part: <a href="Part.html" class="tsd-signature-type">Part</a></h5>
<div class="tsd-comment tsd-typography">
<p>the Part being inspected</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static">
<a name="static-showIfLink" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagStatic">Static</span>
show<wbr>IfLink
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static">
<li class="tsd-signature tsd-kind-icon">show<wbr>IfLink<span class="tsd-signature-symbol">(</span>part<span class="tsd-signature-symbol">: </span><a href="Part.html" class="tsd-signature-type">Part</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<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">Link</a>.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>part: <a href="Part.html" class="tsd-signature-type">Part</a></h5>
<div class="tsd-comment tsd-typography">
<p>the Part being inspected</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static">
<a name="static-showIfNode" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagStatic">Static</span>
show<wbr>IfNode
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static">
<li class="tsd-signature tsd-kind-icon">show<wbr>IfNode<span class="tsd-signature-symbol">(</span>part<span class="tsd-signature-symbol">: </span><a href="Part.html" class="tsd-signature-type">Part</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<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">Node</a>.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>part: <a href="Part.html" class="tsd-signature-type">Part</a></h5>
<div class="tsd-comment tsd-typography">
<p>the Part being inspected</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static">
<a name="static-showIfPresent" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagStatic">Static</span>
show<wbr>IfPresent
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static">
<li class="tsd-signature tsd-kind-icon">show<wbr>IfPresent<span class="tsd-signature-symbol">(</span>data<span class="tsd-signature-symbol">: </span><a href="Part.html" class="tsd-signature-type">Part</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span>, propname<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></li>
</ul>
<ul class="tsd-descriptions">
<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>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>data: <a href="Part.html" class="tsd-signature-type">Part</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span></h5>
</li>
<li>
<h5>propname: <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>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
</li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../index.html"><em>GoJS <wbr>Class <wbr>Index</em></a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
</ul>
<ul class="current">
<li class="current tsd-kind-class tsd-is-extension">
<a href="Inspector.html" class="tsd-kind-icon">Inspector</a>
<ul>
<li class=" tsd-kind-constructor tsd-parent-kind-class">
<a href="Inspector.html#constructor" class="tsd-kind-icon">constructor</a>
</li>
<li class=" tsd-kind-accessor tsd-parent-kind-class">
<a href="Inspector.html#diagram" class="tsd-kind-icon">diagram</a>
</li>
<li class=" tsd-kind-get-signature tsd-parent-kind-class">
<a href="Inspector.html#div" class="tsd-kind-icon">div</a>
</li>
<li class=" tsd-kind-accessor tsd-parent-kind-class">
<a href="Inspector.html#includesOwnProperties" class="tsd-kind-icon">includes<wbr>Own<wbr>Properties</a>
</li>
<li class=" tsd-kind-accessor tsd-parent-kind-class">
<a href="Inspector.html#inspectSelection" class="tsd-kind-icon">inspect<wbr>Selection</a>
</li>
<li class=" tsd-kind-get-signature tsd-parent-kind-class">
<a href="Inspector.html#inspectedObject" class="tsd-kind-icon">inspected<wbr>Object</a>
</li>
<li class=" tsd-kind-accessor tsd-parent-kind-class">
<a href="Inspector.html#multipleSelection" class="tsd-kind-icon">multiple<wbr>Selection</a>
</li>
<li class=" tsd-kind-accessor tsd-parent-kind-class">
<a href="Inspector.html#properties" class="tsd-kind-icon">properties</a>
</li>
<li class=" tsd-kind-accessor tsd-parent-kind-class">
<a href="Inspector.html#propertyModified" class="tsd-kind-icon">property<wbr>Modified</a>
</li>
<li class=" tsd-kind-accessor tsd-parent-kind-class">
<a href="Inspector.html#showLimit" class="tsd-kind-icon">show<wbr>Limit</a>
</li>
<li class=" tsd-kind-accessor tsd-parent-kind-class">
<a href="Inspector.html#showUnionProperties" class="tsd-kind-icon">show<wbr>Union<wbr>Properties</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="Inspector.html#buildPropertyRow" class="tsd-kind-icon">build<wbr>Property<wbr>Row</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="Inspector.html#canEditProperty" class="tsd-kind-icon">can<wbr>Edit<wbr>Property</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="Inspector.html#canShowProperty" class="tsd-kind-icon">can<wbr>Show<wbr>Property</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="Inspector.html#inspectObject" class="tsd-kind-icon">inspect<wbr>Object</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static">
<a href="Inspector.html#static-showIfGroup" class="tsd-kind-icon">show<wbr>IfGroup</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static">
<a href="Inspector.html#static-showIfLink" class="tsd-kind-icon">show<wbr>IfLink</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static">
<a href="Inspector.html#static-showIfNode" class="tsd-kind-icon">show<wbr>IfNode</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static">
<a href="Inspector.html#static-showIfPresent" class="tsd-kind-icon">show<wbr>IfPresent</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
</ul>
</nav>
</div>
</div>
</div>
<div class="container-fluid bottom-copyright plr15">
Copyright © 1998-2020 by Northwoods Software Corporation.
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
<script src="../../assets/js/api.js"></script>
<script src="../../assets/js/bootstrap.min.js"></script>
<script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-1506307-5', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>