gojs
Version:
Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams
146 lines (145 loc) • 75.3 kB
HTML
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Layer | GoJS API</title><meta name="description" content="Documentation for GoJS API"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../../assets/css/style.css"/><link rel="stylesheet" href="../assets/style-tsd.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><nav id="navTop" class="w-full z-30 top-0 text-white bg-nwoods-primary"><div class="w-full container max-w-screen-lg mx-auto flex flex-wrap sm:flex-nowrap items-center justify-between mt-0 py-2"><div class="md:pl-4"><a class="text-white hover:text-white no-underline hover:no-underline\n font-bold text-2xl lg:text-4xl rounded-lg hover:bg-nwoods-secondary" href="../../index.html"><h1 class="my-0 p-1 leading-none">GoJS</h1></a></div><button id="topnavButton" class="rounded-lg sm:hidden focus:outline-none focus:ring" aria-label="Navigation"><svg fill="currentColor" viewBox="0 0 20 20" class="w-6 h-6"><path id="topnavOpen" fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM9 15a1 1 0 011-1h6a1 1 0 110 2h-6a1 1 0 01-1-1z" clip-rule="evenodd"></path><path id="topnavClosed" class="hidden" fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></button><div id="topnavList" class="hidden sm:block items-center w-auto mt-0 text-white p-0 z-20"><ul class="list-reset list-none font-semibold flex justify-end flex-wrap sm:flex-nowrap items-center px-0 pb-0"><li class="p-1 sm:p-0"><a class="topnav-link" href="../../learn/index.html">Learn</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../samples/index.html">Samples</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../intro/index.html">Intro</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../api/index.html">API</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/products/register.html">Register</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../download.html">Download</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://forum.nwoods.com/c/gojs/11">Forum</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/contact.html" target="_blank" rel="noopener" id="contactBtn">Contact</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/sales/index.html" target="_blank" rel="noopener" id="buyBtn">Buy</a></li></ul></div></div><hr class="border-b border-gray-600 opacity-50 my-0 py-0"/></nav><div class="tsd-page-header"><div class="tsd-page-toolbar"><div class="w-full max-w-screen-xl mx-auto px-2"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">GoJS API</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited"/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div></div><div class="tsd-page-title"><div class="w-full max-w-screen-xl mx-auto px-2"><div class="top-copyright"><b>GoJS</b>® Diagramming Components<br/>version 2.3.8<br/>by <a href="https://www.nwoods.com/">Northwoods Software®</a></div><div><h1>Class Layer </h1></div></div></div></header><div class="tsd w-full max-w-screen-xl mx-auto pb-4"><div class="row px-2 w-full"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">Layer</span></li></ul></section><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography">
<p>Layers are how named collections of <a href="Part.html">Part</a>s are drawn in front or behind other collections of Parts in a <a href="Diagram.html">Diagram</a>.
Layers can only contain <a href="Part.html">Part</a>s, such as <a href="Node.html">Node</a>s and <a href="Link.html">Link</a>s. They cannot hold <a href="GraphObject.html">GraphObject</a>s directly.</p>
<div><p>You put a Part into a Layer by assigning <a href="Part.html#layerName">Part.layerName</a> with the name of the Layer.
You can use data binding to initialize and remember a Part's layer's name.
You can change a Part's layer by modifying its <a href="Part.html#layerName">Part.layerName</a>, which changes its <a href="Part.html#layer">Part.layer</a>.</p>
<p>Each Diagram starts off with the following list of Layers:
"Grid", "Background", "" (the default layer), "Foreground", "Adornment", "Tool".
Parts are normally put in the default layer.
The "Grid", "Adornment", and "Tool" layers are considered <a href="Layer.html#isTemporary">isTemporary</a>.
Changes to objects in temporary layers are not recorded by the <a href="UndoManager.html">UndoManager</a>.
Parts in temporary layers are not selected and are not considered to be part of the document.
Objects in temporary layers do not receive click events unless you set their <a href="GraphObject.html#isActionable">GraphObject.isActionable</a> to true.
The "Grid" layer is the furthest back; it also contains "temporary" parts that cannot be selected.
Furthermore the "Grid" layer has <a href="Layer.html#pickable">pickable</a> set to false so that mouse or touch events
and calls to the "find..." methods do not even consider any parts in that layer.</p>
<p>Layers have many properties that control what actions users are permitted to perform involving the parts in the layer.
These properties are very much like the similarly named properties on <a href="Diagram.html">Diagram</a>.</p>
<h3>Z-ordering</h3>
<p>Layers are drawn and presented in order.
You can add your own layers by calling <a href="Diagram.html#addLayerBefore">Diagram.addLayerBefore</a> or <a href="Diagram.html#addLayerAfter">Diagram.addLayerAfter</a>
to insert a new layer at a particular place in the Z-order, or to re-order existing layers.
Use <a href="Diagram.html#findLayer">Diagram.findLayer</a> to get the Layer with a particular name.
<a href="Part.html">Part</a>s can be individually z-ordered within a layer by setting <a href="Part.html#zOrder">Part.zOrder</a>.</p>
</div></div></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="Layer.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="Layer.html#allowCopy" class="tsd-kind-icon">allow<wbr/>Copy</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layer.html#allowDelete" class="tsd-kind-icon">allow<wbr/>Delete</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layer.html#allowGroup" class="tsd-kind-icon">allow<wbr/>Group</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layer.html#allowLink" class="tsd-kind-icon">allow<wbr/>Link</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layer.html#allowMove" class="tsd-kind-icon">allow<wbr/>Move</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layer.html#allowRelink" class="tsd-kind-icon">allow<wbr/>Relink</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layer.html#allowReshape" class="tsd-kind-icon">allow<wbr/>Reshape</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layer.html#allowResize" class="tsd-kind-icon">allow<wbr/>Resize</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layer.html#allowRotate" class="tsd-kind-icon">allow<wbr/>Rotate</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layer.html#allowSelect" class="tsd-kind-icon">allow<wbr/>Select</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layer.html#allowTextEdit" class="tsd-kind-icon">allow<wbr/>Text<wbr/>Edit</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layer.html#allowUngroup" class="tsd-kind-icon">allow<wbr/>Ungroup</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="Layer.html#diagram" class="tsd-kind-icon">diagram</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layer.html#isInDocumentBounds" class="tsd-kind-icon">is<wbr/>In<wbr/>Document<wbr/>Bounds</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layer.html#isTemporary" class="tsd-kind-icon">is<wbr/>Temporary</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layer.html#name" class="tsd-kind-icon">name</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layer.html#opacity" class="tsd-kind-icon">opacity</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="Layer.html#parts" class="tsd-kind-icon">parts</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="Layer.html#partsBackwards" class="tsd-kind-icon">parts<wbr/>Backwards</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layer.html#pickable" class="tsd-kind-icon">pickable</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Layer.html#visible" class="tsd-kind-icon">visible</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><a href="Layer.html#findObjectAt" class="tsd-kind-icon">find<wbr/>Object<wbr/>At</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><a href="Layer.html#findObjectsAt" class="tsd-kind-icon">find<wbr/>Objects<wbr/>At</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><a href="Layer.html#findObjectsIn" class="tsd-kind-icon">find<wbr/>Objects<wbr/>In</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><a href="Layer.html#findObjectsNear" class="tsd-kind-icon">find<wbr/>Objects<wbr/>Near</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 id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> constructor<a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">new <wbr/>Layer<span class="tsd-signature-symbol">(</span>init<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="Layer.html" class="tsd-signature-type" data-tsd-kind="Class">Layer</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Layer.html" class="tsd-signature-type" data-tsd-kind="Class">Layer</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>This constructs an empty Layer; you should set the <a href="Layer.html#name">name</a> before adding the Layer to a Diagram.</p>
</div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> init: <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="Layer.html" class="tsd-signature-type" data-tsd-kind="Class">Layer</a><span class="tsd-signature-symbol">></span></h5><div class="tsd-comment tsd-typography">
<p>Optional properties to initialize.</p>
</div></li></ul><h4 class="tsd-returns-title">Returns <a href="Layer.html" class="tsd-signature-type" data-tsd-kind="Class">Layer</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="allowCopy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> allow<wbr/>Copy<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#allowCopy" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the user may copy objects in this layer.
The initial value is true.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="allowDelete" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> allow<wbr/>Delete<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#allowDelete" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the user may delete objects in this layer.
The initial value is true.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="allowGroup" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> allow<wbr/>Group<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#allowGroup" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the user may group parts together in this layer.
The initial value is true.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="allowLink" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> allow<wbr/>Link<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#allowLink" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the user may draw new links in this layer.
The initial value is true.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="allowMove" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> allow<wbr/>Move<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#allowMove" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the user may move objects in this layer.
The initial value is true.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="allowRelink" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> allow<wbr/>Relink<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#allowRelink" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the user may reconnect existing links in this layer.
The initial value is true.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="allowReshape" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> allow<wbr/>Reshape<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#allowReshape" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the user may reshape parts in this layer.
The initial value is true.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="allowResize" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> allow<wbr/>Resize<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#allowResize" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the user may resize parts in this layer.
The initial value is true.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="allowRotate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> allow<wbr/>Rotate<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#allowRotate" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the user may rotate parts in this layer.
The initial value is true.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="allowSelect" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> allow<wbr/>Select<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#allowSelect" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the user may select objects in this layer.
The initial value is true.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="allowTextEdit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> allow<wbr/>Text<wbr/>Edit<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#allowTextEdit" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the user may do in-place text editing in this layer.
The initial value is true.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="allowUngroup" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> allow<wbr/>Ungroup<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#allowUngroup" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the user may ungroup existing groups in this layer.
The initial value is true.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"><a id="diagram" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagReadOnly">Read-only</span> diagram<span class="tsd-signature-symbol">: </span><a href="Diagram.html" class="tsd-signature-type" data-tsd-kind="Class">Diagram</a><a href="#diagram" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>This read-only property returns the <a href="Diagram.html">Diagram</a> that is using this Layer.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="isInDocumentBounds" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> is<wbr/>In<wbr/>Document<wbr/>Bounds<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isInDocumentBounds" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether or not a layer is included in the documentBounds computation.
Default value is <code>true</code>. However, setting <a href="Layer.html#isTemporary">isTemporary</a> to <code>true</code> also sets this property to <code>false</code> before version 3.</p>
<dl class="tsd-comment-tags"><dt class="">since</dt><dd><p>2.2</p>
</dd><dt class="">see</dt><dd><p><a href="Layer.html#isTemporary">isTemporary</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="isTemporary" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> is<wbr/>Temporary<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isTemporary" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the objects in this layer are considered temporary.</p>
<div><p>Parts in temporary layers are not selectable,
and changes to Parts in temporary layers are not recorded in the <a href="UndoManager.html">UndoManager</a>.
Objects in temporary layers do not receive click events unless you set their <a href="GraphObject.html#isActionable">GraphObject.isActionable</a> to true.</p>
<p>Temporary layers are excluded from bounds calculations, with the exception of the "Tool" layer,
so that temporary objects created while dragging are included in the bounds.</p>
<p>Default value is false.</p>
<p>When this is set to true, <a href="Layer.html#isInDocumentBounds">isInDocumentBounds</a> on this layer is set to false.
You can override this behavior by setting <a href="Layer.html#isInDocumentBounds">isInDocumentBounds</a> after setting this property.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="Layer.html#isInDocumentBounds">isInDocumentBounds</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="name" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#name" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the name for this layer.
The initial value is an empty string, which is also the name of the default layer.
The name should be unique among the diagram's <a href="Diagram.html#layers">Diagram.layers</a>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="opacity" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> opacity<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#opacity" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the opacity for all parts in this layer.
The value must be between 0.0 (fully transparent) and 1.0 (no additional transparency).
This value is multiplicative with any existing transparency,
for instance from a <a href="Brush.html">Brush</a> or image transparency.
The default value is 1.</p>
<div><p>This property, unlike <a href="Layer.html#visible">visible</a>, does not change whether any objects are found by the "find..." methods.</p>
</div><dl class="tsd-comment-tags"><dt class="">since</dt><dd><p>1.1</p>
</dd><dt class="">see</dt><dd><p><a href="GraphObject.html#opacity">GraphObject.opacity</a>, <a href="Diagram.html#opacity">Diagram.opacity</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"><a id="parts" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagReadOnly">Read-only</span> parts<span class="tsd-signature-symbol">: </span><a href="Iterator.html" class="tsd-signature-type" data-tsd-kind="Interface">Iterator</a><span class="tsd-signature-symbol"><</span><a href="Part.html" class="tsd-signature-type" data-tsd-kind="Class">Part</a><span class="tsd-signature-symbol">></span><a href="#parts" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>This read-only property returns an iterator for this Layer's <a href="Part.html">Part</a>s.
The Parts can be <a href="Node.html">Node</a>s, <a href="Link.html">Link</a>s, <a href="Group.html">Group</a>s, <a href="Adornment.html">Adornment</a>s, or simple <a href="Part.html">Part</a>s.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"><a id="partsBackwards" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagReadOnly">Read-only</span> parts<wbr/>Backwards<span class="tsd-signature-symbol">: </span><a href="Iterator.html" class="tsd-signature-type" data-tsd-kind="Interface">Iterator</a><span class="tsd-signature-symbol"><</span><a href="Part.html" class="tsd-signature-type" data-tsd-kind="Class">Part</a><span class="tsd-signature-symbol">></span><a href="#partsBackwards" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>This read-only property returns a backwards iterator for this Layer's <a href="Part.html">Part</a>s,
for iterating over the parts in reverse order.
The Parts can be <a href="Node.html">Node</a>s, <a href="Link.html">Link</a>s, <a href="Group.html">Group</a>s, <a href="Adornment.html">Adornment</a>s, or simple <a href="Part.html">Part</a>s.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="pickable" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> pickable<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#pickable" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether methods such as <a href="Layer.html#findObjectAt">findObjectAt</a> find any of the objects in this layer.</p>
<div><p>The default value is true.
When this property is false, all of the "find..." methods will fail to find parts that are in this layer.</p>
<p>Note that setting pickable to false does not prevent users from selecting nodes.
It does prevent them from selecting nodes by clicking on them,
but does not prevent selection through other mechanisms such as the <a href="DragSelectingTool.html">DragSelectingTool</a> or
<a href="CommandHandler.html#selectAll">CommandHandler.selectAll</a> or calls to <a href="Diagram.html#select">Diagram.select</a>.</p>
<p>You can control whether individual GraphObjects are "hittable" by setting <a href="GraphObject.html#pickable">GraphObject.pickable</a>.</p>
</div><dl class="tsd-comment-tags"><dt class="">since</dt><dd><p>1.2</p>
</dd><dt class="">see</dt><dd><p><a href="GraphObject.html#pickable">GraphObject.pickable</a></p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="visible" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> visible<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#visible" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the user may view any of the objects in this layer.</p>
<div><p>The default value is true -- all visible Parts are drawn.
When this property is false, all of the "find..." methods will fail to find parts that are in this layer.</p>
</div><dl class="tsd-comment-tags"><dt class="">see</dt><dd><p><a href="GraphObject.html#visible">GraphObject.visible</a></p>
</dd></dl></div></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><a id="findObjectAt" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> find<wbr/>Object<wbr/>At<a href="#findObjectAt" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><li class="tsd-signature tsd-kind-icon">find<wbr/>Object<wbr/>At<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>p<span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type" data-tsd-kind="Class">Point</a>, navig<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">(</span>a<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span>, pred<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">(</span>a<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Find the front-most <a href="GraphObject.html">GraphObject</a> in this layer
at the given point in document coordinates.</p>
<div><p>If <a href="Layer.html#visible">visible</a> is false, this method will not find any objects in this layer.
However, <a href="Layer.html#opacity">opacity</a> does not affect this method.</p>
</div></div><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>T<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">></span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>p: <a href="Point.html" class="tsd-signature-type" data-tsd-kind="Class">Point</a></h5><div class="tsd-comment tsd-typography">
<p>A Point in document coordinates.</p>
</div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> navig: <span class="tsd-signature-symbol">(</span>a<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span></h5><div class="tsd-comment tsd-typography">
<p>A function taking a GraphObject and
returning a GraphObject, defaulting to the identity.</p>
</div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>a<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>a: <a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span></h4></li></ul></li></ul></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> pred: <span class="tsd-signature-symbol">(</span>a<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography">
<p>A function taking the GraphObject
returned by navig and returning true if that object should be returned,
defaulting to a predicate that always returns true.</p>
</div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>a<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</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"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>a: <span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span></h4><div><p>The first GraphObject in the Z-order, or else null.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><a id="findObjectsAt" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> find<wbr/>Objects<wbr/>At<a href="#findObjectsAt" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><li class="tsd-signature tsd-kind-icon">find<wbr/>Objects<wbr/>At<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">S</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>p<span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type" data-tsd-kind="Class">Point</a>, navig<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">(</span>a<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span>, pred<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">(</span>a<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">boolean</span>, coll<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">S</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">S</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Return a collection of the <a href="GraphObject.html">GraphObject</a>s of this layer
at the given point in document coordinates.</p>
<div><p>If <a href="Layer.html#visible">visible</a> is false, this method will not find any objects in this layer.
However, <a href="Layer.html#opacity">opacity</a> does not affect this method.</p>
</div></div><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>T<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">></span></h4></li><li><h4>S<span class="tsd-signature-symbol">: </span><a href="List.html" class="tsd-signature-type" data-tsd-kind="Class">List</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> | </span><a href="Set.html" class="tsd-signature-type" data-tsd-kind="Class">Set</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">></span> = <a href="Set.html" class="tsd-signature-type" data-tsd-kind="Class">Set</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">></span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>p: <a href="Point.html" class="tsd-signature-type" data-tsd-kind="Class">Point</a></h5><div class="tsd-comment tsd-typography">
<p>A Point in document coordinates.</p>
</div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> navig: <span class="tsd-signature-symbol">(</span>a<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span></h5><div class="tsd-comment tsd-typography">
<p>A function taking a GraphObject and
returning a GraphObject, defaulting to the identity.
If this function returns null, the given GraphObject will not be included in the results.</p>
</div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>a<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span cl