UNPKG

create-gojs-kit

Version:

A CLI for downloading GoJS samples, extensions, and docs

390 lines 109 kB
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><link rel="stylesheet" href="../../assets/css/style.css"/><link rel="preconnect" href="https://rsms.me/"/><link rel="stylesheet" href="https://rsms.me/inter/inter.css"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>DraggingTool | 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="DraggingTool.html">DraggingTool</a></li></ul><h1 class="flex items-center">Class DraggingTool</h1></div><div class="text-xs"><b>GoJS</b>® Diagramming Components<br/>version 3.1.0<br/>by <a href="https://nwoods.com/">Northwoods Software®</a></div></div></div><section class="tsd-panel tsd-hierarchy"><h4>Hierarchy (<a class="link" href="../hierarchy.html#DraggingTool">view full</a>)</h4><ul class="tsd-hierarchy"><li><a href="Tool.html" class="tsd-signature-type tsd-kind-class">Tool</a><ul class="tsd-hierarchy"><li><span class="target">DraggingTool</span><ul class="tsd-hierarchy"><li><a href="GuidedDraggingTool.html" class="tsd-signature-type tsd-kind-class">GuidedDraggingTool</a></li><li><a href="NonRealtimeDraggingTool.html" class="tsd-signature-type tsd-kind-class">NonRealtimeDraggingTool</a></li></ul></li></ul></li></ul></section><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>The DraggingTool is used to move or copy selected parts with the mouse.
This sets the <a href="Part.html#location" class="tsd-kind-accessor">Part.location</a> property; you may want to save the location to the model
by using a TwoWay <a href="Binding.html" class="tsd-kind-class">Binding</a> on the &quot;location&quot; property in your Parts/Nodes/Groups templates.</p>
<p>Dragging the selection moves parts for which <a href="Part.html#canMove" class="tsd-kind-method">Part.canMove</a> is true.
If the user holds down the Control key (Option key on Mac), this tool will make a copy of the parts being dragged,
for those parts for which <a href="Part.html#canCopy" class="tsd-kind-method">Part.canCopy</a> is true.</p>
<p>When the drag starts it calls <a href="DraggingTool.html#computeEffectiveCollection" class="tsd-kind-method">computeEffectiveCollection</a> to find the actual collection
of <a href="Part.html" class="tsd-kind-class">Part</a>s to be dragged.
Normally this collection includes not only the <a href="Diagram.html#selection" class="tsd-kind-accessor">Diagram.selection</a>, but also parts that belong
to those selected parts, such as members of groups.
If <a href="DraggingTool.html#dragsTree" class="tsd-kind-accessor">dragsTree</a> is true, the effective collection also includes all of the nodes and links that
constitute the subtree starting from selected nodes.
The result of <a href="DraggingTool.html#computeEffectiveCollection" class="tsd-kind-method">computeEffectiveCollection</a> is not a <a href="Set.html" class="tsd-kind-class">go.Set</a> but a <a href="Map.html" class="tsd-kind-class">go.Map</a>
which remembers the original <a href="Part.html#location" class="tsd-kind-accessor">Part.location</a> for all of the dragged parts.
This map is saved as the value of <a href="DraggingTool.html#draggedParts" class="tsd-kind-accessor">draggedParts</a>.</p>
<p>During the drag if the user holds down the Control/Option key this tool makes a copy of the <a href="DraggingTool.html#draggedParts" class="tsd-kind-accessor">draggedParts</a>
and proceeds to drag it around.
(It only copies the <a href="Diagram.html#selection" class="tsd-kind-accessor">Diagram.selection</a>, not the whole effective collection,
if <a href="DraggingTool.html#copiesEffectiveCollection" class="tsd-kind-accessor">copiesEffectiveCollection</a> is false.)
The collection of copied parts is held by <a href="DraggingTool.html#copiedParts" class="tsd-kind-accessor">copiedParts</a>.
It too is a <a href="Map.html" class="tsd-kind-class">go.Map</a> remembering the original locations of the parts.
<a href="DraggingTool.html#copiedParts" class="tsd-kind-accessor">copiedParts</a> will be null when this tool is moving (not copying) at the moment.</p>
<p>Each Part&#39;s movement is limited by the <a href="Diagram.html#computeMove" class="tsd-kind-method">Diagram.computeMove</a> method.
By default it limits the <a href="Part.html#location" class="tsd-kind-accessor">Part.location</a> to be within the bounds given by <a href="Part.html#minLocation" class="tsd-kind-accessor">Part.minLocation</a> and <a href="Part.html#maxLocation" class="tsd-kind-accessor">Part.maxLocation</a>.
(Those default to minus Infinity to plus Infinity.)
As a further convenience, the value of NaN in minLocation and maxLocation cause <a href="Diagram.html#computeMove" class="tsd-kind-method">Diagram.computeMove</a> to use the
part&#39;s current location.
So, for example, an easy way to declare that the user may only drag a node horizontally is to just set:</p>
<pre><code class="language-js"><span class="hl-1">new</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-5">Node</span><span class="hl-2">(</span><br/><span class="hl-2">  . . .</span><br/><span class="hl-2">  { </span><span class="hl-4">minLocation:</span><span class="hl-2"> </span><span class="hl-1">new</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-5">Point</span><span class="hl-2">(-</span><span class="hl-1">Infinity</span><span class="hl-2">, </span><span class="hl-1">NaN</span><span class="hl-2">), </span><span class="hl-4">maxLocation:</span><span class="hl-2"> </span><span class="hl-1">new</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-5">Point</span><span class="hl-2">(</span><span class="hl-1">Infinity</span><span class="hl-2">, </span><span class="hl-1">NaN</span><span class="hl-2">) },</span><br/><span class="hl-2">  . . .</span><br/><span class="hl-2">)</span>
</code><button>Copy</button></pre>
<p>If you set <a href="DraggingTool.html#isGridSnapEnabled" class="tsd-kind-accessor">isGridSnapEnabled</a> to true, dragged or copied parts will be snapped to points on a grid.
The snapping occurs continuously during a drag unless you set <a href="DraggingTool.html#isGridSnapRealtime" class="tsd-kind-accessor">isGridSnapRealtime</a> to false.
Normally the grid points come from the <a href="Diagram.html#grid" class="tsd-kind-accessor">Diagram.grid</a>, even if that grid is not <a href="GraphObject.html#visible" class="tsd-kind-accessor">GraphObject.visible</a>.
However you can override those grid&#39;s properties for the snapping grid cell size and offset
by setting the properties here: <a href="DraggingTool.html#gridSnapCellSize" class="tsd-kind-accessor">gridSnapCellSize</a> and <a href="DraggingTool.html#gridSnapOrigin" class="tsd-kind-accessor">gridSnapOrigin</a>.
This computes the point to snap to for each dragged part.
The resulting point is used as the new <a href="Part.html#location" class="tsd-kind-accessor">Part.location</a>.</p>
<p>For the most general control over where a part may be dragged, either set the <a href="Part.html#dragComputation" class="tsd-kind-accessor">Part.dragComputation</a> property
or override <a href="Diagram.html#computeMove" class="tsd-kind-method">Diagram.computeMove</a>.
For the common case of wanting to keep member nodes within the <a href="Group.html" class="tsd-kind-class">Group</a> that they are members of,
you can do something like:</p>
<pre><code class="language-js"><span class="hl-2"> </span><span class="hl-0">// this is a Part.dragComputation function for limiting where a Node may be dragged</span><br/><span class="hl-2">  </span><span class="hl-1">function</span><span class="hl-2"> </span><span class="hl-5">stayInGroup</span><span class="hl-2">(</span><span class="hl-4">part</span><span class="hl-2">, </span><span class="hl-4">pt</span><span class="hl-2">, </span><span class="hl-4">gridpt</span><span class="hl-2">) {</span><br/><span class="hl-2">    </span><span class="hl-0">// don&#39;t constrain top-level nodes</span><br/><span class="hl-2">    </span><span class="hl-1">const</span><span class="hl-2"> </span><span class="hl-3">grp</span><span class="hl-2"> = </span><span class="hl-4">part</span><span class="hl-2">.</span><span class="hl-4">containingGroup</span><span class="hl-2">;</span><br/><span class="hl-2">    </span><span class="hl-8">if</span><span class="hl-2"> (</span><span class="hl-4">grp</span><span class="hl-2"> === </span><span class="hl-1">null</span><span class="hl-2">) </span><span class="hl-8">return</span><span class="hl-2"> </span><span class="hl-4">pt</span><span class="hl-2">;</span><br/><span class="hl-2">    </span><span class="hl-0">// try to stay within the background Shape of the Group</span><br/><span class="hl-2">    </span><span class="hl-1">const</span><span class="hl-2"> </span><span class="hl-3">back</span><span class="hl-2"> = </span><span class="hl-4">grp</span><span class="hl-2">.</span><span class="hl-4">resizeObject</span><span class="hl-2">;</span><br/><span class="hl-2">    </span><span class="hl-8">if</span><span class="hl-2"> (</span><span class="hl-4">back</span><span class="hl-2"> === </span><span class="hl-1">null</span><span class="hl-2">) </span><span class="hl-8">return</span><span class="hl-2"> </span><span class="hl-4">pt</span><span class="hl-2">;</span><br/><span class="hl-2">    </span><span class="hl-0">// allow dragging a Node out of a Group if the Shift key is down</span><br/><span class="hl-2">    </span><span class="hl-8">if</span><span class="hl-2"> (</span><span class="hl-4">part</span><span class="hl-2">.</span><span class="hl-4">diagram</span><span class="hl-2">.</span><span class="hl-4">lastInput</span><span class="hl-2">.</span><span class="hl-4">shift</span><span class="hl-2">) </span><span class="hl-8">return</span><span class="hl-2"> </span><span class="hl-4">pt</span><span class="hl-2">;</span><br/><span class="hl-2">    </span><span class="hl-1">const</span><span class="hl-2"> </span><span class="hl-3">p1</span><span class="hl-2"> = </span><span class="hl-4">back</span><span class="hl-2">.</span><span class="hl-5">getDocumentPoint</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">Spot</span><span class="hl-2">.</span><span class="hl-4">TopLeft</span><span class="hl-2">);</span><br/><span class="hl-2">    </span><span class="hl-1">const</span><span class="hl-2"> </span><span class="hl-3">p2</span><span class="hl-2"> = </span><span class="hl-4">back</span><span class="hl-2">.</span><span class="hl-5">getDocumentPoint</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">Spot</span><span class="hl-2">.</span><span class="hl-4">BottomRight</span><span class="hl-2">);</span><br/><span class="hl-2">    </span><span class="hl-1">const</span><span class="hl-2"> </span><span class="hl-3">b</span><span class="hl-2"> = </span><span class="hl-4">part</span><span class="hl-2">.</span><span class="hl-4">actualBounds</span><span class="hl-2">;</span><br/><span class="hl-2">    </span><span class="hl-1">const</span><span class="hl-2"> </span><span class="hl-3">loc</span><span class="hl-2"> = </span><span class="hl-4">part</span><span class="hl-2">.</span><span class="hl-4">location</span><span class="hl-2">;</span><br/><span class="hl-2">    </span><span class="hl-0">// find the padding inside the group&#39;s placeholder that is around the member parts</span><br/><span class="hl-2">    </span><span class="hl-1">const</span><span class="hl-2"> </span><span class="hl-3">m</span><span class="hl-2"> = </span><span class="hl-4">grp</span><span class="hl-2">.</span><span class="hl-4">placeholder</span><span class="hl-2">.</span><span class="hl-4">padding</span><span class="hl-2">;</span><br/><span class="hl-2">    </span><span class="hl-0">// now limit the location appropriately, assuming no grid-snapping</span><br/><span class="hl-2">    </span><span class="hl-1">const</span><span class="hl-2"> </span><span class="hl-3">x</span><span class="hl-2"> = </span><span class="hl-4">Math</span><span class="hl-2">.</span><span class="hl-5">max</span><span class="hl-2">(</span><span class="hl-4">p1</span><span class="hl-2">.</span><span class="hl-4">x</span><span class="hl-2"> + </span><span class="hl-4">m</span><span class="hl-2">.</span><span class="hl-4">left</span><span class="hl-2">, </span><span class="hl-4">Math</span><span class="hl-2">.</span><span class="hl-5">min</span><span class="hl-2">(</span><span class="hl-4">pt</span><span class="hl-2">.</span><span class="hl-4">x</span><span class="hl-2">, </span><span class="hl-4">p2</span><span class="hl-2">.</span><span class="hl-4">x</span><span class="hl-2"> - </span><span class="hl-4">m</span><span class="hl-2">.</span><span class="hl-4">right</span><span class="hl-2"> - </span><span class="hl-4">b</span><span class="hl-2">.</span><span class="hl-4">width</span><span class="hl-2"> - </span><span class="hl-7">1</span><span class="hl-2">)) + (</span><span class="hl-4">loc</span><span class="hl-2">.</span><span class="hl-4">x</span><span class="hl-2">-</span><span class="hl-4">b</span><span class="hl-2">.</span><span class="hl-4">x</span><span class="hl-2">);</span><br/><span class="hl-2">    </span><span class="hl-1">const</span><span class="hl-2"> </span><span class="hl-3">y</span><span class="hl-2"> = </span><span class="hl-4">Math</span><span class="hl-2">.</span><span class="hl-5">max</span><span class="hl-2">(</span><span class="hl-4">p1</span><span class="hl-2">.</span><span class="hl-4">y</span><span class="hl-2"> + </span><span class="hl-4">m</span><span class="hl-2">.</span><span class="hl-4">top</span><span class="hl-2">, </span><span class="hl-4">Math</span><span class="hl-2">.</span><span class="hl-5">min</span><span class="hl-2">(</span><span class="hl-4">pt</span><span class="hl-2">.</span><span class="hl-4">y</span><span class="hl-2">, </span><span class="hl-4">p2</span><span class="hl-2">.</span><span class="hl-4">y</span><span class="hl-2"> - </span><span class="hl-4">m</span><span class="hl-2">.</span><span class="hl-4">bottom</span><span class="hl-2"> - </span><span class="hl-4">b</span><span class="hl-2">.</span><span class="hl-4">height</span><span class="hl-2"> - </span><span class="hl-7">1</span><span class="hl-2">)) + (</span><span class="hl-4">loc</span><span class="hl-2">.</span><span class="hl-4">y</span><span class="hl-2">-</span><span class="hl-4">b</span><span class="hl-2">.</span><span class="hl-4">y</span><span class="hl-2">);</span><br/><span class="hl-2">    </span><span class="hl-8">return</span><span class="hl-2"> </span><span class="hl-1">new</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-5">Point</span><span class="hl-2">(</span><span class="hl-4">x</span><span class="hl-2">, </span><span class="hl-4">y</span><span class="hl-2">);</span><br/><span class="hl-2">  }</span>
</code><button>Copy</button></pre>
<p>Note that this expects there to be a &quot;SHAPE&quot; object within the Group&#39;s visual tree that delimits
where the part may be dragged within the group.
This also expects that <a href="Group.html#computesBoundsIncludingLinks" class="tsd-kind-accessor">Group.computesBoundsIncludingLinks</a> is false.
Then in your node template(s), just set:</p>
<pre><code class="language-js"><span class="hl-1">new</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-5">Node</span><span class="hl-2">(</span><br/><span class="hl-2">  . . .,</span><br/><span class="hl-2">  { </span><span class="hl-4">dragComputation:</span><span class="hl-2"> </span><span class="hl-4">stayInGroup</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 tool does not utilize any <a href="Adornment.html" class="tsd-kind-class">Adornment</a>s or tool handles.
If the drag is successful, it raises the &quot;SelectionMoved&quot; or &quot;SelectionCopied&quot; <a href="DiagramEvent.html" class="tsd-kind-class">DiagramEvent</a>
and produces a &quot;Move&quot; or a &quot;Copy&quot; transaction.</p>
<p>If you want to programmatically start a new user&#39;s dragging of a particular existing node,
you can make sure that node is selected, set the <a href="DraggingTool.html#currentPart" class="tsd-kind-accessor">currentPart</a> property, and then start and activate the tool.</p>
<pre><code class="language-js"><span class="hl-2">  </span><span class="hl-1">const</span><span class="hl-2"> </span><span class="hl-3">node</span><span class="hl-2"> = ...;</span><br/><span class="hl-2">  </span><span class="hl-4">myDiagram</span><span class="hl-2">.</span><span class="hl-5">select</span><span class="hl-2">(</span><span class="hl-4">node</span><span class="hl-2">);        </span><span class="hl-0">// in this case the only selected node</span><br/><span class="hl-2">  </span><span class="hl-1">const</span><span class="hl-2"> </span><span class="hl-3">tool</span><span class="hl-2"> = </span><span class="hl-4">myDiagram</span><span class="hl-2">.</span><span class="hl-4">toolManager</span><span class="hl-2">.</span><span class="hl-4">draggingTool</span><span class="hl-2">;</span><br/><span class="hl-2">  </span><span class="hl-4">tool</span><span class="hl-2">.</span><span class="hl-4">currentPart</span><span class="hl-2"> = </span><span class="hl-4">node</span><span class="hl-2">;       </span><span class="hl-0">// the DraggingTool will not call standardMouseSelect</span><br/><span class="hl-2">  </span><span class="hl-4">myDiagram</span><span class="hl-2">.</span><span class="hl-4">currentTool</span><span class="hl-2"> = </span><span class="hl-4">tool</span><span class="hl-2">;  </span><span class="hl-0">// starts the DraggingTool</span><br/><span class="hl-2">  </span><span class="hl-4">tool</span><span class="hl-2">.</span><span class="hl-5">doActivate</span><span class="hl-2">();             </span><span class="hl-0">// activates the DraggingTool</span>
</code><button>Copy</button></pre>
</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="DraggingTool.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="DraggingTool.html#copiedParts" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>copied<wbr/>Parts</span></a>
<a href="DraggingTool.html#copiesEffectiveCollection" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>copies<wbr/>Effective<wbr/>Collection</span></a>
<a href="DraggingTool.html#copyCursor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>copy<wbr/>Cursor</span></a>
<a href="DraggingTool.html#currentPart" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>current<wbr/>Part</span></a>
<a href="DraggingTool.html#delay" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>delay</span></a>
<a href="DraggingTool.html#dragOptions" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>drag<wbr/>Options</span></a>
<a href="DraggingTool.html#draggedParts" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>dragged<wbr/>Parts</span></a>
<a href="DraggingTool.html#dragsLink" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>drags<wbr/>Link</span></a>
<a href="DraggingTool.html#dragsTree" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>drags<wbr/>Tree</span></a>
<a href="DraggingTool.html#gridSnapCellSize" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>grid<wbr/>Snap<wbr/>Cell<wbr/>Size</span></a>
<a href="DraggingTool.html#gridSnapCellSpot" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>grid<wbr/>Snap<wbr/>Cell<wbr/>Spot</span></a>
<a href="DraggingTool.html#gridSnapOrigin" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>grid<wbr/>Snap<wbr/>Origin</span></a>
<a href="DraggingTool.html#isComplexRoutingRealtime" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>is<wbr/>Complex<wbr/>Routing<wbr/>Realtime</span></a>
<a href="DraggingTool.html#isCopyEnabled" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>is<wbr/>Copy<wbr/>Enabled</span></a>
<a href="DraggingTool.html#isGridSnapEnabled" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>is<wbr/>Grid<wbr/>Snap<wbr/>Enabled</span></a>
<a href="DraggingTool.html#isGridSnapRealtime" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>is<wbr/>Grid<wbr/>Snap<wbr/>Realtime</span></a>
<a href="DraggingTool.html#moveCursor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>move<wbr/>Cursor</span></a>
<a href="DraggingTool.html#nodropCursor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>nodrop<wbr/>Cursor</span></a>
<a href="DraggingTool.html#startPoint" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>start<wbr/>Point</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="DraggingTool.html#canStart" 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/>Start</span></a>
<a href="DraggingTool.html#computeEffectiveCollection" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>compute<wbr/>Effective<wbr/>Collection</span></a>
<a href="DraggingTool.html#computeMove" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>compute<wbr/>Move</span></a>
<a href="DraggingTool.html#doActivate" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Activate</span></a>
<a href="DraggingTool.html#doCancel" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Cancel</span></a>
<a href="DraggingTool.html#doDeactivate" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Deactivate</span></a>
<a href="DraggingTool.html#doDragOver" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Drag<wbr/>Over</span></a>
<a href="DraggingTool.html#doDropOnto" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Drop<wbr/>Onto</span></a>
<a href="DraggingTool.html#doKeyDown" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Key<wbr/>Down</span></a>
<a href="DraggingTool.html#doKeyUp" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Key<wbr/>Up</span></a>
<a href="DraggingTool.html#doMouseMove" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Mouse<wbr/>Move</span></a>
<a href="DraggingTool.html#doMouseUp" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Mouse<wbr/>Up</span></a>
<a href="DraggingTool.html#findDraggablePart" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>find<wbr/>Draggable<wbr/>Part</span></a>
<a href="DraggingTool.html#mayCopy" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>may<wbr/>Copy</span></a>
<a href="DraggingTool.html#mayMove" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>may<wbr/>Move</span></a>
<a href="DraggingTool.html#moveParts" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>move<wbr/>Parts</span></a>
<a href="DraggingTool.html#standardMouseSelect" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>standard<wbr/>Mouse<wbr/>Select</span></a>
<a href="DraggingTool.html#stopTransaction" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>stop<wbr/>Transaction</span></a>
</div></section></div></details></section></section><section class="tsd-panel-group tsd-index-group tsd-is-inherited"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-index-accordion"><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Inherited Index</h5></summary><div class="tsd-accordion-details"><div class="tsd-index-content"><section class="tsd-index-section"><h3 class="tsd-index-heading">Accessors</h3><div class="tsd-index-list"><a href="Tool.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>Tool.diagram</span></a>
<a href="Tool.html#isActive" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Tool.is<wbr/>Active</span></a>
<a href="Tool.html#isEnabled" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Tool.is<wbr/>Enabled</span></a>
<a href="Tool.html#name" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Tool.name</span></a>
<a href="Tool.html#transactionResult" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Tool.transaction<wbr/>Result</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="Tool.html#canStartMultiTouch" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.can<wbr/>Start<wbr/>Multi<wbr/>Touch</span></a>
<a href="Tool.html#cancelWaitAfter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.cancel<wbr/>Wait<wbr/>After</span></a>
<a href="Tool.html#doMouseDown" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.do<wbr/>Mouse<wbr/>Down</span></a>
<a href="Tool.html#doMouseWheel" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.do<wbr/>Mouse<wbr/>Wheel</span></a>
<a href="Tool.html#doStart" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.do<wbr/>Start</span></a>
<a href="Tool.html#doStop" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.do<wbr/>Stop</span></a>
<a href="Tool.html#doWaitAfter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.do<wbr/>Wait<wbr/>After</span></a>
<a href="Tool.html#findToolHandleAt" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.find<wbr/>Tool<wbr/>Handle<wbr/>At</span></a>
<a href="Tool.html#isBeyondDragSize" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.is<wbr/>Beyond<wbr/>Drag<wbr/>Size</span></a>
<a href="Tool.html#standardMouseClick" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.standard<wbr/>Mouse<wbr/>Click</span></a>
<a href="Tool.html#standardMouseOver" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.standard<wbr/>Mouse<wbr/>Over</span></a>
<a href="Tool.html#standardMouseWheel" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.standard<wbr/>Mouse<wbr/>Wheel</span></a>
<a href="Tool.html#standardPinchZoomMove" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.standard<wbr/>Pinch<wbr/>Zoom<wbr/>Move</span></a>
<a href="Tool.html#standardPinchZoomStart" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.standard<wbr/>Pinch<wbr/>Zoom<wbr/>Start</span></a>
<a href="Tool.html#standardWaitAfter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.standard<wbr/>Wait<wbr/>After</span></a>
<a href="Tool.html#startTransaction" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.start<wbr/>Transaction</span></a>
<a href="Tool.html#stopTool" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.stop<wbr/>Tool</span></a>
<a href="Tool.html#updateAdornments" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.update<wbr/>Adornments</span></a>
</div></section></div></div></details></section></section><section class="tsd-panel-group tsd-member-group"><h2>Constructors</h2><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_DraggingTool" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Dragging<wbr/>Tool</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">init</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="DraggingTool.html" class="tsd-signature-type tsd-kind-class">DraggingTool</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="DraggingTool.html" class="tsd-signature-type tsd-kind-class">DraggingTool</a><a href="#constructor.new_DraggingTool" 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>You do not normally need to create an instance of this tool
because one already exists as the <a href="ToolManager.html#draggingTool" class="tsd-kind-accessor">ToolManager.draggingTool</a>, which you can modify.</p>
<p>The <a href="Tool.html#name" class="tsd-kind-accessor">Tool.name</a> of this tool is &quot;Dragging&quot;.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">init</span>: <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="DraggingTool.html" class="tsd-signature-type tsd-kind-class">DraggingTool</a><span class="tsd-signature-symbol">&gt;</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <a href="DraggingTool.html" class="tsd-signature-type tsd-kind-class">DraggingTool</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="copiedParts" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>copied<wbr/>Parts</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="Map.html" class="tsd-signature-type tsd-kind-class">Map</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">, </span><a href="DraggingInfo.html" class="tsd-signature-type tsd-kind-class">DraggingInfo</a><span class="tsd-signature-symbol">&gt;</span></div><a href="#copiedParts" 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 collection of <a href="Part.html" class="tsd-kind-class">Part</a>s that this tool has copied.
The value is a <a href="Map.html" class="tsd-kind-class">go.Map</a> mapping <a href="Part.html" class="tsd-kind-class">Part</a>s to DraggingInfo Objects
that have a &quot;point&quot; property remembering the original location of that Part.
The value is null when moving instead of copying.</p>
<p><a href="DraggingTool.html#draggedParts" class="tsd-kind-accessor">draggedParts</a> provides the map of Parts that are being moved and from which this collection was copied.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="copiesEffectiveCollection" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>copies<wbr/>Effective<wbr/>Collection</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#copiesEffectiveCollection" 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 for a copying operation the extended selection
is copied or only the selected parts.
The default value is true.
Setting this property does not raise any events.</p>
<p>The <a href="CommandHandler.html#copiesConnectedLinks" class="tsd-kind-accessor">CommandHandler.copiesConnectedLinks</a> property serves a similar role for the <a href="CommandHandler.html#copySelection" class="tsd-kind-method">CommandHandler.copySelection</a> command,
when the user types <code>Ctrl-C</code> to copy the currently selected parts.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="copyCursor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>copy<wbr/>Cursor</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></div><a href="#copyCursor" 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>The cursor to show when a drop is allowed and will result in a copy.
This defaults to &#39;copy&#39;.
Read more about cursors at <a href="Diagram.html#currentCursor" class="tsd-kind-accessor">Diagram.currentCursor</a></p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">since</code><p>2.2</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="currentPart" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>current<wbr/>Part</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a></div><a href="#currentPart" 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="Part.html" class="tsd-kind-class">Part</a> found at the mouse point.
This is normally set by a call to <a href="DraggingTool.html#standardMouseSelect" class="tsd-kind-method">standardMouseSelect</a>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="delay" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>delay</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#delay" 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>On touch gestures only, this property gets or sets the time in milliseconds
for which the mouse must be stationary before this tool can be started.
The default value is 100 milliseconds.
Setting this property does not raise any events.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="dragOptions" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>drag<wbr/>Options</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="DraggingOptions.html" class="tsd-signature-type tsd-kind-class">DraggingOptions</a></div><a href="#dragOptions" 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="DraggingTool.html" class="tsd-kind-class">DraggingTool</a>&#39;s <a href="DraggingOptions.html" class="tsd-kind-class">DraggingOptions</a> instance, which controls several dragging properties.</p>
<p>Several DraggingTool properties are just convenience properties:</p>
<ul>
<li><a href="DraggingTool.html#isGridSnapEnabled" class="tsd-kind-accessor">isGridSnapEnabled</a></li>
<li><a href="DraggingTool.html#isGridSnapRealtime" class="tsd-kind-accessor">isGridSnapRealtime</a></li>
<li><a href="DraggingTool.html#gridSnapCellSize" class="tsd-kind-accessor">gridSnapCellSize</a></li>
<li><a href="DraggingTool.html#gridSnapCellSpot" class="tsd-kind-accessor">gridSnapCellSpot</a></li>
<li><a href="DraggingTool.html#gridSnapOrigin" class="tsd-kind-accessor">gridSnapOrigin</a></li>
<li><a href="DraggingTool.html#dragsLink" class="tsd-kind-accessor">dragsLink</a></li>
<li><a href="DraggingTool.html#dragsTree" class="tsd-kind-accessor">dragsTree</a></li>
</ul>
<p>Setting any of these properties really sets the corresponding dragOptions property.</p>
<p>Setting this property does not raise any events.</p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">since</code><p>2.0</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="draggedParts" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>dragged<wbr/>Parts</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="Map.html" class="tsd-signature-type tsd-kind-class">Map</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">, </span><a href="DraggingInfo.html" class="tsd-signature-type tsd-kind-class">DraggingInfo</a><span class="tsd-signature-symbol">&gt;</span></div><a href="#draggedParts" 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 collection of <a href="Part.html" class="tsd-kind-class">Part</a>s being moved.
The value is a <a href="Map.html" class="tsd-kind-class">go.Map</a> mapping <a href="Part.html" class="tsd-kind-class">Part</a>s to DraggingInfo Objects
that have a &quot;point&quot; property remembering the original location of that Part.</p>
<p><a href="DraggingTool.html#copiedParts" class="tsd-kind-accessor">copiedParts</a> provides the map of Parts that have been copied during a copying operation, if any.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="dragsLink" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>drags<wbr/>Link</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#dragsLink" 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 user can drag a single <a href="Link.html" class="tsd-kind-class">Link</a>,
disconnecting it from its connected nodes and possibly connecting it
to valid ports when the link is dropped.
The default value is false.
Setting this property does not raise any events.</p>
<p>In order to avoid too many cases of having both ends of a dragged Link connect to the same node (if allowed),
it is commonplace to decrease the <a href="LinkingBaseTool.html#portGravity" class="tsd-kind-accessor">LinkingBaseTool.portGravity</a> to a smaller value such as 10 or 20.</p>
<p>This property is a convenience getter/setter, and sets a value on <a href="DraggingTool.html#dragOptions" class="tsd-kind-accessor">dragOptions</a>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="dragsTree" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>drags<wbr/>Tree</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#dragsTree" 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 moving or copying a node also includes all of the
node&#39;s tree children and their descendants, along with the links to those additional nodes.
The default value is false.
Setting this property does not raise any events.</p>
<p>The <a href="CommandHandler.html#copiesTree" class="tsd-kind-accessor">CommandHandler.copiesTree</a> property serves a similar role for the <a href="CommandHandler.html#copySelection" class="tsd-kind-method">CommandHandler.copySelection</a> command,
when the user types <code>Ctrl-C</code> to copy the currently selected parts.</p>
<p>This property is a convenience getter/setter, and sets a value on <a href="DraggingTool.html#dragOptions" class="tsd-kind-accessor">dragOptions</a>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="gridSnapCellSize" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>grid<wbr/>Snap<wbr/>Cell<wbr/>Size</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="Size.html" class="tsd-signature-type tsd-kind-class">Size</a></div><a href="#gridSnapCellSize" 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 size of the grid cell used when snapping during a drag
if the value of <a href="DraggingTool.html#isGridSnapEnabled" class="tsd-kind-accessor">isGridSnapEnabled</a> is true.
By default this property is the Size(NaN, NaN), which causes this tool to use the <a href="Panel.html#gridCellSize" class="tsd-kind-accessor">Panel.gridCellSize</a> value of the <a href="Diagram.html#grid" class="tsd-kind-accessor">Diagram.grid</a>.
Setting this property does not raise any events.</p>
<p>This property is a convenience getter/setter, and sets a value on <a href="DraggingTool.html#dragOptions" class="tsd-kind-accessor">dragOptions</a>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="gridSnapCellSpot" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>grid<wbr/>Snap<wbr/>Cell<wbr/>Spot</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type tsd-kind-class">Spot</a></div><a href="#gridSnapCellSpot" 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="Spot.html" class="tsd-kind-class">Spot</a> that specifies what point in the grid cell dragged parts snap to,
if the value of <a href="DraggingTool.html#isGridSnapEnabled" class="tsd-kind-accessor">isGridSnapEnabled</a> is true.
By default this property is <a href="Spot.html#TopLeft" class="tsd-kind-property">Spot.TopLeft</a>:
node locations will snap exactly to the grid point.
Setting this property does not raise any events.</p>
<p>This property is a convenience getter/setter, and sets a value on <a href="DraggingTool.html#dragOptions" class="tsd-kind-accessor">dragOptions</a>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="gridSnapOrigin" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>grid<wbr/>Snap<wbr/>Origin</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></div><a href="#gridSnapOrigin" 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 snapping grid&#39;s origin point, in document coordinates,
if the value of <a href="DraggingTool.html#isGridSnapEnabled" class="tsd-kind-accessor">isGridSnapEnabled</a> is true.
By default this property is the Point(NaN, NaN),
which causes this tool to use the <a href="Panel.html#gridOrigin" class="tsd-kind-accessor">Panel.gridOrigin</a> value from the <a href="Diagram.html#grid" class="tsd-kind-accessor">Diagram.grid</a>.
Setting this property does not raise any events.</p>
<p>This property is a convenience getter/setter, and sets a value on <a href="DraggingTool.html#dragOptions" class="tsd-kind-accessor">dragOptions</a>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="isComplexRoutingRealtime" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>is<wbr/>Complex<wbr/>Routing<wbr/>Realtime</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#isComplexRoutingRealtime" 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>In 3.0 this is superceded by <a href="Router.html#isRealtime" class="tsd-kind-accessor">Router.isRealtime</a>, and setting this property attempts to set that property
on the &quot;AvoidsLinks&quot; <a href="Router.html" class="tsd-kind-class">Router</a>.</p>
<p>Gets or sets whether link routing takes some short-cuts during dragging.
When false Links whose routing is AvoidsNodes are not routed to avoid Nodes, in order to improve dragging performance.
The default value is true.</p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">deprecated</code><p>See <a href="Router.html#isRealtime" class="tsd-kind-accessor">Router.isRealtime</a></p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="isCopyEnabled" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>is<wbr/>Copy<wbr/>Enabled</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#isCopyEnabled" 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 for any internal copying operation is permitted by control-drag-and-drop (or alt-drag-and-drop on Mac).
This property affects the behavior of <a href="DraggingTool.html#mayCopy" class="tsd-kind-method">mayCopy</a>,
but does not affect whether copied objects may be dropped into this diagram from a different diagram.</p>
<p>The default value is true.
Setting this property does not raise any events.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="isGridSnapEnabled" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>is<wbr/>Grid<wbr/>Snap<wbr/>Enabled</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#isGridSnapEnabled" 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 <a href="DraggingTool.html" class="tsd-kind-class">DraggingTool</a> snaps objects to grid points.
Whether the snapping movement of the dragged parts occurs during the drag or only upon a drop
is determined by the value of <a href="DraggingTool.html#isGridSnapRealtime" class="tsd-kind-accessor">isGridSnapRealtime</a>.</p>
<p>This property does not affect dragging disconnected links,
but those links do respect the <a href="Part.html#dragComputation" class="tsd-kind-accessor">Part.dragComputation</a>, which can be used to snap them.</p>
<p>By default this property is false.
Setting this property does not raise any events.</p>
<p>This property is a convenience getter/setter, and sets a value on <a href="DraggingTool.html#dragOptions" class="tsd-kind-accessor">dragOptions</a>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="isGridSnapRealtime" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>is<wbr/>Grid<wbr/>Snap<wbr/>Realtime</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#isGridSnapRealtime" 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 <a href="DraggingTool.html" class="tsd-kind-class">DraggingTool</a> snaps objects to grid points during the drag.
This property is ignored unless <a href="DraggingTool.html#isGridSnapEnabled" class="tsd-kind-accessor">isGridSnapEnabled</a> is true.
By default this property is true; when false parts are only snapped to grid locations upon the drop (i.e. mouse-up).
Setting this property does not raise any events.</p>
<p>This property is a convenience getter/setter, and sets a value on <a href="DraggingTool.html#dragOptions" class="tsd-kind-accessor">dragOptions</a>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="moveCursor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>move<wbr/>Cursor</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></div><a href="#moveCursor" 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>The cursor to show when a drop is allowed and will result in a move.
This defaults to the empty string, which refers to the <a href="Diagram.html#defaultCursor" class="tsd-kind-accessor">Diagram.defaultCursor</a>.
Read more about cursors at <a href="Diagram.html#currentCursor" class="tsd-kind-accessor">Diagram.currentCursor</a></p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">since</code><p>2.2</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="nodropCursor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>nodrop<wbr/>Cursor</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></div><a href="#nodropCursor" 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>The cursor to show when a drop is not allowed.
This defaults to &#39;no-drop&#39;.
Read more about cursors at <a href="Diagram.html#currentCursor" class="tsd-kind-accessor">Diagram.currentCursor</a></p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">since</code><p>2.2</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="startPoint" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>start<wbr/>Point</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></div><a href="#startPoint" 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 mouse point from which parts start to move.
The value is a Point in document coordinates.
This property is normally set to the diagram&#39;s mouse-down point in <a href="DraggingTool.html#doActivate" class="tsd-kind-method">doActivate</a>,
but may be set to a different point if parts are being copied from a different control.
Setting this property does not raise any events.</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="canStart" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><code class="tsd-tag ts-flagOverride">Override</code><span>can<wbr/>Start</span><a href="#canStart" 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="canStart.canStart-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">can<wbr/>Start</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#canStart.canStart-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 tool can run if the diagram allows selection and moves/copies/dragging-out,
if the mouse has moved far enough away to be a drag and not a click,
and if <a href="DraggingTool.html#findDraggablePart" class="tsd-kind-method">findDraggablePart</a> has found a selectable part at the mouse-down point.</p>
<p>This method may be overridden.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="computeEffectiveCollection" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>compute<wbr/>Effective<wbr/>Collection</span><a href="#computeEffectiveCollection" 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="computeEffectiveCollection.computeEffectiveCollection-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">compute<wbr/>Effective<wbr/>Collection</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">parts</span><span class="tsd-signature-symbol">: </span><a href="Iterable.html" class="tsd-signature-type tsd-kind-interface">Iterable</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">&gt;</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">: </span><a href="DraggingOptions.html" class="tsd-signature-type tsd-kind-class">DraggingOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Map.html" class="tsd-signature-type tsd-kind-class">Map</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">, </span><a href="DraggingInfo.html" class="tsd-signature-type tsd-kind-class">DraggingInfo</a><span class="tsd-signature-symbol">&gt;</span><a href="#computeEffectiveCollection.computeEffectiveCollection-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 just calls <a href="CommandHandler.html#computeEffectiveCollection" class="tsd-kind-method">CommandHandler.computeEffectiveCollection</a> and remains for compatibility.</p>
<p>This method may be overridden.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">parts</span>: <a href="Iterable.html" class="tsd-signature-type tsd-kind-interface">Iterable</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">&gt;</span></h5><div class="tsd-comment tsd-typography"><p>A <a href="Set.html" class="tsd-kind-class">go.Set</a> or <a href="List.html" class="tsd-kind-class">List</a> of <a href="Part.html" class="tsd-kind-class">Part</a>s.</p>
</div></li><li><h5><span class="tsd-kind-parameter">options</span>: <a href="DraggingOptions.html" class="tsd-signature-type tsd-kind-class">DraggingOptions</a></h5><div class="tsd-comment tsd-typography"><p>Potential options for the collection computation</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="Map.html" class="tsd-signature-type tsd-kind-class">Map</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">, </span><a href="DraggingInfo.html" class="tsd-signature-type tsd-kind-class">DraggingInfo</a><span class="tsd-signature-symbol">&gt;</span></h4><p>a Map mapping <a href="Part.html" class="tsd-kind-class">Part</a>s to DraggingInfo Objects
        that have a &quot;point&quot; property remembering the original location of that Part.</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="computeMove" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>compute<wbr/>Move</span><a href="#computeMove" 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="computeMove.computeMove-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">compute<wbr/>Move</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">n</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">newloc</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a>, <span class="tsd-kind-parameter">draggedparts</span><span class="tsd-signature-symbol">?: </span><a href="Map.html" class="tsd-signature-type tsd-kind-class">Map</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">, </span><a href="DraggingInfo.html" class="tsd-signature-type tsd-kind-class">DraggingInfo</a><span class="tsd-signature-symbol">&gt;</span>, <span class="tsd-kind-parameter">result</span><span class="tsd-signature-symbol">?: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a><a href="#computeMove.computeMove-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This method computes the new location for a <a href="Node.html" class="tsd-kind-class">Node</a> or simple <a href="Part.html" class="tsd-kind-class">Part</a>,
given a new desired location and an optional Map of dragged parts,
taking any grid-snapping into consideration,
any <a href="Part.html#dragComputation" class="tsd-kind-accessor">Part.dragComputation</a> function,
and any <a href="Part.html#minLocation" class="tsd-kind-accessor">Part.minLocation</a> and <a href="Part.html#maxLocation" class="tsd-kind-accessor">Part.maxLocation</a>.</p>
<p>This just calls <a href="Diagram.html#computeMove" class="tsd-kind-method">Diagram.computeMove</a> and remains for compatibility.</p>
<p>This method may be overridden, but should usually be overridden on Diagram.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">n</span>: <a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a></h5><div class="tsd-comment tsd-typography"><p>the Node or simple Part that is being moved</p>
</div></li><li><h5><span class="tsd-kind-parameter">newloc</span>: <a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></h5><div class="tsd-comment tsd-typography"><p>the proposed new location</p>
</div></li><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">draggedparts</span>: <a href="Map.html" class="tsd-signature-type tsd-kind-class">Map</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">, </span><a href="DraggingInfo.html" class="tsd-signature-type tsd-kind-class">DraggingInfo</a><span class="tsd-signature-symbol">&gt;</span></h5><div class="tsd-comment tsd-typography"><p>an optional Map mapping <a href="Part.html" class="tsd-kind-class">Part</a>s to DraggingInfo Objects
       that have a &quot;point&quot; property remembering the original location of that Part.</p>
