UNPKG

gojs

Version:

Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams

361 lines 108 kB
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><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/css/style.css"/><link rel="stylesheet" href="../assets/style-tsd.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><nav id="navTop" class="w-full z-30 top-0 text-white bg-nwoods-primary"><div class="w-full container max-w-screen-lg mx-auto flex flex-wrap sm:flex-nowrap items-center justify-between mt-0 py-2"><div class="md:pl-4"><a class="text-white hover:text-white no-underline hover:no-underline\n                            font-bold text-2xl lg:text-4xl rounded-lg hover:bg-nwoods-secondary" href="../../index.html"><h1 class="mb-0 p-1 leading-none">GoJS</h1></a></div><button id="topnavButton" class="rounded-lg sm:hidden focus:outline-none focus:ring" aria-label="Navigation"><svg fill="currentColor" viewBox="0 0 20 20" class="w-6 h-6"><path id="topnavOpen" fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM9 15a1 1 0 011-1h6a1 1 0 110 2h-6a1 1 0 01-1-1z" clip-rule="evenodd"></path><path id="topnavClosed" class="hidden" fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></button><div id="topnavList" class="hidden sm:block items-center w-auto mt-0 text-white p-0 z-20"><ul class="list-reset list-none font-semibold flex justify-end flex-wrap sm:flex-nowrap items-center px-0 pb-0"><li class="p-1 sm:p-0"><a class="topnav-link" href="../../learn/index.html">Learn</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../samples/index.html">Samples</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../intro/index.html">Intro</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../api/index.html">API</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/products/register.html">Register</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../download.html">Download</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://forum.nwoods.com/c/gojs/11">Forum</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/contact.html" target="_blank" rel="noopener" id="contactBtn">Contact</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/sales/index.html" target="_blank" rel="noopener" id="buyBtn">Buy</a></li></ul></div></div><hr class="border-b border-gray-600 opacity-50 my-0 py-0"/></nav><div class="tsd-page-header"><div class="tsd-page-toolbar"><div class="w-full max-w-screen-xl mx-auto px-2"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">GoJS API</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited"/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div></div><div class="tsd-page-title"><div class="w-full max-w-screen-xl mx-auto px-2"><div class="top-copyright"><b>GoJS</b>&reg; Diagramming Components<br/>version 2.2.22<br/>by <a href="https://www.nwoods.com/">Northwoods Software®</a></div><div><h1>Class DraggingTool </h1></div></div></div></header><div class="tsd w-full max-w-screen-xl mx-auto pb-4"><div class="row px-2 w-full"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><a href="Tool.html" class="tsd-signature-type" data-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" data-tsd-kind="Class">GuidedDraggingTool</a></li><li><a href="NonRealtimeDraggingTool.html" class="tsd-signature-type" data-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">Part.location</a> property; you may want to save the location to the model
by using a TwoWay <a href="Binding.html">Binding</a> on the &quot;location&quot; property in your Parts/Nodes/Groups templates.</p>
<div><p>Dragging the selection moves parts for which <a href="Part.html#canMove">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">Part.canCopy</a> is true.</p>
<p>When the drag starts it calls <a href="DraggingTool.html#computeEffectiveCollection">computeEffectiveCollection</a> to find the actual collection
of <a href="Part.html">Part</a>s to be dragged.
Normally this collection includes not only the <a href="Diagram.html#selection">Diagram.selection</a>, but also parts that belong
to those selected parts, such as members of groups.
If <a href="DraggingTool.html#dragsTree">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">computeEffectiveCollection</a> is not a <a href="Set.html">Set</a> but a <a href="Map.html">Map</a>
which remembers the original <a href="Part.html#location">Part.location</a> for all of the dragged parts.
This map is saved as the value of <a href="DraggingTool.html#draggedParts">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">draggedParts</a>
and proceeds to drag it around.
(It only copies the <a href="Diagram.html#selection">Diagram.selection</a>, not the whole effective collection,
if <a href="DraggingTool.html#copiesEffectiveCollection">copiesEffectiveCollection</a> is false.)
The collection of copied parts is held by <a href="DraggingTool.html#copiedParts">copiedParts</a>.
It too is a <a href="Map.html">Map</a> remembering the original locations of the parts.
<a href="DraggingTool.html#copiedParts">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">Diagram.computeMove</a> method.
By default it limits the <a href="Part.html#location">Part.location</a> to be within the bounds given by <a href="Part.html#minLocation">Part.minLocation</a> and <a href="Part.html#maxLocation">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">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-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">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></pre>
<p>If you set <a href="DraggingTool.html#isGridSnapEnabled">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">isGridSnapRealtime</a> to false.
Normally the grid points come from the <a href="Diagram.html#grid">Diagram.grid</a>, even if that grid is not <a href="GraphObject.html#visible">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">gridSnapCellSize</a> and <a href="DraggingTool.html#gridSnapOrigin">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">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">Part.dragComputation</a> property
or override <a href="Diagram.html#computeMove">Diagram.computeMove</a>.
For the common case of wanting to keep member nodes within the <a href="Group.html">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">var</span><span class="hl-2"> </span><span class="hl-4">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">var</span><span class="hl-2"> </span><span class="hl-4">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">var</span><span class="hl-2"> </span><span class="hl-4">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">var</span><span class="hl-2"> </span><span class="hl-4">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">var</span><span class="hl-2"> </span><span class="hl-4">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">var</span><span class="hl-2"> </span><span class="hl-4">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">var</span><span class="hl-2"> </span><span class="hl-4">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">var</span><span class="hl-2"> </span><span class="hl-4">x</span><span class="hl-2"> = </span><span class="hl-11">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-11">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">var</span><span class="hl-2"> </span><span class="hl-4">y</span><span class="hl-2"> = </span><span class="hl-11">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-11">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></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">Group.computesBoundsIncludingLinks</a> is false.
Then in your node template(s), just set:</p>
<pre><code class="language-js"><span class="hl-5">$</span><span class="hl-2">(</span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">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></pre>
<p>This tool does not utilize any <a href="Adornment.html">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">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">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">var</span><span class="hl-2"> </span><span class="hl-4">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">var</span><span class="hl-2"> </span><span class="hl-4">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></pre>
</div></div></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="DraggingTool.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#copiedParts" class="tsd-kind-icon">copied<wbr/>Parts</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#copiesEffectiveCollection" class="tsd-kind-icon">copies<wbr/>Effective<wbr/>Collection</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#copyCursor" class="tsd-kind-icon">copy<wbr/>Cursor</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#currentPart" class="tsd-kind-icon">current<wbr/>Part</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#delay" class="tsd-kind-icon">delay</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#dragOptions" class="tsd-kind-icon">drag<wbr/>Options</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#draggedParts" class="tsd-kind-icon">dragged<wbr/>Parts</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#dragsLink" class="tsd-kind-icon">drags<wbr/>Link</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#dragsTree" class="tsd-kind-icon">drags<wbr/>Tree</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#gridSnapCellSize" class="tsd-kind-icon">grid<wbr/>Snap<wbr/>Cell<wbr/>Size</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#gridSnapCellSpot" class="tsd-kind-icon">grid<wbr/>Snap<wbr/>Cell<wbr/>Spot</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#gridSnapOrigin" class="tsd-kind-icon">grid<wbr/>Snap<wbr/>Origin</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#isComplexRoutingRealtime" class="tsd-kind-icon">is<wbr/>Complex<wbr/>Routing<wbr/>Realtime</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#isCopyEnabled" class="tsd-kind-icon">is<wbr/>Copy<wbr/>Enabled</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#isGridSnapEnabled" class="tsd-kind-icon">is<wbr/>Grid<wbr/>Snap<wbr/>Enabled</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#isGridSnapRealtime" class="tsd-kind-icon">is<wbr/>Grid<wbr/>Snap<wbr/>Realtime</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#moveCursor" class="tsd-kind-icon">move<wbr/>Cursor</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#nodropCursor" class="tsd-kind-icon">nodrop<wbr/>Cursor</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#startPoint" class="tsd-kind-icon">start<wbr/>Point</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="DraggingTool.html#canStart" class="tsd-kind-icon">can<wbr/>Start</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="DraggingTool.html#computeEffectiveCollection" class="tsd-kind-icon">compute<wbr/>Effective<wbr/>Collection</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="DraggingTool.html#computeMove" class="tsd-kind-icon">compute<wbr/>Move</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="DraggingTool.html#doActivate" class="tsd-kind-icon">do<wbr/>Activate</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="DraggingTool.html#doCancel" class="tsd-kind-icon">do<wbr/>Cancel</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="DraggingTool.html#doDeactivate" class="tsd-kind-icon">do<wbr/>Deactivate</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="DraggingTool.html#doDragOver" class="tsd-kind-icon">do<wbr/>Drag<wbr/>Over</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="DraggingTool.html#doDropOnto" class="tsd-kind-icon">do<wbr/>Drop<wbr/>Onto</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="DraggingTool.html#doKeyDown" class="tsd-kind-icon">do<wbr/>Key<wbr/>Down</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="DraggingTool.html#doKeyUp" class="tsd-kind-icon">do<wbr/>Key<wbr/>Up</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="DraggingTool.html#doMouseMove" class="tsd-kind-icon">do<wbr/>Mouse<wbr/>Move</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="DraggingTool.html#doMouseUp" class="tsd-kind-icon">do<wbr/>Mouse<wbr/>Up</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="DraggingTool.html#findDraggablePart" class="tsd-kind-icon">find<wbr/>Draggable<wbr/>Part</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="DraggingTool.html#mayCopy" class="tsd-kind-icon">may<wbr/>Copy</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="DraggingTool.html#mayMove" class="tsd-kind-icon">may<wbr/>Move</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="DraggingTool.html#moveParts" class="tsd-kind-icon">move<wbr/>Parts</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="DraggingTool.html#standardMouseSelect" class="tsd-kind-icon">standard<wbr/>Mouse<wbr/>Select</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="DraggingTool.html#stopTransaction" class="tsd-kind-icon">stop<wbr/>Transaction</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-index-group tsd-is-inherited"><h2>Inherited Members</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section undefined"><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Tool.html#diagram" class="tsd-kind-icon">Tool.diagram</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Tool.html#isActive" class="tsd-kind-icon">Tool.is<wbr/>Active</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Tool.html#isEnabled" class="tsd-kind-icon">Tool.is<wbr/>Enabled</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Tool.html#name" class="tsd-kind-icon">Tool.name</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Tool.html#transactionResult" class="tsd-kind-icon">Tool.transaction<wbr/>Result</a></li></ul></section><section class="tsd-index-section undefined"><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#canStartMultiTouch" class="tsd-kind-icon">Tool.can<wbr/>Start<wbr/>Multi<wbr/>Touch</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#cancelWaitAfter" class="tsd-kind-icon">Tool.cancel<wbr/>Wait<wbr/>After</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#doMouseDown" class="tsd-kind-icon">Tool.do<wbr/>Mouse<wbr/>Down</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#doMouseWheel" class="tsd-kind-icon">Tool.do<wbr/>Mouse<wbr/>Wheel</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#doStart" class="tsd-kind-icon">Tool.do<wbr/>Start</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#doStop" class="tsd-kind-icon">Tool.do<wbr/>Stop</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#doWaitAfter" class="tsd-kind-icon">Tool.do<wbr/>Wait<wbr/>After</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#findToolHandleAt" class="tsd-kind-icon">Tool.find<wbr/>Tool<wbr/>Handle<wbr/>At</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#isBeyondDragSize" class="tsd-kind-icon">Tool.is<wbr/>Beyond<wbr/>Drag<wbr/>Size</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><a href="Tool.html#standardMouseClick" class="tsd-kind-icon">Tool.standard<wbr/>Mouse<wbr/>Click</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#standardMouseOver" class="tsd-kind-icon">Tool.standard<wbr/>Mouse<wbr/>Over</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#standardMouseWheel" class="tsd-kind-icon">Tool.standard<wbr/>Mouse<wbr/>Wheel</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#standardPinchZoomMove" class="tsd-kind-icon">Tool.standard<wbr/>Pinch<wbr/>Zoom<wbr/>Move</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#standardPinchZoomStart" class="tsd-kind-icon">Tool.standard<wbr/>Pinch<wbr/>Zoom<wbr/>Start</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#standardWaitAfter" class="tsd-kind-icon">Tool.standard<wbr/>Wait<wbr/>After</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#startTransaction" class="tsd-kind-icon">Tool.start<wbr/>Transaction</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#stopTool" class="tsd-kind-icon">Tool.stop<wbr/>Tool</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#updateAdornments" class="tsd-kind-icon">Tool.update<wbr/>Adornments</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> constructor<a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">new <wbr/>Dragging<wbr/>Tool<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="DraggingTool.html" class="tsd-signature-type" data-tsd-kind="Class">DraggingTool</a></li></ul><ul class="tsd-descriptions"><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">ToolManager.draggingTool</a>, which you can modify.</p>
<div><p>The <a href="Tool.html#name">Tool.name</a> of this tool is &quot;Dragging&quot;.</p>
</div></div><h4 class="tsd-returns-title">Returns <a href="DraggingTool.html" class="tsd-signature-type" data-tsd-kind="Class">DraggingTool</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="copiedParts" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> copied<wbr/>Parts<span class="tsd-signature-symbol">: </span><a href="Map.html" class="tsd-signature-type" data-tsd-kind="Class">Map</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type" data-tsd-kind="Class">Part</a><span class="tsd-signature-symbol">, </span><a href="DraggingInfo.html" class="tsd-signature-type" data-tsd-kind="Class">DraggingInfo</a><span class="tsd-signature-symbol">&gt;</span><a href="#copiedParts" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets the collection of <a href="Part.html">Part</a>s that this tool has copied.
The value is a <a href="Map.html">Map</a> mapping <a href="Part.html">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>
<div><p><a href="DraggingTool.html#draggedParts">draggedParts</a> provides the map of Parts that are being moved and from which this collection was copied.</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="copiesEffectiveCollection" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> copies<wbr/>Effective<wbr/>Collection<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#copiesEffectiveCollection" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether 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>
<div><p>The <a href="CommandHandler.html#copiesConnectedLinks">CommandHandler.copiesConnectedLinks</a> property serves a similar role for the <a href="CommandHandler.html#copySelection">CommandHandler.copySelection</a> command,
when the user types control-C to copy the currently selected parts.</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="copyCursor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> copy<wbr/>Cursor<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#copyCursor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>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">Diagram.currentCursor</a></p>
<dl class="tsd-comment-tags"><dt class="">since</dt><dd><p>2.2</p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="currentPart" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> current<wbr/>Part<span class="tsd-signature-symbol">: </span><a href="Part.html" class="tsd-signature-type" data-tsd-kind="Class">Part</a><a href="#currentPart" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets the <a href="Part.html">Part</a> found at the mouse point.
This is normally set by a call to <a href="DraggingTool.html#standardMouseSelect">standardMouseSelect</a>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="delay" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> delay<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#delay" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>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 tsd-kind-accessor tsd-parent-kind-class"><a id="dragOptions" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> drag<wbr/>Options<span class="tsd-signature-symbol">: </span><a href="DraggingOptions.html" class="tsd-signature-type" data-tsd-kind="Class">DraggingOptions</a><a href="#dragOptions" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the <a href="DraggingTool.html">DraggingTool</a>&#39;s <a href="DraggingOptions.html">DraggingOptions</a> instance, which controls several dragging properties.</p>
<div><p>Several DraggingTool properties are just convenience properties:</p>
<ul>
<li><a href="DraggingTool.html#isGridSnapEnabled">isGridSnapEnabled</a></li>
<li><a href="DraggingTool.html#isGridSnapRealtime">isGridSnapRealtime</a></li>
<li><a href="DraggingTool.html#gridSnapCellSize">gridSnapCellSize</a></li>
<li><a href="DraggingTool.html#gridSnapCellSpot">gridSnapCellSpot</a></li>
<li><a href="DraggingTool.html#gridSnapOrigin">gridSnapOrigin</a></li>
<li><a href="DraggingTool.html#dragsLink">dragsLink</a></li>
<li><a href="DraggingTool.html#dragsTree">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><dl class="tsd-comment-tags"><dt class="">since</dt><dd><p>2.0</p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="draggedParts" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> dragged<wbr/>Parts<span class="tsd-signature-symbol">: </span><a href="Map.html" class="tsd-signature-type" data-tsd-kind="Class">Map</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type" data-tsd-kind="Class">Part</a><span class="tsd-signature-symbol">, </span><a href="DraggingInfo.html" class="tsd-signature-type" data-tsd-kind="Class">DraggingInfo</a><span class="tsd-signature-symbol">&gt;</span><a href="#draggedParts" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets the collection of <a href="Part.html">Part</a>s being moved.
The value is a <a href="Map.html">Map</a> mapping <a href="Part.html">Part</a>s to DraggingInfo Objects
that have a &quot;point&quot; property remembering the original location of that Part.</p>
<div><p><a href="DraggingTool.html#copiedParts">copiedParts</a> provides the map of Parts that have been copied during a copying operation, if any.</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="dragsLink" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> drags<wbr/>Link<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#dragsLink" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the user can drag a single <a href="Link.html">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>
<div><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">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">dragOptions</a>.</p>
</div><dl class="tsd-comment-tags"><dt class="">since</dt><dd><p>1.3</p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="dragsTree" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> drags<wbr/>Tree<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#dragsTree" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether 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>
<div><p>The <a href="CommandHandler.html#copiesTree">CommandHandler.copiesTree</a> property serves a similar role for the <a href="CommandHandler.html#copySelection">CommandHandler.copySelection</a> command,
when the user types control-C 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">dragOptions</a>.</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="gridSnapCellSize" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> grid<wbr/>Snap<wbr/>Cell<wbr/>Size<span class="tsd-signature-symbol">: </span><a href="Size.html" class="tsd-signature-type" data-tsd-kind="Class">Size</a><a href="#gridSnapCellSize" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the size of the grid cell used when snapping during a drag
if the value of <a href="DraggingTool.html#isGridSnapEnabled">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">Panel.gridCellSize</a> value of the <a href="Diagram.html#grid">Diagram.grid</a>.
Setting this property does not raise any events.</p>
<div><p>This property is a convenience getter/setter, and sets a value on <a href="DraggingTool.html#dragOptions">dragOptions</a>.</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="gridSnapCellSpot" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> grid<wbr/>Snap<wbr/>Cell<wbr/>Spot<span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type" data-tsd-kind="Class">Spot</a><a href="#gridSnapCellSpot" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the <a href="Spot.html">Spot</a> that specifies what point in the grid cell dragged parts snap to,
if the value of <a href="DraggingTool.html#isGridSnapEnabled">isGridSnapEnabled</a> is true.
By default this property is <a href="Spot.html#static-TopLeft">Spot.TopLeft</a>:
node locations will snap exactly to the grid point.
Setting this property does not raise any events.</p>
<div><p>This property is a convenience getter/setter, and sets a value on <a href="DraggingTool.html#dragOptions">dragOptions</a>.</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="gridSnapOrigin" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> grid<wbr/>Snap<wbr/>Origin<span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type" data-tsd-kind="Class">Point</a><a href="#gridSnapOrigin" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the snapping grid&#39;s origin point, in document coordinates,
if the value of <a href="DraggingTool.html#isGridSnapEnabled">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">Panel.gridOrigin</a> value from the <a href="Diagram.html#grid">Diagram.grid</a>.
Setting this property does not raise any events.</p>
<div><p>This property is a convenience getter/setter, and sets a value on <a href="DraggingTool.html#dragOptions">dragOptions</a>.</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="isComplexRoutingRealtime" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> is<wbr/>Complex<wbr/>Routing<wbr/>Realtime<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isComplexRoutingRealtime" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether 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>
<dl class="tsd-comment-tags"><dt class="">since</dt><dd><p>1.4</p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="isCopyEnabled" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> is<wbr/>Copy<wbr/>Enabled<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isCopyEnabled" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether for any internal copying operation is permitted by control-drag-and-drop.
This property affects the behavior of <a href="DraggingTool.html#mayCopy">mayCopy</a>,
but does not affect whether copied objects may be dropped into this diagram from a different diagram.</p>
<div><p>The default value is true.
Setting this property does not raise any events.</p>
</div><dl class="tsd-comment-tags"><dt class="">since</dt><dd><p>1.4</p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="isGridSnapEnabled" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> is<wbr/>Grid<wbr/>Snap<wbr/>Enabled<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isGridSnapEnabled" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the <a href="DraggingTool.html">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">isGridSnapRealtime</a>.</p>
<div><p>This property does not affect dragging disconnected links,
but those links to respect the <a href="Part.html#dragComputation">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">dragOptions</a>.</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="isGridSnapRealtime" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> is<wbr/>Grid<wbr/>Snap<wbr/>Realtime<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isGridSnapRealtime" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the <a href="DraggingTool.html">DraggingTool</a> snaps objects to grid points during the drag.
This property is ignored unless <a href="DraggingTool.html#isGridSnapEnabled">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>
<div><p>This property is a convenience getter/setter, and sets a value on <a href="DraggingTool.html#dragOptions">dragOptions</a>.</p>
</div><dl class="tsd-comment-tags"><dt class="">since</dt><dd><p>1.1</p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="moveCursor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> move<wbr/>Cursor<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#moveCursor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>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">Diagram.defaultCursor</a>.
Read more about cursors at <a href="Diagram.html#currentCursor">Diagram.currentCursor</a></p>
<dl class="tsd-comment-tags"><dt class="">since</dt><dd><p>2.2</p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="nodropCursor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> nodrop<wbr/>Cursor<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#nodropCursor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>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">Diagram.currentCursor</a></p>
<dl class="tsd-comment-tags"><dt class="">since</dt><dd><p>2.2</p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="startPoint" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> start<wbr/>Point<span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type" data-tsd-kind="Class">Point</a><a href="#startPoint" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the 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">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 tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="canStart" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOverride">Override</span> <span class="tsd-flag ts-flagVirtual">Virtual</span>  can<wbr/>Start<a href="#canStart" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">can<wbr/>Start<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></li></ul><ul class="tsd-descriptions"><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">findDraggablePart</a> has found a selectable part at the mouse-down point.</p>
<div><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><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="computeEffectiveCollection" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagVirtual">Virtual</span>  compute<wbr/>Effective<wbr/>Collection<a href="#computeEffectiveCollection" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">compute<wbr/>Effective<wbr/>Collection<span class="tsd-signature-symbol">(</span>parts<span class="tsd-signature-symbol">: </span><a href="Iterable.html" class="tsd-signature-type" data-tsd-kind="Interface">Iterable</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type" data-tsd-kind="Class">Part</a><span class="tsd-signature-symbol">&gt;</span>, options<span class="tsd-signature-symbol">: </span><a href="DraggingOptions.html" class="tsd-signature-type" data-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" data-tsd-kind="Class">Map</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type" data-tsd-kind="Class">Part</a><span class="tsd-signature-symbol">, </span><a href="DraggingInfo.html" class="tsd-signature-type" data-tsd-kind="Class">DraggingInfo</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>This just calls <a href="CommandHandler.html#computeEffectiveCollection">CommandHandler.computeEffectiveCollection</a>. The implementation of this method was moved to CommandHandler for 2.0.</p>
<div><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><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>parts: <a href="Iterable.html" class="tsd-signature-type" data-tsd-kind="Interface">Iterable</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type" data-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">Set</a> or <a href="List.html">List</a> of <a href="Part.html">Part</a>s.</p>
</div></li><li><h5>options: <a href="DraggingOptions.html" class="tsd-signature-type" data-tsd-kind="Class">DraggingOptions</a></h5><div class="tsd-comment tsd-typography">
<p>Potential options for the collection computation</p>
</div></li></ul><h4 class="tsd-returns-title">Returns <a href="Map.html" class="tsd-signature-type" data-tsd-kind="Class">Map</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type" data-tsd-kind="Class">Part</a><span class="tsd-signature-symbol">, </span><a href="DraggingInfo.html" class="tsd-signature-type" data-tsd-kind="Class">DraggingInfo</a><span class="tsd-signature-symbol">&gt;</span></h4><div><p>a Map mapping <a href="Part.html">Part</a>s to DraggingInfo Objects
        that have a &quot;point&quot; property remembering the original location of that Part.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="computeMove" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagVirtual">Virtual</span>  compute<wbr/>Move<a href="#computeMove" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">compute<wbr/>Move<span class="tsd-signature-symbol">(</span>n<span class="tsd-signature-symbol">: </span><a href="Part.html" class="tsd-signature-type" data-tsd-kind="Class">Part</a>, newloc<span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type" data-tsd-kind="Class">Point</a>, draggedparts<span class="tsd-signature-symbol">?: </span><a href="Map.html" class="tsd-signature-type" data-tsd-kind="Class">Map</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type" data-tsd-kind="Class">Part</a><span class="tsd-signature-symbol">, </span><a href="DraggingInfo.html" class="tsd-signature-type" data-tsd-kind="Class">DraggingInfo</a><span class="tsd-signature-symbol">&gt;</span>, result<span class="tsd-signature-symbol">?: </span><a href="Point.html" class="tsd-signature-type" data-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" data-tsd-kind="Class">Point</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>This method computes the new location for a <a href="Node.html">Node</a> or simple <a href="Part.html">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">Part.dragComputation</a> function,
and any <a href="Part.html#minLocation">Part.minLocation</a> and <a href="Part.html#maxLocation">Part.maxLocation</a>.</p>
<div><p>As of 2.0, this just calls <a href="Diagram.html#computeMove">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><dl class="tsd-comment-tags"><dt class="">since</dt><dd><p>1.1</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>n: <a href="Part.html" class="tsd-signature-type" data-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>newloc: <a href="Point.html" class="tsd-signature-type" data-tsd-kind="Class">Point</a></h5><div class="tsd-comment tsd-typography">
<p>the proposed new location</p>
</div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> draggedparts: <a href="Map.html" class="tsd-signature-type" data-tsd-kind="Class">Map</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type" data-tsd-kind="Class">Part</a><span class="tsd-signature-symbol">, </span><a href="DraggingInfo.html" class="tsd-signature-type" data-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">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-flag ts-flagOptional">Optional</span> result: <a href="Point.html" class="tsd-signature-type" data-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><h4 class="tsd-returns-title">Returns <a href="Point.html" class="tsd-signature-type" data-tsd-kind="Class">Point</a></h4><div><p>the possibly grid-snapped computed Point that is within the minimum and maximum permitted locations</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="doActivate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOverride">Override</span>  do<wbr/>Activate<a href="#doActivate" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">do<wbr/>Activate<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></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Start the dragging operation.
This calls <a href="DraggingTool.html#computeEffectiveCollection">computeEffectiveCollection</a> and saves the result as <a href="DraggingTool.html#draggedParts">draggedParts</a>.</p>
<div><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">currentPart</a> will be null,
in which case this will call <a href="Tool.html#standardMouseSelect">Tool.standardMouseSelect</a> which will set <a href="DraggingTool.html#currentPart">currentPart</a>.
But if when this method is called the value of <a href="DraggingTool.html#currentPart">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">Tool.standardMouseSelect</a> because
the Part(s) to be selected and dragged have already been determined by the caller.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="doCancel" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOverride">Override</span>  do<wbr/>Cancel<a href="#doCancel" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">do<wbr/>Cancel<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></li></ul><ul class="tsd-descriptions"><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 tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="doDeactivate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOverride">Override</span>  do<wbr/>Deactivate<a href="#doDeactivate" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">do<wbr/>Deactivate<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></li></ul><ul class="tsd-descriptions"><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 tsd-kind-method tsd-parent-kind-class"><a id="doDragOver" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagVirtual">Virtual</span>  do<wbr/>Drag<wbr/>Over<a href="#doDragOver" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">do<wbr/>Drag<wbr/>Over<span class="tsd-signature-symbol">(</span>pt<span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type" data-tsd-kind="Class">Point</a>, obj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><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>
<div><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><dl class="tsd-comment-tags"><dt class="">since</dt><dd><p>1.1</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>pt: <a href="Point.html" class="tsd-signature-type" data-tsd-kind="Class">Point</a></h5><div class="tsd-comment tsd-typography">
<p>a Point in document coordinates.</p>
</div></li><li><h5>obj: <a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a></h5><div class="tsd-comment tsd-typography">
<p>the <a href="GraphObject.html">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">GraphObject.part</a> to get the <a href="Node.html">Node</a> or <a href="Part.html">Part</a> at the root of
the visual tree of the stationary object.</p>
</div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="doDropOnto" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagVirtual">Virtual</span>  do<wbr/>Drop<wbr/>Onto<a href="#doDropOnto" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">do<wbr/>Drop<wbr/>Onto<span class="tsd-signature-symbol">(</span>pt<span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type" data-tsd-kind="Class">Point</a>, obj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><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>
<div><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><dl class="tsd-comment-tags"><dt class="">since</dt><dd><p>1.1</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>pt: <a href="Point.html" class="tsd-signature-type" data-tsd-kind="Class">Point</a></h5><div class="tsd-comment tsd-typography">
<p>a Point in document coordinates.</p>
</div></li><li><h5>obj: <a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a></h5><div class="tsd-comment tsd-typography">
<p>the <a href="GraphObject.html">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">GraphObject.part</a> to get the <a href="Node.html">Node</a> or <a href="Part.html">Part</a> at the root of
the visual tree of the stationary object.</p>
</div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="doKeyDown" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOverride">Override</span>  do<wbr/>Key<wbr/>Down<a href="#doKeyDown" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">do<wbr/>Key<wbr/>Down<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></li></ul><ul class="tsd-descriptions"><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 tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="doKeyUp" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOverride">Override</span>  do<wbr/>Key<wbr/>Up<a href="#doKeyUp" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">do<wbr/>Key<wbr/>Up<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></li></ul><ul class="tsd-descriptions"><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 tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="doMouseMove" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOverride">Override</span>  do<wbr/>Mouse<wbr/>Move<a href="#doMouseMove" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">do<wbr/>Mouse<wbr/>Move<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></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Move the <a href="DraggingTool.html#draggedParts">draggedParts</a> (or if copying, the <a href="DraggingTool.html#copiedParts">copiedParts</a>) to follow the current mouse point.</p>
<div><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">doDragOver</a> for any side-effects on stationary parts.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="doMouseUp" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOverride">Override</span>  do<wbr/>Mouse<wbr/>Up<a href="#doMouseUp" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">do<wbr/>Mouse<wbr/>Up<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></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>On a mouse-up finish moving or copying the effective selection.</p>
<div><p>This calls <a href="DraggingTool.html#doDropOnto">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></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="findDraggablePart" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagVirtual">Virtual</span>  find<wbr/>Draggable<wbr/>Part<a href="#findDraggablePart" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">find<wbr/>Draggable<wbr/>Part<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" data-tsd-kind="Class">Part</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Return the selectable and movable/copyable <a href="Part.html">Part</a> at the mouse-down point.
This is called by <a href="DraggingTool.html#canStart">canStart</a> to decide if this tool is ready to run.</p>
<div><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><h4 class="tsd-returns-title">Returns <a href="Part.html" class="tsd-signature-type" data-tsd-kind="Class">Part</a></h4><div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="mayCopy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagVirtual">Virtual</span>  may<wbr/>Copy<a href="#mayCopy" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">may<wbr/>Copy<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></li></ul><ul class="tsd-descriptions"><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>
<div><p>This method may be overridden, although in most cases it is easiest to set <a href="Part.html#copyable">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></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="mayMove" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagVirtual">Virtual</span>  may<wbr/>Move<a href="#mayMove" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">may<wbr/>Move<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></li></ul><ul class="tsd-descriptions"><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>
<div><p>This method may be overridden, although in most cases it is easiest to set <a href="Part.html#movable">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></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="moveParts" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagVirtual">Virtual</span>  move<wbr/>Parts<a href="#moveParts" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">move<wbr/>Parts<span class="tsd-signature-symbol">(</span>parts<span class="tsd-signature-symbol">: </span><a href="Map.html" class="tsd-signature-type" data-tsd-kind="Class">Map</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type" data-tsd-kind="Class">Part</a><span class="tsd-signature-symbol">, </span><a href="DraggingInfo.html" class="tsd-signature-type" data-tsd-kind="Class">DraggingInfo</a><span class="tsd-signature-symbol">&gt;</span>, offset<span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type" data-tsd-kind="Class">Point</a>, check<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></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Move a collection Map of <a href="Part.html">Part</a>s by a given offset.</p>
<div><p>If <em>check</em> is true this respects the <a href="Part.html#canMove">Part.canMove</a> predicate for <a href="Node.html">Node</a>s or simple <a href="Part.html">Part</a>s
when this is the <a href="Diagram.html#currentTool">Diagram.currentTool</a>.
It also respects <a href="DraggingTool.html#isGridSnapEnabled">isGridSnapEnabled</a> in order to try to automatically snap part locations to a grid.
And it also uses the <a href="Part.html#dragComputation">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">Map</a> as produced by <a href="DraggingTool.html#computeEffectiveCollection">computeEffectiveCollection</a>,
not a <a href="List.html">List</a> or <a href="Set.html">Set</a> or <a href="Iterator.html">Iterator</a> of Parts.
Call <a href="Diagram.html#moveParts">Diagram.moveParts</a> if you want to move a simple collection of Parts without having to create the argument Map.</p>
</div><dl class="tsd-comment-tags"><dt class="">since</dt><dd><p>1.1</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>parts: <a href="Map.html" class="tsd-signature-type" data-tsd-kind="Class">Map</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type" data-tsd-kind="Class">Part</a><span class="tsd-signature-symbol">, </span><a href="DraggingInfo.html" class="tsd-signature-type" data-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">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>offset: <a href="Point.html" class="tsd-signature-type" data-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><span class="tsd-flag ts-flagOptional">Optional</span> check: <span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography">
<p>Whether to check <a href="Part.html#canMove">Part.canMove</a> on each part.  The default value is false.</p>
</div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="standardMouseSelect" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOverride">Override</span> <span class="tsd-flag ts-flagVirtual">Virtual</span>  standard<wbr/>Mouse<wbr/>Select<a href="#standardMouseSelect" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">standard<wbr/>Mouse<wbr/>Select<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></li></ul><ul class="tsd-descriptions"><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">currentPart</a> at the current mouse point.</p>
<div><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><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="stopTransaction" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOverride">Override</span> <span class="tsd-flag ts-flagVirtual">Virtual</span>  stop<wbr/>Transaction<a href="#stopTransaction" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">stop<wbr/>Transaction<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></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>This calls the super <a href="Tool.html#stopTransaction">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">Transaction.optimize</a>.</p>
<div><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><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div><p>the result of the call to rollback or commit the transaction.</p>
</div></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">GoJS Class Index</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-class"><a href="DraggingTool.html" class="tsd-kind-icon">Dragging<wbr/>Tool</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="DraggingTool.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#copiedParts" class="tsd-kind-icon">copied<wbr/>Parts</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#copiesEffectiveCollection" class="tsd-kind-icon">copies<wbr/>Effective<wbr/>Collection</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#copyCursor" class="tsd-kind-icon">copy<wbr/>Cursor</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#currentPart" class="tsd-kind-icon">current<wbr/>Part</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#delay" class="tsd-kind-icon">delay</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#dragOptions" class="tsd-kind-icon">drag<wbr/>Options</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#draggedParts" class="tsd-kind-icon">dragged<wbr/>Parts</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#dragsLink" class="tsd-kind-icon">drags<wbr/>Link</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#dragsTree" class="tsd-kind-icon">drags<wbr/>Tree</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#gridSnapCellSize" class="tsd-kind-icon">grid<wbr/>Snap<wbr/>Cell<wbr/>Size</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#gridSnapCellSpot" class="tsd-kind-icon">grid<wbr/>Snap<wbr/>Cell<wbr/>Spot</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#gridSnapOrigin" class="tsd-kind-icon">grid<wbr/>Snap<wbr/>Origin</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#isComplexRoutingRealtime" class="tsd-kind-icon">is<wbr/>Complex<wbr/>Routing<wbr/>Realtime</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#isCopyEnabled" class="tsd-kind-icon">is<wbr/>Copy<wbr/>Enabled</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#isGridSnapEnabled" class="tsd-kind-icon">is<wbr/>Grid<wbr/>Snap<wbr/>Enabled</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#isGridSnapRealtime" class="tsd-kind-icon">is<wbr/>Grid<wbr/>Snap<wbr/>Realtime</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#moveCursor" class="tsd-kind-icon">move<wbr/>Cursor</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#nodropCursor" class="tsd-kind-icon">nodrop<wbr/>Cursor</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="DraggingTool.html#startPoint" class="tsd-kind-icon">start<wbr/>Point</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="DraggingTool.html#canStart" class="tsd-kind-icon">can<wbr/>Start</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="DraggingTool.html#computeEffectiveCollection" class="tsd-kind-icon">compute<wbr/>Effective<wbr/>Collection</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="DraggingTool.html#computeMove" class="tsd-kind-icon">compute<wbr/>Move</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="DraggingTool.html#doActivate" class="tsd-kind-icon">do<wbr/>Activate</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="DraggingTool.html#doCancel" class="tsd-kind-icon">do<wbr/>Cancel</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="DraggingTool.html#doDeactivate" class="tsd-kind-icon">do<wbr/>Deactivate</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="DraggingTool.html#doDragOver" class="tsd-kind-icon">do<wbr/>Drag<wbr/>Over</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="DraggingTool.html#doDropOnto" class="tsd-kind-icon">do<wbr/>Drop<wbr/>Onto</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="DraggingTool.html#doKeyDown" class="tsd-kind-icon">do<wbr/>Key<wbr/>Down</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="DraggingTool.html#doKeyUp" class="tsd-kind-icon">do<wbr/>Key<wbr/>Up</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="DraggingTool.html#doMouseMove" class="tsd-kind-icon">do<wbr/>Mouse<wbr/>Move</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="DraggingTool.html#doMouseUp" class="tsd-kind-icon">do<wbr/>Mouse<wbr/>Up</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="DraggingTool.html#findDraggablePart" class="tsd-kind-icon">find<wbr/>Draggable<wbr/>Part</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="DraggingTool.html#mayCopy" class="tsd-kind-icon">may<wbr/>Copy</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="DraggingTool.html#mayMove" class="tsd-kind-icon">may<wbr/>Move</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="DraggingTool.html#moveParts" class="tsd-kind-icon">move<wbr/>Parts</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="DraggingTool.html#standardMouseSelect" class="tsd-kind-icon">standard<wbr/>Mouse<wbr/>Select</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="DraggingTool.html#stopTransaction" class="tsd-kind-icon">stop<wbr/>Transaction</a></li></ul></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-2022 by Northwoods Software Corporation.</div></div><footer class=""><div class="tsd w-full max-w-screen-xl mx-auto px-2"><h2>Settings</h2><p class="mb-4">Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script><script async src="https://www.googletagmanager.com/gtag/js?id=UA-1506307-5"></script>
      <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date()); gtag('config', 'UA-1506307-5');
        var getOutboundLink = function(url, label) {
            gtag('event', 'click', {
            'event_category': 'outbound',
            'event_label': label,
            'transport_type': 'beacon'
            });
        }
        // topnav
        var topButton = document.getElementById("topnavButton");
        var topnavList = document.getElementById("topnavList");
        topButton.addEventListener("click", function() {
            this.classList.toggle("active");
            topnavList.classList.toggle("hidden");
            document.getElementById("topnavOpen").classList.toggle("hidden");
            document.getElementById("topnavClosed").classList.toggle("hidden");
        });

        document.getElementById("contactBtn").addEventListener("click", function() {
            getOutboundLink('https://www.nwoods.com/contact.html', 'contact');
        });

        document.getElementById("buyBtn").addEventListener("click", function() {
            getOutboundLink('https://www.nwoods.com/sales/index.html', 'buy');
        });
      </script></body></html>