sgojs
Version:
Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams
602 lines (601 loc) • 90.5 kB
HTML
<!doctype html>
<html class="default no-js">
<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/css/main.css">
<script async src="../assets/js/search.js" id="search-script"></script>
</head>
<body>
<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
font-bold text-2xl lg:text-4xl rounded-lg hover:bg-nwoods-secondary" href="../../index.html">
<h1 class="mb-0 p-1">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" onclick="getOutboundLink('https://www.nwoods.com/contact.html', 'contact');">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" onclick="getOutboundLink('https://www.nwoods.com/sales/index.html', 'buy');">Buy</a></li>
</ul>
</div>
</div>
<hr class="border-b border-gray-600 opacity-50 my-0 py-0" />
</nav>
<div class="tsd 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-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">GoJS API</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd 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.1.47<br/>by <a href="https://www.nwoods.com/">Northwoods Software®</a>
</div>
<div>
<h1>Class DraggingTool</h1>
</div>
</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>
<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 style="color: #DCDCAA">$</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">go</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">Node</span><span style="color: #D4D4D4">,</span>
<span style="color: #D4D4D4"> . . .</span>
<span style="color: #D4D4D4"> { </span><span style="color: #9CDCFE">minLocation:</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">new</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">go</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">Point</span><span style="color: #D4D4D4">(-</span><span style="color: #569CD6">Infinity</span><span style="color: #D4D4D4">, </span><span style="color: #569CD6">NaN</span><span style="color: #D4D4D4">), </span><span style="color: #9CDCFE">maxLocation:</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">new</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">go</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">Point</span><span style="color: #D4D4D4">(</span><span style="color: #569CD6">Infinity</span><span style="color: #D4D4D4">, </span><span style="color: #569CD6">NaN</span><span style="color: #D4D4D4">) },</span>
<span style="color: #D4D4D4"> . . .</span>
<span style="color: #D4D4D4">)</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 style="color: #D4D4D4"> </span><span style="color: #6A9955">// this is a Part.dragComputation function for limiting where a Node may be dragged</span>
<span style="color: #D4D4D4"> </span><span style="color: #569CD6">function</span><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">stayInGroup</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">part</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">pt</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">gridpt</span><span style="color: #D4D4D4">) {</span>
<span style="color: #D4D4D4"> </span><span style="color: #6A9955">// don't constrain top-level nodes</span>
<span style="color: #D4D4D4"> </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">grp</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">part</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">containingGroup</span><span style="color: #D4D4D4">;</span>
<span style="color: #D4D4D4"> </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (</span><span style="color: #9CDCFE">grp</span><span style="color: #D4D4D4"> === </span><span style="color: #569CD6">null</span><span style="color: #D4D4D4">) </span><span style="color: #C586C0">return</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">pt</span><span style="color: #D4D4D4">;</span>
<span style="color: #D4D4D4"> </span><span style="color: #6A9955">// try to stay within the background Shape of the Group</span>
<span style="color: #D4D4D4"> </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">back</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">grp</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">resizeObject</span><span style="color: #D4D4D4">;</span>
<span style="color: #D4D4D4"> </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (</span><span style="color: #9CDCFE">back</span><span style="color: #D4D4D4"> === </span><span style="color: #569CD6">null</span><span style="color: #D4D4D4">) </span><span style="color: #C586C0">return</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">pt</span><span style="color: #D4D4D4">;</span>
<span style="color: #D4D4D4"> </span><span style="color: #6A9955">// allow dragging a Node out of a Group if the Shift key is down</span>
<span style="color: #D4D4D4"> </span><span style="color: #C586C0">if</span><span style="color: #D4D4D4"> (</span><span style="color: #9CDCFE">part</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">diagram</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">lastInput</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">shift</span><span style="color: #D4D4D4">) </span><span style="color: #C586C0">return</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">pt</span><span style="color: #D4D4D4">;</span>
<span style="color: #D4D4D4"> </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">p1</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">back</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">getDocumentPoint</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">go</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">Spot</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">TopLeft</span><span style="color: #D4D4D4">);</span>
<span style="color: #D4D4D4"> </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">p2</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">back</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">getDocumentPoint</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">go</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">Spot</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">BottomRight</span><span style="color: #D4D4D4">);</span>
<span style="color: #D4D4D4"> </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">b</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">part</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">actualBounds</span><span style="color: #D4D4D4">;</span>
<span style="color: #D4D4D4"> </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">loc</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">part</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">location</span><span style="color: #D4D4D4">;</span>
<span style="color: #D4D4D4"> </span><span style="color: #6A9955">// find the padding inside the group's placeholder that is around the member parts</span>
<span style="color: #D4D4D4"> </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">m</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">grp</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">placeholder</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">padding</span><span style="color: #D4D4D4">;</span>
<span style="color: #D4D4D4"> </span><span style="color: #6A9955">// now limit the location appropriately</span>
<span style="color: #D4D4D4"> </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">x</span><span style="color: #D4D4D4"> = </span><span style="color: #4EC9B0">Math</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">max</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">p1</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">x</span><span style="color: #D4D4D4"> + </span><span style="color: #9CDCFE">m</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">left</span><span style="color: #D4D4D4">, </span><span style="color: #4EC9B0">Math</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">min</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">pt</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">x</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">p2</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">x</span><span style="color: #D4D4D4"> - </span><span style="color: #9CDCFE">m</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">right</span><span style="color: #D4D4D4"> - </span><span style="color: #9CDCFE">b</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">width</span><span style="color: #D4D4D4"> - </span><span style="color: #B5CEA8">1</span><span style="color: #D4D4D4">)) + (</span><span style="color: #9CDCFE">loc</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">x</span><span style="color: #D4D4D4">-</span><span style="color: #9CDCFE">b</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">x</span><span style="color: #D4D4D4">);</span>
<span style="color: #D4D4D4"> </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">y</span><span style="color: #D4D4D4"> = </span><span style="color: #4EC9B0">Math</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">max</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">p1</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">y</span><span style="color: #D4D4D4"> + </span><span style="color: #9CDCFE">m</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">top</span><span style="color: #D4D4D4">, </span><span style="color: #4EC9B0">Math</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">min</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">pt</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">y</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">p2</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">y</span><span style="color: #D4D4D4"> - </span><span style="color: #9CDCFE">m</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">bottom</span><span style="color: #D4D4D4"> - </span><span style="color: #9CDCFE">b</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">height</span><span style="color: #D4D4D4"> - </span><span style="color: #B5CEA8">1</span><span style="color: #D4D4D4">)) + (</span><span style="color: #9CDCFE">loc</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">y</span><span style="color: #D4D4D4">-</span><span style="color: #9CDCFE">b</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">y</span><span style="color: #D4D4D4">);</span>
<span style="color: #D4D4D4"> </span><span style="color: #C586C0">return</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">new</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">go</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">Point</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">x</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">y</span><span style="color: #D4D4D4">);</span>
<span style="color: #D4D4D4"> }</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 style="color: #DCDCAA">$</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">go</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">Node</span><span style="color: #D4D4D4">,</span>
<span style="color: #D4D4D4"> . . .,</span>
<span style="color: #D4D4D4"> { </span><span style="color: #9CDCFE">dragComputation:</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">stayInGroup</span><span style="color: #D4D4D4"> },</span>
<span style="color: #D4D4D4"> . . .</span>
<span style="color: #D4D4D4">)</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 style="color: #D4D4D4"> </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">node</span><span style="color: #D4D4D4"> = ...;</span>
<span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">myDiagram</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">select</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">node</span><span style="color: #D4D4D4">); </span><span style="color: #6A9955">// in this case the only selected node</span>
<span style="color: #D4D4D4"> </span><span style="color: #569CD6">var</span><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">tool</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">myDiagram</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">toolManager</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">draggingTool</span><span style="color: #D4D4D4">;</span>
<span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">tool</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">currentPart</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">node</span><span style="color: #D4D4D4">; </span><span style="color: #6A9955">// the DraggingTool will not call standardMouseSelect</span>
<span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">myDiagram</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">currentTool</span><span style="color: #D4D4D4"> = </span><span style="color: #9CDCFE">tool</span><span style="color: #D4D4D4">; </span><span style="color: #6A9955">// starts the DraggingTool</span>
<span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">tool</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">doActivate</span><span style="color: #D4D4D4">(); </span><span style="color: #6A9955">// activates the DraggingTool</span>
</code></pre>
</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#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#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>
</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 name="constructor" class="tsd-anchor"></a>
<h3>
constructor
</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>
<p>The <a href="Tool.html#name">Tool.name</a> of this tool is "Dragging".</p>
</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 name="copiedParts" class="tsd-anchor"></a>
<h3>
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> </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>
<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>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
<a name="copiesEffectiveCollection" class="tsd-anchor"></a>
<h3>
copies<wbr>Effective<wbr>Collection
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span> </h3>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>Gets or sets whether for a copying operation the extended selection
is copied or only the selected parts.
The default value is true.
Setting this property does not raise any events.</p>
<p>The <a href="CommandHandler.html#copiesConnectedLinks">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>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
<a name="currentPart" class="tsd-anchor"></a>
<h3>
current<wbr>Part
<span class="tsd-signature-symbol">: </span><a href="Part.html" class="tsd-signature-type" data-tsd-kind="Class">Part</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 name="delay" class="tsd-anchor"></a>
<h3>
delay
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span> </h3>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>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 name="dragOptions" class="tsd-anchor"></a>
<h3>
drag<wbr>Options
<span class="tsd-signature-symbol">: </span><a href="DraggingOptions.html" class="tsd-signature-type" data-tsd-kind="Class">DraggingOptions</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>
<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>
<dl class="tsd-comment-tags">
<dt>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 name="draggedParts" class="tsd-anchor"></a>
<h3>
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> </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>
<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>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
<a name="dragsLink" class="tsd-anchor"></a>
<h3>
drags<wbr>Link
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span> </h3>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>Gets or sets whether the 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>
<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>
<dl class="tsd-comment-tags">
<dt>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 name="dragsTree" class="tsd-anchor"></a>
<h3>
drags<wbr>Tree
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span> </h3>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>Gets or sets whether 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>
<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>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
<a name="gridSnapCellSize" class="tsd-anchor"></a>
<h3>
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> </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>
<p>This property is a convenience getter/setter, and sets a value on <a href="DraggingTool.html#dragOptions">dragOptions</a>.</p>
</div>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
<a name="gridSnapCellSpot" class="tsd-anchor"></a>
<h3>
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> </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>
<p>This property is a convenience getter/setter, and sets a value on <a href="DraggingTool.html#dragOptions">dragOptions</a>.</p>
</div>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
<a name="gridSnapOrigin" class="tsd-anchor"></a>
<h3>
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> </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 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>
<p>This property is a convenience getter/setter, and sets a value on <a href="DraggingTool.html#dragOptions">dragOptions</a>.</p>
</div>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
<a name="isComplexRoutingRealtime" class="tsd-anchor"></a>
<h3>
is<wbr>Complex<wbr>Routing<wbr>Realtime
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span> </h3>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>Gets or sets whether 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>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 name="isCopyEnabled" class="tsd-anchor"></a>
<h3>
is<wbr>Copy<wbr>Enabled
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span> </h3>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>Gets or sets whether 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>
<p>The default value is true.
Setting this property does not raise any events.</p>
<dl class="tsd-comment-tags">
<dt>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 name="isGridSnapEnabled" class="tsd-anchor"></a>
<h3>
is<wbr>Grid<wbr>Snap<wbr>Enabled
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span> </h3>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>Gets or sets whether the <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>
<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>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
<a name="isGridSnapRealtime" class="tsd-anchor"></a>
<h3>
is<wbr>Grid<wbr>Snap<wbr>Realtime
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span> </h3>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>Gets or sets whether the <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>
<p>This property is a convenience getter/setter, and sets a value on <a href="DraggingTool.html#dragOptions">dragOptions</a>.</p>
<dl class="tsd-comment-tags">
<dt>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 name="startPoint" class="tsd-anchor"></a>
<h3>
start<wbr>Point
<span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type" data-tsd-kind="Class">Point</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'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>