create-gojs-kit
Version:
A CLI for downloading GoJS samples, extensions, and docs
218 lines • 57 kB
HTML
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><link rel="stylesheet" href="../../assets/css/style.css"/><link rel="preconnect" href="https://rsms.me/"/><link rel="stylesheet" href="https://rsms.me/inter/inter.css"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>RelinkingTool | GoJS API</title><meta name="description" content="Documentation for GoJS API"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script type="text/javascript">// formerly in api.js
var hash = null;
function changeHash() {
var panels = document.getElementsByClassName("tsd-panel");
for (let i = 0; i < panels.length; i++) {
var p = panels[i];
p.classList.remove("targeted");
}
hash = window.location.hash.slice(1);
if (hash) {
var elt = document.getElementById(hash);
if (elt) elt.parentNode.classList.add("targeted");
}
}
document.addEventListener("DOMContentLoaded", changeHash);
window.addEventListener("hashchange", changeHash);</script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header><nav id="navTop" class="w-full h-[var(--topnav-h)] z-30 bg-[var(--color-background-secondary)] border-b border-b-[var(--color-accent)]"><div class="max-w-screen-xl mx-auto flex flex-wrap items-start justify-between px-4"><a class="!text-white bg-nwoods-primary font-bold !leading-[calc(var(--topnav-h)_-_1px)] my-0 px-2 text-4xl lg:text-5xl logo" href="../../index.html">GoJS</a><div class="relative"><button id="topnavButton" class="h-[calc(var(--topnav-h)_-_1px)] px-2 m-0 text-[var(--color-text)] bg-inherit shadow-none md:hidden hover:!bg-inherit hover:!text-nwoods-accent hover:!shadow-none" aria-label="Navigation"><svg class="h-7 w-7 block" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div id="topnavList" class="hidden md:block"><div class="absolute right-0 z-30 flex flex-col items-end rounded border border-[var(--color-accent)] p-4 pl-12 shadow bg-[var(--color-background-secondary)] text-[var(--color-text)] font-semibold
md:flex-row md:space-x-4 md:items-start md:border-0 md:p-0 md:shadow-none md:!bg-inherit"><a href="../../learn/index.html">Learn</a><a href="../../samples/index.html">Samples</a><a href="../../intro/index.html">Intro</a><a class="active" href="../../api/index.html">API</a><a href="../../download.html">Download</a><a href="https://forum.nwoods.com/c/gojs/11" target="_blank" rel="noopener">Forum</a><a href="https://nwoods.com/contact.html" target="_blank" rel="noopener" id="contactBtn">Contact</a><a href="https://nwoods.com/sales/index.html" target="_blank" rel="noopener" id="buyBtn">Buy</a></div></div></div></div></nav><script>window.addEventListener("DOMContentLoaded", function () {
// topnav
var topButton = document.getElementById("topnavButton");
var topnavList = document.getElementById("topnavList");
if (topButton && topnavList) {
topButton.addEventListener("click", function (e) {
topnavList
.classList
.toggle("hidden");
e.stopPropagation();
});
document.addEventListener("click", function (e) {
// if the clicked element isn't the list, close the list
if (!topnavList.classList.contains("hidden") && !e.target.closest("#topnavList")) {
topButton.click();
}
});
// set active <a> element
// done via active tag below, always API
}
});</script><div class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><div id="tsd-search-help"><code class="!text-lg">/</code> to search</div><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">GoJS API</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><div class="flex w-full max-w-screen-xl mx-auto px-2 items-center justify-between"><div><ul class="tsd-breadcrumb"><li><a href="../index.html">GoJS API</a></li><li><a href="RelinkingTool.html">RelinkingTool</a></li></ul><h1 class="flex items-center">Class RelinkingTool</h1></div><div class="text-xs"><b>GoJS</b>® Diagramming Components<br/>version 3.1.0<br/>by <a href="https://nwoods.com/">Northwoods Software®</a></div></div></div><section class="tsd-panel tsd-hierarchy"><h4>Hierarchy (<a class="link" href="../hierarchy.html#RelinkingTool">view full</a>)</h4><ul class="tsd-hierarchy"><li><a href="LinkingBaseTool.html" class="tsd-signature-type tsd-kind-class">LinkingBaseTool</a><ul class="tsd-hierarchy"><li><span class="target">RelinkingTool</span></li></ul></li></ul></section><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>The RelinkingTool allows the user to reconnect an existing <a href="Link.html" class="tsd-kind-class">Link</a>
if the <a href="Link.html#relinkableTo" class="tsd-kind-accessor">Link.relinkableTo</a> and/or <a href="Link.html#relinkableFrom" class="tsd-kind-accessor">Link.relinkableFrom</a> properties are true.</p>
<p class="boxread">
For a general discussion of validation, see <a href="../../intro/validation.html">Introduction to Validation</a>.
<p>By default an instance of this tool is installed as a mouse-down tool in the
<a href="Diagram.html#toolManager" class="tsd-kind-accessor">Diagram.toolManager</a> as the <a href="ToolManager.html#relinkingTool" class="tsd-kind-accessor">ToolManager.relinkingTool</a>.</p>
<p>This tool makes use of two <a href="Adornment.html" class="tsd-kind-class">Adornment</a>s,
each including a relink handle (potentially one for each end of the link),
shown when a link is selected.</p>
<p>This tool conducts a transaction while the tool is active.
A successful relinking will result in a "LinkRelinked" <a href="DiagramEvent.html" class="tsd-kind-class">DiagramEvent</a> and a "Relinking" transaction.</p>
<p>If you want to programmatically start a new user's relinking of a <a href="Link.html" class="tsd-kind-class">Link</a>,
you can set the <a href="RelinkingTool.html#handle" class="tsd-kind-accessor">handle</a> property to the specific "RelinkFrom" or "RelinkTo" handle and
then start and activate the tool.</p>
<pre><code class="language-js"><span class="hl-2"> </span><span class="hl-1">const</span><span class="hl-2"> </span><span class="hl-3">tool</span><span class="hl-2"> = </span><span class="hl-4">myDiagram</span><span class="hl-2">.</span><span class="hl-4">toolManager</span><span class="hl-2">.</span><span class="hl-4">relinkingTool</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-4">tool</span><span class="hl-2">.</span><span class="hl-4">originalLink</span><span class="hl-2"> = ...; </span><span class="hl-0">// specify which Link to have the user reconnect</span><br/><span class="hl-2"> </span><span class="hl-4">tool</span><span class="hl-2">.</span><span class="hl-4">isForwards</span><span class="hl-2"> = </span><span class="hl-1">true</span><span class="hl-2">; </span><span class="hl-0">// specify which end of the Link to reconnect</span><br/><span class="hl-2"> </span><span class="hl-4">myDiagram</span><span class="hl-2">.</span><span class="hl-4">currentTool</span><span class="hl-2"> = </span><span class="hl-4">tool</span><span class="hl-2">; </span><span class="hl-0">// starts the RelinkingTool</span><br/><span class="hl-2"> </span><span class="hl-4">tool</span><span class="hl-2">.</span><span class="hl-5">doActivate</span><span class="hl-2">(); </span><span class="hl-0">// activates the RelinkingTool</span>
</code><button>Copy</button></pre>
</div></section><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="true" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="RelinkingTool.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Accessors</h3><div class="tsd-index-list"><a href="RelinkingTool.html#fromHandleArchetype" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>from<wbr/>Handle<wbr/>Archetype</span></a>
<a href="RelinkingTool.html#handle" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>handle</span></a>
<a href="RelinkingTool.html#toHandleArchetype" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>to<wbr/>Handle<wbr/>Archetype</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="RelinkingTool.html#canStart" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>can<wbr/>Start</span></a>
<a href="RelinkingTool.html#copyLinkProperties" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>copy<wbr/>Link<wbr/>Properties</span></a>
<a href="RelinkingTool.html#doActivate" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Activate</span></a>
<a href="RelinkingTool.html#doDeactivate" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Deactivate</span></a>
<a href="RelinkingTool.html#doMouseUp" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Mouse<wbr/>Up</span></a>
<a href="RelinkingTool.html#doNoRelink" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>No<wbr/>Relink</span></a>
<a href="RelinkingTool.html#reconnectLink" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reconnect<wbr/>Link</span></a>
<a href="RelinkingTool.html#updateAdornments" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>update<wbr/>Adornments</span></a>
</div></section></div></details></section></section><section class="tsd-panel-group tsd-index-group tsd-is-inherited"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-index-accordion"><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Inherited Index</h5></summary><div class="tsd-accordion-details"><div class="tsd-index-content"><section class="tsd-index-section"><h3 class="tsd-index-heading">Accessors</h3><div class="tsd-index-list"><a href="LinkingBaseTool.html#isForwards" class="tsd-index-link"><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><g id="subicon-R,#FF4D4D"><rect fill="var(--color-icon-background)" width="28" height="28" rx="14"></rect><path transform="translate(2, 2)" fill="none" stroke-width="1.5" stroke="var(--color-text)" d="M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z" stroke-linecap="round" stroke-linejoin="round"></path></g></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.is<wbr/>Forwards</span></a>
<a href="LinkingBaseTool.html#isUnconnectedLinkValid" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.is<wbr/>Unconnected<wbr/>Link<wbr/>Valid</span></a>
<a href="LinkingBaseTool.html#linkValidation" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.link<wbr/>Validation</span></a>
<a href="LinkingBaseTool.html#linkingCursor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.linking<wbr/>Cursor</span></a>
<a href="LinkingBaseTool.html#originalFromNode" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.original<wbr/>From<wbr/>Node</span></a>
<a href="LinkingBaseTool.html#originalFromPort" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.original<wbr/>From<wbr/>Port</span></a>
<a href="LinkingBaseTool.html#originalLink" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.original<wbr/>Link</span></a>
<a href="LinkingBaseTool.html#originalToNode" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.original<wbr/>To<wbr/>Node</span></a>
<a href="LinkingBaseTool.html#originalToPort" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.original<wbr/>To<wbr/>Port</span></a>
<a href="LinkingBaseTool.html#portGravity" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.port<wbr/>Gravity</span></a>
<a href="LinkingBaseTool.html#portTargeted" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.port<wbr/>Targeted</span></a>
<a href="LinkingBaseTool.html#targetPort" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.target<wbr/>Port</span></a>
<a href="LinkingBaseTool.html#temporaryFromNode" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.temporary<wbr/>From<wbr/>Node</span></a>
<a href="LinkingBaseTool.html#temporaryFromPort" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.temporary<wbr/>From<wbr/>Port</span></a>
<a href="LinkingBaseTool.html#temporaryLink" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.temporary<wbr/>Link</span></a>
<a href="LinkingBaseTool.html#temporaryToNode" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.temporary<wbr/>To<wbr/>Node</span></a>
<a href="LinkingBaseTool.html#temporaryToPort" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.temporary<wbr/>To<wbr/>Port</span></a>
<a href="Tool.html#diagram" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Tool.diagram</span></a>
<a href="Tool.html#isActive" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Tool.is<wbr/>Active</span></a>
<a href="Tool.html#isEnabled" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Tool.is<wbr/>Enabled</span></a>
<a href="Tool.html#name" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Tool.name</span></a>
<a href="Tool.html#transactionResult" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>Tool.transaction<wbr/>Result</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="LinkingBaseTool.html#copyPortProperties" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.copy<wbr/>Port<wbr/>Properties</span></a>
<a href="LinkingBaseTool.html#doMouseMove" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.do<wbr/>Mouse<wbr/>Move</span></a>
<a href="LinkingBaseTool.html#findTargetPort" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.find<wbr/>Target<wbr/>Port</span></a>
<a href="LinkingBaseTool.html#isInSameNode" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.is<wbr/>In<wbr/>Same<wbr/>Node</span></a>
<a href="LinkingBaseTool.html#isLinked" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.is<wbr/>Linked</span></a>
<a href="LinkingBaseTool.html#isValidCycle" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.is<wbr/>Valid<wbr/>Cycle</span></a>
<a href="LinkingBaseTool.html#isValidFrom" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.is<wbr/>Valid<wbr/>From</span></a>
<a href="LinkingBaseTool.html#isValidLink" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.is<wbr/>Valid<wbr/>Link</span></a>
<a href="LinkingBaseTool.html#isValidTo" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.is<wbr/>Valid<wbr/>To</span></a>
<a href="LinkingBaseTool.html#setNoTargetPortProperties" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Linking<wbr/>Base<wbr/>Tool.set<wbr/>No<wbr/>Target<wbr/>Port<wbr/>Properties</span></a>
<a href="Tool.html#canStartMultiTouch" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.can<wbr/>Start<wbr/>Multi<wbr/>Touch</span></a>
<a href="Tool.html#cancelWaitAfter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.cancel<wbr/>Wait<wbr/>After</span></a>
<a href="Tool.html#doCancel" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.do<wbr/>Cancel</span></a>
<a href="Tool.html#doKeyDown" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.do<wbr/>Key<wbr/>Down</span></a>
<a href="Tool.html#doKeyUp" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.do<wbr/>Key<wbr/>Up</span></a>
<a href="Tool.html#doMouseDown" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.do<wbr/>Mouse<wbr/>Down</span></a>
<a href="Tool.html#doMouseWheel" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.do<wbr/>Mouse<wbr/>Wheel</span></a>
<a href="Tool.html#doStart" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.do<wbr/>Start</span></a>
<a href="Tool.html#doWaitAfter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.do<wbr/>Wait<wbr/>After</span></a>
<a href="Tool.html#findToolHandleAt" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.find<wbr/>Tool<wbr/>Handle<wbr/>At</span></a>
<a href="Tool.html#isBeyondDragSize" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.is<wbr/>Beyond<wbr/>Drag<wbr/>Size</span></a>
<a href="Tool.html#standardMouseClick" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.standard<wbr/>Mouse<wbr/>Click</span></a>
<a href="Tool.html#standardMouseOver" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.standard<wbr/>Mouse<wbr/>Over</span></a>
<a href="Tool.html#standardMouseSelect" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.standard<wbr/>Mouse<wbr/>Select</span></a>
<a href="Tool.html#standardMouseWheel" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.standard<wbr/>Mouse<wbr/>Wheel</span></a>
<a href="Tool.html#standardPinchZoomMove" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.standard<wbr/>Pinch<wbr/>Zoom<wbr/>Move</span></a>
<a href="Tool.html#standardPinchZoomStart" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.standard<wbr/>Pinch<wbr/>Zoom<wbr/>Start</span></a>
<a href="Tool.html#standardWaitAfter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.standard<wbr/>Wait<wbr/>After</span></a>
<a href="Tool.html#startTransaction" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.start<wbr/>Transaction</span></a>
<a href="Tool.html#stopTool" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.stop<wbr/>Tool</span></a>
<a href="Tool.html#stopTransaction" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>Tool.stop<wbr/>Transaction</span></a>
</div></section></div></div></details></section></section><section class="tsd-panel-group tsd-member-group"><h2>Constructors</h2><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_RelinkingTool" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Relinking<wbr/>Tool</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">init</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="RelinkingTool.html" class="tsd-signature-type tsd-kind-class">RelinkingTool</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="RelinkingTool.html" class="tsd-signature-type tsd-kind-class">RelinkingTool</a><a href="#constructor.new_RelinkingTool" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>You do not normally need to create an instance of this tool
because one already exists as the <a href="ToolManager.html#relinkingTool" class="tsd-kind-accessor">ToolManager.relinkingTool</a>, which you can modify.</p>
<p>The <a href="Tool.html#name" class="tsd-kind-accessor">Tool.name</a> of this tool is "Relinking".</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">init</span>: <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="RelinkingTool.html" class="tsd-signature-type tsd-kind-class">RelinkingTool</a><span class="tsd-signature-symbol">></span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <a href="RelinkingTool.html" class="tsd-signature-type tsd-kind-class">RelinkingTool</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group"><h2>Accessors</h2><section class="tsd-panel tsd-member"><a id="fromHandleArchetype" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>from<wbr/>Handle<wbr/>Archetype</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type tsd-kind-class">GraphObject</a></div><a href="#fromHandleArchetype" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets a small GraphObject that is copied as a relinking handle for the selected link path
at the "from" end of the link.
By default this is a <a href="Shape.html" class="tsd-kind-class">Shape</a> that is a small blue diamond.
Setting this property does not raise any events.</p>
<p>Here is an example of changing the default handle to be larger green triangles:</p>
<pre><code class="language-js"><span class="hl-2"> </span><span class="hl-4">myDiagram</span><span class="hl-2">.</span><span class="hl-4">toolManager</span><span class="hl-2">.</span><span class="hl-4">relinkingTool</span><span class="hl-2">.</span><span class="hl-4">fromHandleArchetype</span><span class="hl-2"> =</span><br/><span class="hl-2"> </span><span class="hl-1">new</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-5">Shape</span><span class="hl-2">(</span><span class="hl-6">'Triangle'</span><span class="hl-2">,</span><br/><span class="hl-2"> { </span><span class="hl-4">width:</span><span class="hl-2"> </span><span class="hl-7">10</span><span class="hl-2">, </span><span class="hl-4">height:</span><span class="hl-2"> </span><span class="hl-7">10</span><span class="hl-2">, </span><span class="hl-4">fill:</span><span class="hl-2"> </span><span class="hl-6">'limegreen'</span><span class="hl-2">, </span><span class="hl-4">segmentIndex:</span><span class="hl-2"> </span><span class="hl-7">0</span><span class="hl-2">, </span><span class="hl-4">cursor:</span><span class="hl-2"> </span><span class="hl-6">'pointer'</span><span class="hl-2"> });</span>
</code><button>Copy</button></pre>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><p><a href="RelinkingTool.html#toHandleArchetype" class="tsd-kind-accessor">toHandleArchetype</a></p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="handle" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>handle</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type tsd-kind-class">GraphObject</a></div><a href="#handle" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the <a href="GraphObject.html" class="tsd-kind-class">GraphObject</a> that is the tool handle being dragged by the user.
This will be contained by an <a href="Adornment.html" class="tsd-kind-class">Adornment</a> whose category is "RelinkFrom" or "RelinkTo".
Its <a href="Adornment.html#adornedPart" class="tsd-kind-accessor">Adornment.adornedPart</a> is the same as the originalLink.</p>
<p>This property is also settable, but should only be set either within an override of <a href="RelinkingTool.html#doActivate" class="tsd-kind-method">doActivate</a>
or prior to calling <a href="RelinkingTool.html#doActivate" class="tsd-kind-method">doActivate</a>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="toHandleArchetype" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>to<wbr/>Handle<wbr/>Archetype</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type tsd-kind-class">GraphObject</a></div><a href="#toHandleArchetype" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets a small GraphObject that is copied as a relinking handle for the selected link path
at the "to" end of the link.
By default this is a <a href="Shape.html" class="tsd-kind-class">Shape</a> that is a small blue diamond.
Setting this property does not raise any events.</p>
<p>Here is an example of changing the default handle to be larger orange triangles:</p>
<pre><code class="language-js"><span class="hl-2"> </span><span class="hl-4">myDiagram</span><span class="hl-2">.</span><span class="hl-4">toolManager</span><span class="hl-2">.</span><span class="hl-4">relinkingTool</span><span class="hl-2">.</span><span class="hl-4">toHandleArchetype</span><span class="hl-2"> =</span><br/><span class="hl-2"> </span><span class="hl-1">new</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-5">Shape</span><span class="hl-2">(</span><span class="hl-6">'Triangle'</span><span class="hl-2">,</span><br/><span class="hl-2"> { </span><span class="hl-4">width:</span><span class="hl-2"> </span><span class="hl-7">10</span><span class="hl-2">, </span><span class="hl-4">height:</span><span class="hl-2"> </span><span class="hl-7">10</span><span class="hl-2">, </span><span class="hl-4">fill:</span><span class="hl-2"> </span><span class="hl-6">'orange'</span><span class="hl-2">, </span><span class="hl-4">segmentIndex:</span><span class="hl-2"> -</span><span class="hl-7">1</span><span class="hl-2">, </span><span class="hl-4">cursor:</span><span class="hl-2"> </span><span class="hl-6">'pointer'</span><span class="hl-2"> });</span>
</code><button>Copy</button></pre>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><p><a href="RelinkingTool.html#fromHandleArchetype" class="tsd-kind-accessor">fromHandleArchetype</a></p>
</div></div></li></ul></section></section><section class="tsd-panel-group tsd-member-group"><h2>Methods</h2><section class="tsd-panel tsd-member"><a id="canStart" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOverride">Override</code><span>can<wbr/>Start</span><a href="#canStart" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="canStart.canStart-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">can<wbr/>Start</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#canStart.canStart-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This tool can run when the diagram allows relinking, the model is modifiable,
and there is a relink handle at the mouse-down point.</p>
<p>This method may be overridden, but we recommend that you call this base method.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="copyLinkProperties" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <code class="tsd-tag ts-flagVirtual">Virtual</code><span>copy<wbr/>Link<wbr/>Properties</span><a href="#copyLinkProperties" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected"><li class="tsd-signature tsd-anchor-link"><a id="copyLinkProperties.copyLinkProperties-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">copy<wbr/>Link<wbr/>Properties</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">reallink</span><span class="tsd-signature-symbol">: </span><a href="Link.html" class="tsd-signature-type tsd-kind-class">Link</a>, <span class="tsd-kind-parameter">templink</span><span class="tsd-signature-symbol">: </span><a href="Link.html" class="tsd-signature-type tsd-kind-class">Link</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#copyLinkProperties.copyLinkProperties-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Make a temporary link look and act like the real Link being relinked.
By default this method copies many of the routing-oriented properties
from the <a href="LinkingBaseTool.html#originalLink" class="tsd-kind-accessor">LinkingBaseTool.originalLink</a> to the <a href="LinkingBaseTool.html#temporaryLink" class="tsd-kind-accessor">LinkingBaseTool.temporaryLink</a>.</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 class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">reallink</span>: <a href="Link.html" class="tsd-signature-type tsd-kind-class">Link</a></h5></li><li><h5><span class="tsd-kind-parameter">templink</span>: <a href="Link.html" class="tsd-signature-type tsd-kind-class">Link</a></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="doActivate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOverride">Override</code><span>do<wbr/>Activate</span><a href="#doActivate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="doActivate.doActivate-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">do<wbr/>Activate</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#doActivate.doActivate-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Start the relinking operation.</p>
<p>Find the relink handle by calling <a href="Tool.html#findToolHandleAt" class="tsd-kind-method">Tool.findToolHandleAt</a>
looking for either the "RelinkFrom" adornment or the "RelinkTo" adornment,
saving the result in <a href="RelinkingTool.html#handle" class="tsd-kind-accessor">handle</a>.</p>
<p>Normally when this method is called the value of <a href="LinkingBaseTool.html#originalLink" class="tsd-kind-accessor">LinkingBaseTool.originalLink</a> and <a href="RelinkingTool.html#handle" class="tsd-kind-accessor">handle</a> will be null,
resulting in a call to <a href="Tool.html#findToolHandleAt" class="tsd-kind-method">Tool.findToolHandleAt</a> to find a "RelinkFrom" or "RelinkTo" tool handle,
which is then remembered as the value of <a href="RelinkingTool.html#handle" class="tsd-kind-accessor">handle</a>.
If when this method is called the value of <a href="RelinkingTool.html#handle" class="tsd-kind-accessor">handle</a> is already set,
then there is no need to call <a href="Tool.html#findToolHandleAt" class="tsd-kind-method">Tool.findToolHandleAt</a>,
because the programmer has already set up which relinking handle they want the user to be relinking.
Finding a handle is not necessary if <a href="LinkingBaseTool.html#originalLink" class="tsd-kind-accessor">LinkingBaseTool.originalLink</a> and
isForwards have been set before calling this method.</p>
<p>This starts a transaction, captures the mouse, and sets the cursor.</p>
<p>If <a href="LinkingBaseTool.html#originalLink" class="tsd-kind-accessor">LinkingBaseTool.originalLink</a> or <a href="RelinkingTool.html#handle" class="tsd-kind-accessor">handle</a> was not set beforehand,
the value of isForwards is set depending on the category of the relink handle found.
The <a href="LinkingBaseTool.html#originalLink" class="tsd-kind-accessor">LinkingBaseTool.originalLink</a> property and various
"Original..." port and node properties are set too.
The temporary nodes and temporary link are also initialized.</p>
<p>This method may be overridden, but we recommend that you call this base method.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="doDeactivate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOverride">Override</code><span>do<wbr/>Deactivate</span><a href="#doDeactivate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="doDeactivate.doDeactivate-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">do<wbr/>Deactivate</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#doDeactivate.doDeactivate-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Finishing the linking operation stops the transaction, releases the mouse, and resets the cursor.</p>
<p>This method may be overridden, but we recommend that you call this base method.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="doMouseUp" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOverride">Override</code><span>do<wbr/>Mouse<wbr/>Up</span><a href="#doMouseUp" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="doMouseUp.doMouseUp-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">do<wbr/>Mouse<wbr/>Up</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#doMouseUp.doMouseUp-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>A mouse-up ends the relinking operation; if there is a valid targetPort nearby,
this modifies the old link to connect with the target port.</p>
<p>A successful relinking calls <a href="RelinkingTool.html#reconnectLink" class="tsd-kind-method">reconnectLink</a> to actually change the link.
The "LinkRelinked" <a href="DiagramEvent.html" class="tsd-kind-class">DiagramEvent</a> is raised with the link as the <a href="DiagramEvent.html#subject" class="tsd-kind-accessor">DiagramEvent.subject</a>
and with the now-disconnected original port as the <a href="DiagramEvent.html#parameter" class="tsd-kind-accessor">DiagramEvent.parameter</a>.
If the link was not reconnected, this calls <a href="RelinkingTool.html#doNoRelink" class="tsd-kind-method">doNoRelink</a>.
In any case this stops the tool.</p>
<p>A failure to find a valid target port results in no changes and no DiagramEvent.</p>
<p>This method may be overridden, but we recommend that you call this base method.
You might find it easier to override <a href="RelinkingTool.html#reconnectLink" class="tsd-kind-method">reconnectLink</a>.
It is actually most common to implement a "LinkRelinked" <a href="DiagramEvent.html" class="tsd-kind-class">DiagramEvent</a> listener on the <a href="Diagram.html" class="tsd-kind-class">Diagram</a>.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="doNoRelink" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>do<wbr/>No<wbr/>Relink</span><a href="#doNoRelink" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="doNoRelink.doNoRelink-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">do<wbr/>No<wbr/>Relink</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">existinglink</span><span class="tsd-signature-symbol">: </span><a href="Link.html" class="tsd-signature-type tsd-kind-class">Link</a>, <span class="tsd-kind-parameter">toend</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#doNoRelink.doNoRelink-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This method is called upon a mouse up when <a href="RelinkingTool.html#reconnectLink" class="tsd-kind-method">reconnectLink</a> is not called.</p>
<p>This method may be overridden. By default this method does nothing.
If you want to successfully perform any side-effects, you will need to set <a href="Tool.html#transactionResult" class="tsd-kind-accessor">Tool.transactionResult</a> to a string;
otherwise this tool's transaction will be rolled-back.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">existinglink</span>: <a href="Link.html" class="tsd-signature-type tsd-kind-class">Link</a></h5></li><li><h5><span class="tsd-kind-parameter">toend</span>: <span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><p>If true, the user was trying to modify the link's "to" node and port.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="reconnectLink" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>reconnect<wbr/>Link</span><a href="#reconnectLink" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="reconnectLink.reconnectLink-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">reconnect<wbr/>Link</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">existinglink</span><span class="tsd-signature-symbol">: </span><a href="Link.html" class="tsd-signature-type tsd-kind-class">Link</a>, <span class="tsd-kind-parameter">newnode</span><span class="tsd-signature-symbol">: </span><a href="Node.html" class="tsd-signature-type tsd-kind-class">Node</a>, <span class="tsd-kind-parameter">newport</span><span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type tsd-kind-class">GraphObject</a>, <span class="tsd-kind-parameter">toend</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#reconnectLink.reconnectLink-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Modify an existing <a href="Link.html" class="tsd-kind-class">Link</a> to connect to a new node and port.</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 class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">existinglink</span>: <a href="Link.html" class="tsd-signature-type tsd-kind-class">Link</a></h5></li><li><h5><span class="tsd-kind-parameter">newnode</span>: <a href="Node.html" class="tsd-signature-type tsd-kind-class">Node</a></h5><div class="tsd-comment tsd-typography"><p>the <a href="Node.html" class="tsd-kind-class">Node</a> to connect to or from.</p>
</div></li><li><h5><span class="tsd-kind-parameter">newport</span>: <a href="GraphObject.html" class="tsd-signature-type tsd-kind-class">GraphObject</a></h5><div class="tsd-comment tsd-typography"><p>the <a href="GraphObject.html" class="tsd-kind-class">GraphObject</a> port to connect to or from.</p>
</div></li><li><h5><span class="tsd-kind-parameter">toend</span>: <span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><p>If true, this modifies the link's "to" node and port; otherwise it modifies the "from" node and port.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>true if successful.</p>
<div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><p><a href="RelinkingTool.html#doNoRelink" class="tsd-kind-method">doNoRelink</a></p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="updateAdornments" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOverride">Override</code><span>update<wbr/>Adornments</span><a href="#updateAdornments" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="updateAdornments.updateAdornments-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">update<wbr/>Adornments</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">part</span><span class="tsd-signature-symbol">: </span><a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#updateAdornments.updateAdornments-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Show an <a href="Adornment.html" class="tsd-kind-class">Adornment</a> for each end of the <a href="Link.html" class="tsd-kind-class">Link</a> that the user may reconnect.
The Adornment may have a copy of <a href="RelinkingTool.html#fromHandleArchetype" class="tsd-kind-accessor">fromHandleArchetype</a> and/or <a href="RelinkingTool.html#toHandleArchetype" class="tsd-kind-accessor">toHandleArchetype</a>.</p>
<p>This method may be overridden.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">part</span>: <a href="Part.html" class="tsd-signature-type tsd-kind-class">Part</a></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section></section></div><div class="col-sidebar"><div class="page-menu"><details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><ul><li><a href="#constructor"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></li><li><a href="#fromHandleArchetype"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>from<wbr/>Handle<wbr/>Archetype</span></a></li><li><a href="#handle"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>handle</span></a></li><li><a href="#toHandleArchetype"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>to<wbr/>Handle<wbr/>Archetype</span></a></li><li><a href="#canStart"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>can<wbr/>Start</span></a></li><li><a href="#copyLinkProperties" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>copy<wbr/>Link<wbr/>Properties</span></a></li><li><a href="#doActivate"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Activate</span></a></li><li><a href="#doDeactivate"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Deactivate</span></a></li><li><a href="#doMouseUp"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>Mouse<wbr/>Up</span></a></li><li><a href="#doNoRelink"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>do<wbr/>No<wbr/>Relink</span></a></li><li><a href="#reconnectLink"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reconnect<wbr/>Link</span></a></li><li><a href="#updateAdornments"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>update<wbr/>Adornments</span></a></li></ul></div></details><div class="tsd-navigation settings"><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">System</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>GoJS API</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><div class="tsd w-full max-w-screen-xl mx-auto px-2"><div class="bottom-copyright">Copyright © 1998-2025 by Northwoods Software Corporation.</div></div><div class="overlay"></div><script async src="https://www.googletagmanager.com/gtag/js?id=G-S5QK8VSK84"></script><script>window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-S5QK8VSK84');
var getOutboundLink = function(url, label) {
gtag('event', 'click', {
'event_category': 'outbound',
'event_label': label,
'transport_type': 'beacon'
});
}
document.getElementById("contactBtn").addEventListener("click", function() {
getOutboundLink('https://nwoods.com/contact.html', 'contact');
});
document.getElementById("buyBtn").addEventListener("click", function() {
getOutboundLink('https://nwoods.com/sales/index.html', 'buy');
});</script></body></html>