</div></li><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">result</span>: <a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></h5><div class="tsd-comment tsd-typography"><p>an optional Point that is modified and returned</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></h4><p>the possibly grid-snapped computed Point that is within the minimum and maximum permitted locations</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="doActivate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOverride">Override</code><span>do<wbr/>Activate</span><a href="#doActivate" 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="doActivate.doActivate-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">do<wbr/>Activate</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#doActivate.doActivate-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>Start the dragging operation.
This calls <a href="DraggingTool.html#computeEffectiveCollection" class="tsd-kind-method">computeEffectiveCollection</a> and saves the result as <a href="DraggingTool.html#draggedParts" class="tsd-kind-accessor">draggedParts</a>.</p>
<p>This starts a &quot;Drag&quot; transaction.
Depending on what happens, the transaction may be finished as a &quot;Move&quot; or a &quot;Copy&quot;
transaction, or it may be rolled-back if the tool is cancelled.</p>
<p>Normally when this method is called the value of <a href="DraggingTool.html#currentPart" class="tsd-kind-accessor">currentPart</a> will be null,
in which case this will call <a href="Tool.html#standardMouseSelect" class="tsd-kind-method">Tool.standardMouseSelect</a> which will set <a href="DraggingTool.html#currentPart" class="tsd-kind-accessor">currentPart</a>.
But if when this method is called the value of <a href="DraggingTool.html#currentPart" class="tsd-kind-accessor">currentPart</a> has already been set
because the programmer wants the user to start dragging that Part,
then this method will not need to call <a href="Tool.html#standardMouseSelect" class="tsd-kind-method">Tool.standardMouseSelect</a> because
the Part(s) to be selected and dragged have already been determined by the caller.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="doCancel" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOverride">Override</code><span>do<wbr/>Cancel</span><a href="#doCancel" 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="doCancel.doCancel-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">do<wbr/>Cancel</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#doCancel.doCancel-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>Abort any dragging operation.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="doDeactivate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOverride">Override</code><span>do<wbr/>Deactivate</span><a href="#doDeactivate" 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="doDeactivate.doDeactivate-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">do<wbr/>Deactivate</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#doDeactivate.doDeactivate-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>Stop the dragging operation by stopping the transaction and cleaning up any temporary state.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="doDragOver" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>do<wbr/>Drag<wbr/>Over</span><a href="#doDragOver" 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="doDragOver.doDragOver-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">do<wbr/>Drag<wbr/>Over</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pt</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a>, <span class="tsd-kind-parameter">obj</span><span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type tsd-kind-class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#doDragOver.doDragOver-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Perform any additional side-effects during a drag, whether an internal move or copy or an external drag,
that may affect the existing non-moved object(s).</p>
<p>This method may be overridden.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">pt</span>: <a href="Point.html" class="tsd-signature-type 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-kind-parameter">obj</span>: <a href="GraphObject.html" class="tsd-signature-type tsd-kind-class">GraphObject</a></h5><div class="tsd-comment tsd-typography"><p>the <a href="GraphObject.html" class="tsd-kind-class">GraphObject</a> at the point,
excluding what is being dragged or temporary objects;
the argument may be null if the drag is occurring in the background of the diagram.
Use <a href="GraphObject.html#part" class="tsd-kind-accessor">GraphObject.part</a> to get the <a href="Node.html" class="tsd-kind-class">Node</a> or <a href="Part.html" class="tsd-kind-class">Part</a> at the root of
the visual tree of the stationary object.</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="doDropOnto" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>do<wbr/>Drop<wbr/>Onto</span><a href="#doDropOnto" 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="doDropOnto.doDropOnto-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">do<wbr/>Drop<wbr/>Onto</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pt</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a>, <span class="tsd-kind-parameter">obj</span><span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type tsd-kind-class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#doDropOnto.doDropOnto-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Perform any additional side-effects after a drop, whether an internal move or copy or an external drop,
that may affect the existing non-moved object(s).</p>
<p>This method may be overridden.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">pt</span>: <a href="Point.html" class="tsd-signature-type 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-kind-parameter">obj</span>: <a href="GraphObject.html" class="tsd-signature-type tsd-kind-class">GraphObject</a></h5><div class="tsd-comment tsd-typography"><p>the <a href="GraphObject.html" class="tsd-kind-class">GraphObject</a> where the drop occurred,
excluding what was dropped or temporary objects;
the argument may be null if the drop occurred in the background of the diagram.
Use <a href="GraphObject.html#part" class="tsd-kind-accessor">GraphObject.part</a> to get the <a href="Node.html" class="tsd-kind-class">Node</a> or <a href="Part.html" class="tsd-kind-class">Part</a> at the root of
the visual tree of the stationary object.</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="doKeyDown" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOverride">Override</code><span>do<wbr/>Key<wbr/>Down</span><a href="#doKeyDown" 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="doKeyDown.doKeyDown-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">do<wbr/>Key<wbr/>Down</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#doKeyDown.doKeyDown-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>Handle switching between copying and moving modes as the Control/Option key is pressed or released.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="doKeyUp" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOverride">Override</code><span>do<wbr/>Key<wbr/>Up</span><a href="#doKeyUp" 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="doKeyUp.doKeyUp-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">do<wbr/>Key<wbr/>Up</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#doKeyUp.doKeyUp-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>Handle switching between copying and moving modes as the Control/Option key is pressed or released.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="doMouseMove" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOverride">Override</code><span>do<wbr/>Mouse<wbr/>Move</span><a href="#doMouseMove" 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="doMouseMove.doMouseMove-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">do<wbr/>Mouse<wbr/>Move</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#doMouseMove.doMouseMove-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Move the <a href="DraggingTool.html#draggedParts" class="tsd-kind-accessor">draggedParts</a> (or if copying, the <a href="DraggingTool.html#copiedParts" class="tsd-kind-accessor">copiedParts</a>) to follow the current mouse point.</p>
<p>If this creates any temporary parts, by default it adds them to the Tool layer.</p>
<p>This calls <a href="DraggingTool.html#doDragOver" class="tsd-kind-method">doDragOver</a> for any side-effects on stationary parts.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="doMouseUp" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOverride">Override</code><span>do<wbr/>Mouse<wbr/>Up</span><a href="#doMouseUp" 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="doMouseUp.doMouseUp-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">do<wbr/>Mouse<wbr/>Up</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#doMouseUp.doMouseUp-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>On a mouse-up finish moving or copying the effective selection.</p>
<p>This calls <a href="DraggingTool.html#doDropOnto" class="tsd-kind-method">doDropOnto</a> for any side-effects on stationary parts.</p>
<p>This also updates the diagram&#39;s bounds,
raises a &quot;SelectionCopied&quot; or &quot;SelectionMoved&quot; DiagramEvent, and stops this tool.</p>
<p>This method also raises the &quot;ChangingSelection&quot; and &quot;ChangedSelection&quot; diagram events.
Changes are performed in a &quot;Drag&quot; transaction, but the &quot;ChangedSelection&quot; event is raised outside the transaction.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="findDraggablePart" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>find<wbr/>Draggable<wbr/>Part</span><a href="#findDraggablePart" 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="findDraggablePart.findDraggablePart-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">find<wbr/>Draggable<wbr/>Part</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><a href="#findDraggablePart.findDraggablePart-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>Return the selectable and movable/copyable <a href="Part.html" class="tsd-kind-class">Part</a> at the mouse-down point.
This is called by <a href="DraggingTool.html#canStart" class="tsd-kind-method">canStart</a> to decide if this tool is ready to run.</p>
<p>This method may be overridden.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
</div><h4 class="tsd-returns-title">Returns <a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="mayCopy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>may<wbr/>Copy</span><a href="#mayCopy" 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="mayCopy.mayCopy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">may<wbr/>Copy</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#mayCopy.mayCopy-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 is true when the diagram allows objects to be copied and inserted,
and some object in the selection is copyable,
and the user is holding down the Control key (Option key on Mac).</p>
<p>This method may be overridden, although in most cases it is easiest to set <a href="Part.html#copyable" class="tsd-kind-accessor">Part.copyable</a>.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="mayMove" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>may<wbr/>Move</span><a href="#mayMove" 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="mayMove.mayMove-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">may<wbr/>Move</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#mayMove.mayMove-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 is true when the diagram allows objects to be moved,
and some object in the selection is movable.</p>
<p>This method may be overridden, although in most cases it is easiest to set <a href="Part.html#movable" class="tsd-kind-accessor">Part.movable</a>.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="moveParts" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>move<wbr/>Parts</span><a href="#moveParts" 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="moveParts.moveParts-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">move<wbr/>Parts</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">parts</span><span class="tsd-signature-symbol">: </span><a href="Map.html" class="tsd-signature-type tsd-kind-class">Map</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">, </span><a href="DraggingInfo.html" class="tsd-signature-type tsd-kind-class">DraggingInfo</a><span class="tsd-signature-symbol">&gt;</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a>, <span class="tsd-kind-parameter">check</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">void</span><a href="#moveParts.moveParts-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Move a collection Map of <a href="Part.html" class="tsd-kind-class">Part</a>s by a given offset.</p>
<p>If <em>check</em> is true this respects the <a href="Part.html#canMove" class="tsd-kind-method">Part.canMove</a> predicate for <a href="Node.html" class="tsd-kind-class">Node</a>s or simple <a href="Part.html" class="tsd-kind-class">Part</a>s
when this is the <a href="Diagram.html#currentTool" class="tsd-kind-accessor">Diagram.currentTool</a>.
It also respects <a href="DraggingTool.html#isGridSnapEnabled" class="tsd-kind-accessor">isGridSnapEnabled</a> in order to try to automatically snap part locations to a grid.
And it also uses the <a href="Part.html#dragComputation" class="tsd-kind-accessor">Part.dragComputation</a> function, if any, to determine the new location for each part.</p>
<p>The first argument is a <a href="Map.html" class="tsd-kind-class">go.Map</a> as produced by <a href="DraggingTool.html#computeEffectiveCollection" class="tsd-kind-method">computeEffectiveCollection</a>,
not a <a href="List.html" class="tsd-kind-class">List</a> or <a href="Set.html" class="tsd-kind-class">go.Set</a> or <a href="Iterator.html" class="tsd-kind-interface">Iterator</a> of Parts.
Call <a href="Diagram.html#moveParts" class="tsd-kind-method">Diagram.moveParts</a> if you want to move a simple collection of Parts without having to create the argument Map.</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">parts</span>: <a href="Map.html" class="tsd-signature-type tsd-kind-class">Map</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">, </span><a href="DraggingInfo.html" class="tsd-signature-type tsd-kind-class">DraggingInfo</a><span class="tsd-signature-symbol">&gt;</span></h5><div class="tsd-comment tsd-typography"><p>a Map mapping <a href="Part.html" class="tsd-kind-class">Part</a>s to DraggingInfo Objects
       that have a &quot;point&quot; property remembering the original location of that Part.</p>
</div></li><li><h5><span class="tsd-kind-parameter">offset</span>: <a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></h5><div class="tsd-comment tsd-typography"><p>The offset, before snapping, to move parts.
This offset reflects the total amount moved during tool operation,
based on original Part locations remembered when the DraggingTool activated.</p>
</div></li><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">check</span>: <span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><p>Whether to check <a href="Part.html#canMove" class="tsd-kind-method">Part.canMove</a> on each part.  The default value is false.</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="standardMouseSelect" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><code class="tsd-tag ts-flagOverride">Override</code><span>standard<wbr/>Mouse<wbr/>Select</span><a href="#standardMouseSelect" 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="standardMouseSelect.standardMouseSelect-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">standard<wbr/>Mouse<wbr/>Select</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#standardMouseSelect.standardMouseSelect-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 override prevents the Control modifier unselecting an already selected part.
This also remembers the selectable <a href="DraggingTool.html#currentPart" class="tsd-kind-accessor">currentPart</a> at the current mouse point.</p>
<p>This method may be overridden.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="stopTransaction" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><code class="tsd-tag ts-flagOverride">Override</code><span>stop<wbr/>Transaction</span><a href="#stopTransaction" 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="stopTransaction.stopTransaction-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">stop<wbr/>Transaction</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#stopTransaction.stopTransaction-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 calls the super <a href="Tool.html#stopTransaction" class="tsd-kind-method">Tool.stopTransaction</a> method, and if the result is <code>true</code>,
attempts to optimize the transaction by removing all changes except the first and last
by calling <a href="Transaction.html#optimize" class="tsd-kind-method">Transaction.optimize</a>.</p>
<p>This method may be overridden.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>the result of the call to rollback or commit the transaction.</p>
</li></ul></section></section></div><div class="col-sidebar"><div class="page-menu"><details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><ul><li><a href="#constructor"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></li><li><a href="#copiedParts"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>copied<wbr/>Parts</span></a></li><li><a href="#copiesEffectiveCollection"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>copies<wbr/>Effective<wbr/>Collection</span></a></li><li><a href="#copyCursor"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>copy<wbr/>Cursor</span></a></li><li><a href="#currentPart"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>current<wbr/>Part</span></a></li><li><a href="#delay"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>delay</span></a></li><li><a href="#dragOptions"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>drag<wbr/>Options</span></a></li><li><a href="#draggedParts"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>dragged<wbr/>Parts</span></a></li><li><a href="#dragsLink"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>drags<wbr/>Link</span></a></li><li><a href="#dragsTree"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>drags<wbr/>Tree</span></a></li><li><a href="#gridSnapCellSize"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>grid<wbr/>Snap<wbr/>Cell<wbr/>Size</span></a></li><li><a href="#gridSnapCellSpot"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>grid<wbr/>Snap<wbr/>Cell<wbr/>Spot</span></a></li><li><a href="#gridSnapOrigin"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>grid<wbr/>Snap<wbr/>Origin</span></a></li><li><a href="#isComplexRoutingRealtime"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>is<wbr/>Complex<wbr/>Routing<wbr/>Realtime</span></a></li><li><a href="#isCopyEnabled"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>is<wbr/>Copy<wbr/>Enabled</span></a></li><li><a href="#isGridSnapEnabled"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>is<wbr/>Grid<wbr/>Snap<wbr/>Enabled</span></a></li><li><a href="#isGridSnapRealtime"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>is<wbr/>Grid<wbr/>Snap<wbr/>Realtime</span></a></li><li><a href="#moveCursor"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>move<wbr/>Cursor</span></a></li><li><a href="#nodropCursor"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>nodrop<wbr/>Cursor</span></a></li><li><a href="#startPoint"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>start<wbr/>Point</span></a></li><li><a href="#canStart"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>can<wbr/>Start</span></a></li><li><a href="#computeEffectiveCollection"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>compute<wbr/>Effective<wbr/>Collection</span></a></li><li><a href="#computeMove"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>compute<wbr/>Move</span></a></li><li><a href="#doActivate"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Activate</span></a></li><li><a href="#doCancel"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Cancel</span></a></li><li><a href="#doDeactivate"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Deactivate</span></a></li><li><a href="#doDragOver"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Drag<wbr/>Over</span></a></li><li><a href="#doDropOnto"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Drop<wbr/>Onto</span></a></li><li><a href="#doKeyDown"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Key<wbr/>Down</span></a></li><li><a href="#doKeyUp"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Key<wbr/>Up</span></a></li><li><a href="#doMouseMove"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Mouse<wbr/>Move</span></a></li><li><a href="#doMouseUp"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Mouse<wbr/>Up</span></a></li><li><a href="#findDraggablePart"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>find<wbr/>Draggable<wbr/>Part</span></a></li><li><a href="#mayCopy"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>may<wbr/>Copy</span></a></li><li><a href="#mayMove"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>may<wbr/>Move</span></a></li><li><a href="#moveParts"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>move<wbr/>Parts</span></a></li><li><a href="#standardMouseSelect"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>standard<wbr/>Mouse<wbr/>Select</span></a></li><li><a href="#stopTransaction"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>stop<wbr/>Transaction</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>