UNPKG

gojs

Version:

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

133 lines 77 kB
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>LinkingBaseTool | 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>&reg; Diagramming Components<br/>version 2.3.8<br/>by <a href="https://www.nwoods.com/">Northwoods Software®</a></div><div><h1>Class LinkingBaseTool <span class="tsd-flag ts-flagAbstract">Abstract</span> </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">LinkingBaseTool</span><ul class="tsd-hierarchy"><li><a href="LinkingTool.html" class="tsd-signature-type" data-tsd-kind="Class">LinkingTool</a></li><li><a href="RelinkingTool.html" class="tsd-signature-type" data-tsd-kind="Class">RelinkingTool</a></li></ul></li></ul></li></ul></section><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"> <p>This abstract class is the base class for the <a href="LinkingTool.html">LinkingTool</a> and <a href="RelinkingTool.html">RelinkingTool</a> classes.</p> <div><p>This class includes properties for defining and accessing any temporary nodes and temporary link that are used during any linking operation, as well as access to the existing diagram&#39;s nodes and link (if any) that are involved with the linking operation.</p> <p class="boxread"> For a general discussion of link routing, see: <a href="../../intro/links.html">Introduction to Links</a>, <a href="../../intro/linkLabels.html">Introduction to Link Labels</a>, and <a href="../../intro/connectionPoints.html">Introduction to Link Connection Points</a>. For customizing the linking tools, see <a href="../../intro/tools.html#LinkingAndRelinkingTools">Introduction to the Linking Tools</a>. For customizing the reshaping of Links, see <a href="../../intro/tools.html#LinkReshapingTool">Introduction to the LinkReshapingTool</a>. For a general discussion of validation, see <a href="../../intro/validation.html">Introduction to Validation</a>.</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="LinkingBaseTool.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="LinkingBaseTool.html#isForwards" class="tsd-kind-icon">is<wbr/>Forwards</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LinkingBaseTool.html#isUnconnectedLinkValid" class="tsd-kind-icon">is<wbr/>Unconnected<wbr/>Link<wbr/>Valid</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LinkingBaseTool.html#linkValidation" class="tsd-kind-icon">link<wbr/>Validation</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LinkingBaseTool.html#linkingCursor" class="tsd-kind-icon">linking<wbr/>Cursor</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LinkingBaseTool.html#originalFromNode" class="tsd-kind-icon">original<wbr/>From<wbr/>Node</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LinkingBaseTool.html#originalFromPort" class="tsd-kind-icon">original<wbr/>From<wbr/>Port</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LinkingBaseTool.html#originalLink" class="tsd-kind-icon">original<wbr/>Link</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LinkingBaseTool.html#originalToNode" class="tsd-kind-icon">original<wbr/>To<wbr/>Node</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LinkingBaseTool.html#originalToPort" class="tsd-kind-icon">original<wbr/>To<wbr/>Port</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LinkingBaseTool.html#portGravity" class="tsd-kind-icon">port<wbr/>Gravity</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LinkingBaseTool.html#portTargeted" class="tsd-kind-icon">port<wbr/>Targeted</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LinkingBaseTool.html#targetPort" class="tsd-kind-icon">target<wbr/>Port</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LinkingBaseTool.html#temporaryFromNode" class="tsd-kind-icon">temporary<wbr/>From<wbr/>Node</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LinkingBaseTool.html#temporaryFromPort" class="tsd-kind-icon">temporary<wbr/>From<wbr/>Port</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LinkingBaseTool.html#temporaryLink" class="tsd-kind-icon">temporary<wbr/>Link</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LinkingBaseTool.html#temporaryToNode" class="tsd-kind-icon">temporary<wbr/>To<wbr/>Node</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="LinkingBaseTool.html#temporaryToPort" class="tsd-kind-icon">temporary<wbr/>To<wbr/>Port</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-protected"><a href="LinkingBaseTool.html#copyPortProperties" class="tsd-kind-icon">copy<wbr/>Port<wbr/>Properties</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="LinkingBaseTool.html#doMouseMove" class="tsd-kind-icon">do<wbr/>Mouse<wbr/>Move</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="LinkingBaseTool.html#findTargetPort" class="tsd-kind-icon">find<wbr/>Target<wbr/>Port</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="LinkingBaseTool.html#isInSameNode" class="tsd-kind-icon">is<wbr/>In<wbr/>Same<wbr/>Node</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="LinkingBaseTool.html#isLinked" class="tsd-kind-icon">is<wbr/>Linked</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="LinkingBaseTool.html#isValidCycle" class="tsd-kind-icon">is<wbr/>Valid<wbr/>Cycle</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="LinkingBaseTool.html#isValidFrom" class="tsd-kind-icon">is<wbr/>Valid<wbr/>From</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="LinkingBaseTool.html#isValidLink" class="tsd-kind-icon">is<wbr/>Valid<wbr/>Link</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="LinkingBaseTool.html#isValidTo" class="tsd-kind-icon">is<wbr/>Valid<wbr/>To</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="LinkingBaseTool.html#setNoTargetPortProperties" class="tsd-kind-icon">set<wbr/>No<wbr/>Target<wbr/>Port<wbr/>Properties</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#canStart" class="tsd-kind-icon">Tool.can<wbr/>Start</a></li><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#doActivate" class="tsd-kind-icon">Tool.do<wbr/>Activate</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#doCancel" class="tsd-kind-icon">Tool.do<wbr/>Cancel</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#doDeactivate" class="tsd-kind-icon">Tool.do<wbr/>Deactivate</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#doKeyDown" class="tsd-kind-icon">Tool.do<wbr/>Key<wbr/>Down</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#doKeyUp" class="tsd-kind-icon">Tool.do<wbr/>Key<wbr/>Up</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#doMouseUp" class="tsd-kind-icon">Tool.do<wbr/>Mouse<wbr/>Up</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#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#standardMouseSelect" class="tsd-kind-icon">Tool.standard<wbr/>Mouse<wbr/>Select</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#stopTransaction" class="tsd-kind-icon">Tool.stop<wbr/>Transaction</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/>Linking<wbr/>Base<wbr/>Tool<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="LinkingBaseTool.html" class="tsd-signature-type" data-tsd-kind="Class">LinkingBaseTool</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>Don&#39;t construct this directly -- this is an abstract class.</p> </div><h4 class="tsd-returns-title">Returns <a href="LinkingBaseTool.html" class="tsd-signature-type" data-tsd-kind="Class">LinkingBaseTool</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="isForwards" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> is<wbr/>Forwards<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isForwards" 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 whether the linking operation is in the forwards direction, connecting from the &quot;From&quot; port to the &quot;To&quot; port.</p> </div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="isUnconnectedLinkValid" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> is<wbr/>Unconnected<wbr/>Link<wbr/>Valid<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isUnconnectedLinkValid" 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 it is valid to have partly or completely unconnected links.</p> <div><p>The default value is false -- the user cannot draw or reconnect a link to &quot;nowhere&quot;. Setting this property does not raise any events.</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="linkValidation" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> link<wbr/>Validation<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>fromNode<span class="tsd-signature-symbol">: </span><a href="Node.html" class="tsd-signature-type" data-tsd-kind="Class">Node</a>, fromPort<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a>, toNode<span class="tsd-signature-symbol">: </span><a href="Node.html" class="tsd-signature-type" data-tsd-kind="Class">Node</a>, toPort<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a>, link<span class="tsd-signature-symbol">: </span><a href="Link.html" class="tsd-signature-type" data-tsd-kind="Class">Link</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">boolean</span><a href="#linkValidation" 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 a predicate that determines whether or not a new link between two ports would be valid. This predicate is called in addition to the normal link checking performed by <a href="LinkingBaseTool.html#isValidLink">isValidLink</a> and any <a href="Node.html#linkValidation">Node.linkValidation</a> predicates on the &quot;from&quot; and &quot;to&quot; nodes. When relinking, the <a href="Link.html">Link</a> being considered for reconnection is passed as the fifth argument. The default predicate is null, which is equivalent to simply returning true.</p> <p class="boxread"> For a more general discussion of validation, see <a href="../../intro/validation.html">Introduction to Validation</a>.<div><p>The function, if supplied, must not have any side-effects.</p> </div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="linkingCursor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> linking<wbr/>Cursor<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#linkingCursor" 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 cursor used during the linking or relinking operation. This defaults to &#39;pointer&#39;. Read more about cursors at <a href="Diagram.html#currentCursor">Diagram.currentCursor</a></p> <dl class="tsd-comment-tags"><dt class="">since</dt><dd><p>2.2</p> </dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="originalFromNode" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> original<wbr/>From<wbr/>Node<span class="tsd-signature-symbol">: </span><a href="Node.html" class="tsd-signature-type" data-tsd-kind="Class">Node</a><a href="#originalFromNode" 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 original <a href="Node.html">Node</a> from which the new link is being drawn or from which the <a href="LinkingBaseTool.html#originalLink">originalLink</a> was connected when being relinked. 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="originalFromPort" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> original<wbr/>From<wbr/>Port<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><a href="#originalFromPort" 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="GraphObject.html">GraphObject</a> that is the port in the <a href="LinkingBaseTool.html#originalFromNode">originalFromNode</a>. 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="originalLink" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> original<wbr/>Link<span class="tsd-signature-symbol">: </span><a href="Link.html" class="tsd-signature-type" data-tsd-kind="Class">Link</a><a href="#originalLink" 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 original <a href="Link.html">Link</a> being reconnected by the <a href="RelinkingTool.html">RelinkingTool</a>. 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="originalToNode" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> original<wbr/>To<wbr/>Node<span class="tsd-signature-symbol">: </span><a href="Node.html" class="tsd-signature-type" data-tsd-kind="Class">Node</a><a href="#originalToNode" 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 original <a href="Node.html">Node</a> to which the new link is being drawn or to which the <a href="LinkingBaseTool.html#originalLink">originalLink</a> was connected when being relinked. 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="originalToPort" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> original<wbr/>To<wbr/>Port<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><a href="#originalToPort" 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="GraphObject.html">GraphObject</a> that is the port in the <a href="LinkingBaseTool.html#originalToNode">originalToNode</a>. 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="portGravity" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> port<wbr/>Gravity<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#portGravity" 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 distance at which link snapping occurs. The default value is 100.0. The value must be non-negative. 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="portTargeted" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> port<wbr/>Targeted<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>node<span class="tsd-signature-symbol">: </span><a href="Node.html" class="tsd-signature-type" data-tsd-kind="Class">Node</a>, port<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a>, tempNode<span class="tsd-signature-symbol">: </span><a href="Node.html" class="tsd-signature-type" data-tsd-kind="Class">Node</a>, tempPort<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a>, toEnd<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><a href="#portTargeted" 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 a function that is called as the tool targets the nearest valid port. The first two arguments specify the port by providing the <a href="Node.html">Node</a> that it is in and the <a href="GraphObject.html">GraphObject</a> that is the actual port object. The next two arguments are the temporary port that has been moved and styled to be like the valid port. These values will be either the <a href="LinkingBaseTool.html#temporaryToNode">temporaryToNode</a> and <a href="LinkingBaseTool.html#temporaryToPort">temporaryToPort</a> or the <a href="LinkingBaseTool.html#temporaryFromNode">temporaryFromNode</a> and <a href="LinkingBaseTool.html#temporaryFromPort">temporaryFromPort</a>, depending on which end of the temporary link is being updated. The fifth argument is true if the target port represents a potential &quot;to&quot; end of a link; it is false if it is for the &quot;from&quot; end of a link.</p> <div><p>When there is no valid port within the <a href="LinkingBaseTool.html#portGravity">portGravity</a>, the first two arguments are null.</p> <p>The function, if supplied, must not add or remove any links or nodes or port objects, nor may it change the validity of any potential link connection.</p> </div><dl class="tsd-comment-tags"><dt class="">since</dt><dd><p>1.2</p> </dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="targetPort" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> target<wbr/>Port<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><a href="#targetPort" 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 a proposed <a href="GraphObject.html">GraphObject</a> port for connecting a link. Whether this is a &quot;to&quot; port or a &quot;from&quot; port depends on the direction (<a href="LinkingBaseTool.html#isForwards">isForwards</a>) in which the link is being drawn or reconnected.</p> <div><p>This is set when the mouse is being dragged and when a mouse-up event occurs with the result of a call to <a href="LinkingBaseTool.html#findTargetPort">findTargetPort</a>. Setting this property does not raise any events.</p> </div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="temporaryFromNode" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> temporary<wbr/>From<wbr/>Node<span class="tsd-signature-symbol">: </span><a href="Node.html" class="tsd-signature-type" data-tsd-kind="Class">Node</a><a href="#temporaryFromNode" 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 temporary <a href="Node.html">Node</a> at the &quot;from&quot; end of the <a href="LinkingBaseTool.html#temporaryLink">temporaryLink</a> while the user is drawing or reconnecting a link. 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="temporaryFromPort" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> temporary<wbr/>From<wbr/>Port<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><a href="#temporaryFromPort" 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="GraphObject.html">GraphObject</a> that is the port at the &quot;from&quot; end of the <a href="LinkingBaseTool.html#temporaryLink">temporaryLink</a> while the user is drawing or reconnecting a link. 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="temporaryLink" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> temporary<wbr/>Link<span class="tsd-signature-symbol">: </span><a href="Link.html" class="tsd-signature-type" data-tsd-kind="Class">Link</a><a href="#temporaryLink" 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 temporary <a href="Link.html">Link</a> that is shown while the user is drawing or reconnecting a link. 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="temporaryToNode" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> temporary<wbr/>To<wbr/>Node<span class="tsd-signature-symbol">: </span><a href="Node.html" class="tsd-signature-type" data-tsd-kind="Class">Node</a><a href="#temporaryToNode" 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 temporary <a href="Node.html">Node</a> at the &quot;to&quot; end of the <a href="LinkingBaseTool.html#temporaryLink">temporaryLink</a> while the user is drawing or reconnecting a link. 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="temporaryToPort" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> temporary<wbr/>To<wbr/>Port<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><a href="#temporaryToPort" 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="GraphObject.html">GraphObject</a> that is the port at the &quot;to&quot; end of the <a href="LinkingBaseTool.html#temporaryLink">temporaryLink</a> while the user is drawing or reconnecting a link. Setting this property does not raise any events.</p> </div></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a id="copyPortProperties" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagProtected">Protected</span> <span class="tsd-flag ts-flagVirtual">Virtual</span> copy<wbr/>Port<wbr/>Properties<a href="#copyPortProperties" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected"><li class="tsd-signature tsd-kind-icon">copy<wbr/>Port<wbr/>Properties<span class="tsd-signature-symbol">(</span>realnode<span class="tsd-signature-symbol">: </span><a href="Node.html" class="tsd-signature-type" data-tsd-kind="Class">Node</a>, realport<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a>, tempnode<span class="tsd-signature-symbol">: </span><a href="Node.html" class="tsd-signature-type" data-tsd-kind="Class">Node</a>, tempport<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a>, toend<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>Make a temporary port look and act like a real one.</p> <div><p>This is called by <a href="LinkingBaseTool.html#doMouseMove">doMouseMove</a> as the tool finds new valid target ports. If <a href="LinkingBaseTool.html#findTargetPort">findTargetPort</a> returns null, it calls <a href="LinkingBaseTool.html#setNoTargetPortProperties">setNoTargetPortProperties</a> instead.</p> <p>If the <a href="LinkingBaseTool.html#portTargeted">portTargeted</a> property is a function, that function is called. It is easier to customize the behavior by setting that functional property than it is to override this method and the <a href="LinkingBaseTool.html#setNoTargetPortProperties">setNoTargetPortProperties</a> method. But you may want to call this method to get the standard behavior for dynamically adapting the temporary node/port to &quot;act like&quot; the target port. Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p> </div><dl class="tsd-comment-tags"><dt class="">since</dt><dd><p>1.2</p> </dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>realnode: <a href="Node.html" class="tsd-signature-type" data-tsd-kind="Class">Node</a></h5></li><li><h5>realport: <a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a></h5></li><li><h5>tempnode: <a href="Node.html" class="tsd-signature-type" data-tsd-kind="Class">Node</a></h5></li><li><h5>tempport: <a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a></h5></li><li><h5>toend: <span class="tsd-signature-type">boolean</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="doMouseMove" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOverride">Override</span> do<wbr/>Mouse<wbr/>Move<a href="#doMouseMove" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">do<wbr/>Mouse<wbr/>Move<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>Mouse movement results in a temporary node moving to where a valid target port is located, or to where the mouse is if there is no valid target port nearby.</p> <div><p>This calls <a href="LinkingBaseTool.html#findTargetPort">findTargetPort</a> to update the <a href="LinkingBaseTool.html#targetPort">targetPort</a> given the new mouse point. If a valid target port is found this moves the temporary node/port and makes them appear like the target node/port by calling <a href="LinkingBaseTool.html#copyPortProperties">copyPortProperties</a>. If no valid target port is found, this moves the temporary node to where the mouse currently is and removes any node/port appearance, by calling <a href="LinkingBaseTool.html#setNoTargetPortProperties">setNoTargetPortProperties</a>.</p> <p>This method may be overridden, but we recommend that you call this base method.</p> </div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="findTargetPort" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagVirtual">Virtual</span> find<wbr/>Target<wbr/>Port<a href="#findTargetPort" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">find<wbr/>Target<wbr/>Port<span class="tsd-signature-symbol">(</span>toend<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"> <p>Find a port with which the user could complete a valid link.</p> <div><p>This finds objects near to the current mouse point for which a valid link connection is possible.</p> <p>For each port element found, this calls <a href="LinkingBaseTool.html#isValidLink">isValidLink</a> to find out if a link between the original node/port and the found node/port would be valid. The result is saved in a cache for faster decisions later during operation of this tool. The closest valid port is returned.</p> <p>This method may be overridden, but we recommend that you call this base method. Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p> </div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>toend: <span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"> <p>true if looking for a &quot;to&quot; port.</p> </div></li></ul><h4 class="tsd-returns-title">Returns <a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a></h4><div><p>a valid port, or null if no such port is near the current mouse point within the <a href="LinkingBaseTool.html#portGravity">portGravity</a> distance.</p> </div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="isInSameNode" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagVirtual">Virtual</span> is<wbr/>In<wbr/>Same<wbr/>Node<a href="#isInSameNode" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">is<wbr/>In<wbr/>Same<wbr/>Node<span class="tsd-signature-symbol">(</span>fromport<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObjec