gojs
Version:
Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams
143 lines • 108 kB
HTML
<!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="my-0 p-1 leading-none">GoJS</h1></a></div><button id="topnavButton" class="rounded-lg sm:hidden focus:outline-none focus:ring" aria-label="Navigation"><svg fill="currentColor" viewBox="0 0 20 20" class="w-6 h-6"><path id="topnavOpen" fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM9 15a1 1 0 011-1h6a1 1 0 110 2h-6a1 1 0 01-1-1z" clip-rule="evenodd"></path><path id="topnavClosed" class="hidden" fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></button><div id="topnavList" class="hidden sm:block items-center w-auto mt-0 text-white p-0 z-20"><ul class="list-reset list-none font-semibold flex justify-end flex-wrap sm:flex-nowrap items-center px-0 pb-0"><li class="p-1 sm:p-0"><a class="topnav-link" href="../../learn/index.html">Learn</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../samples/index.html">Samples</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../intro/index.html">Intro</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../api/index.html">API</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/products/register.html">Register</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../download.html">Download</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://forum.nwoods.com/c/gojs/11">Forum</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/contact.html" target="_blank" rel="noopener" id="contactBtn">Contact</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/sales/index.html" target="_blank" rel="noopener" id="buyBtn">Buy</a></li></ul></div></div><hr class="border-b border-gray-600 opacity-50 my-0 py-0"/></nav><div class="tsd-page-header"><div class="tsd-page-toolbar"><div class="w-full max-w-screen-xl mx-auto px-2"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">GoJS API</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited"/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div></div><div class="tsd-page-title"><div class="w-full max-w-screen-xl mx-auto px-2"><div class="top-copyright"><b>GoJS</b>® Diagramming Components<br/>version 2.3.8<br/>by <a href="https://www.nwoods.com/">Northwoods Software®</a></div><div><h1>Class 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 "location" 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'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'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'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'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'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 "SHAPE" object within the Group'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 "SelectionMoved" or "SelectionCopied" <a href="DiagramEvent.html">DiagramEvent</a>
and produces a "Move" or a "Copy" transaction.</p>
<p>If you want to programmatically start a new user'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 "Dragging".</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"><</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">></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 "point" 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 'copy'.
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>'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"><</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">></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 "point" 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'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'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