markgojs
Version:
Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams
1,577 lines (531 loc) • 56.9 kB
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>GoJS® RelinkingTool Class</title>
<script src="../../assets/js/jquery.min.js"></script>
<script src="../../assets/js/bootstrap.min.js"></script>
<script src="../../assets/js/highlight.js"></script>
<script src="../../assets/js/api.js"></script>
<script src="../../assets/js/fuse.min.js"></script>
<link href="../../assets/css/bootstrap.min.css" rel="stylesheet" >
<!-- custom CSS after bootstrap -->
<link href="../../assets/css/main.css" rel="stylesheet" type="text/css"/>
<link href="../../assets/css/api.css" rel="stylesheet" type="text/css"/>
<!--<link rel="stylesheet" href="../../assets/css/api.css" type="text/css" media="all" />-->
<link rel="stylesheet" href="../../assets/css/highlight.css" type="text/css" media="all" />
</head>
<body>
<!-- non-fixed navbar -->
<nav id="non-fixed-nav" class="navbar navbar-inverse navbar-top">
<div class="container-fluid">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#navbar">
<a id="toplogo" class="navbar-brand" href="../../index.html">GoJS</a>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
</div>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="../../index.html">Home</a></li>
<li><a href="../../learn/index.html">Learn</a></li>
<li><a href="../../samples/index.html">Samples</a></li>
<li><a href="../../intro/index.html">Intro</a></li>
<li><a href="../../api/index.html">API</a></li>
<li><a href="https://www.nwoods.com/components/evalform.htm">Register</a></li>
<li><a href="../../download.html">Download</a></li>
<li><a href="https://forum.nwoods.com/c/gojs">Forum</a></li>
<li><a href="https://www.nwoods.com/contact.html" onclick="ga('send','event','Outbound Link','click','contact');">Contact</a></li>
<li class="buy"><a href="https://www.nwoods.com/sales/index.html" onclick="ga('send','event','Outbound Link','click','buy');">Buy</a></li>
<li class="activate"><a href="https://www.nwoods.com/app/activate.aspx?sku=gojs">Activate</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="container-fluid">
<!-- ============================== classes index ============================ -->
<div id="navindex" class="col-md-2">
<!-- begin publish.classesIndex -->
<!-- <div><a href="../index.html">GoJS Class Index</a></div> -->
<div class="sidebar-nav">
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#DiagramNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#DiagramNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Diagram Classes</span>
</div>
</div>
<div id="DiagramNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/Adornment.html" class="linkConstructor">Adornment</a></li>
<li><a href="../symbols/AnimationManager.html" class="linkConstructor">AnimationManager</a></li>
<li><a href="../symbols/CommandHandler.html" class="linkConstructor">CommandHandler</a></li>
<li><a href="../symbols/Diagram.html" class="linkConstructor">Diagram</a></li>
<li><a href="../symbols/DiagramEvent.html" class="linkConstructor">DiagramEvent</a></li>
<li><a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a></li>
<li><a href="../symbols/Group.html" class="linkConstructor">Group</a></li>
<li><a href="../symbols/InputEvent.html" class="linkConstructor">InputEvent</a></li>
<li><a href="../symbols/Layer.html" class="linkConstructor">Layer</a></li>
<li><a href="../symbols/Link.html" class="linkConstructor">Link</a></li>
<li><a href="../symbols/Node.html" class="linkConstructor">Node</a></li>
<li><a href="../symbols/Overview.html" class="linkConstructor">Overview</a></li>
<li><a href="../symbols/Palette.html" class="linkConstructor">Palette</a></li>
<li><a href="../symbols/Panel.html" class="linkConstructor">Panel</a></li>
<li><a href="../symbols/Part.html" class="linkConstructor">Part</a></li>
<li><a href="../symbols/Picture.html" class="linkConstructor">Picture</a></li>
<li><a href="../symbols/Placeholder.html" class="linkConstructor">Placeholder</a></li>
<li><a href="../symbols/RowColumnDefinition.html" class="linkConstructor">RowColumnDefinition</a></li>
<li><a href="../symbols/Shape.html" class="linkConstructor">Shape</a></li>
<li><a href="../symbols/TextBlock.html" class="linkConstructor">TextBlock</a></li>
</ul>
</div>
</div>
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#GeometryNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#GeometryNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Geometry Classes</span>
</div>
</div>
<div id="GeometryNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/Brush.html" class="linkConstructor">Brush</a></li>
<li><a href="../symbols/Geometry.html" class="linkConstructor">Geometry</a></li>
<li><a href="../symbols/Margin.html" class="linkConstructor">Margin</a></li>
<li><a href="../symbols/PathFigure.html" class="linkConstructor">PathFigure</a></li>
<li><a href="../symbols/PathSegment.html" class="linkConstructor">PathSegment</a></li>
<li><a href="../symbols/Point.html" class="linkConstructor">Point</a></li>
<li><a href="../symbols/Rect.html" class="linkConstructor">Rect</a></li>
<li><a href="../symbols/Size.html" class="linkConstructor">Size</a></li>
<li><a href="../symbols/Spot.html" class="linkConstructor">Spot</a></li>
</ul>
</div>
</div>
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#ModelNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#ModelNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Model Classes</span>
</div>
</div>
<div id="ModelNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/Binding.html" class="linkConstructor">Binding</a></li>
<li><a href="../symbols/ChangedEvent.html" class="linkConstructor">ChangedEvent</a></li>
<li><a href="../symbols/GraphLinksModel.html" class="linkConstructor">GraphLinksModel</a></li>
<li><a href="../symbols/Model.html" class="linkConstructor">Model</a></li>
<li><a href="../symbols/Transaction.html" class="linkConstructor">Transaction</a></li>
<li><a href="../symbols/TreeModel.html" class="linkConstructor">TreeModel</a></li>
<li><a href="../symbols/UndoManager.html" class="linkConstructor">UndoManager</a></li>
</ul>
</div>
</div>
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#LayoutNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#LayoutNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Layout Classes</span>
</div>
</div>
<div id="LayoutNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/CircularLayout.html" class="linkConstructor">CircularLayout</a></li>
<li><a href="../symbols/ForceDirectedLayout.html" class="linkConstructor">ForceDirectedLayout</a></li>
<li><a href="../symbols/GridLayout.html" class="linkConstructor">GridLayout</a></li>
<li><a href="../symbols/LayeredDigraphLayout.html" class="linkConstructor">LayeredDigraphLayout</a></li>
<li><a href="../symbols/Layout.html" class="linkConstructor">Layout</a></li>
<li><a href="../symbols/LayoutNetwork.html" class="linkConstructor">LayoutNetwork</a></li>
<li><a href="../symbols/TreeLayout.html" class="linkConstructor">TreeLayout</a></li>
</ul>
</div>
</div>
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#ToolNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#ToolNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Tool Classes</span>
</div>
</div>
<div id="ToolNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/ActionTool.html" class="linkConstructor">ActionTool</a></li>
<li><a href="../symbols/ClickCreatingTool.html" class="linkConstructor">ClickCreatingTool</a></li>
<li><a href="../symbols/ClickSelectingTool.html" class="linkConstructor">ClickSelectingTool</a></li>
<li><a href="../symbols/ContextMenuTool.html" class="linkConstructor">ContextMenuTool</a></li>
<li><a href="../symbols/DraggingTool.html" class="linkConstructor">DraggingTool</a></li>
<li><a href="../symbols/DragSelectingTool.html" class="linkConstructor">DragSelectingTool</a></li>
<li><a href="../symbols/HTMLInfo.html" class="linkConstructor">HTMLInfo</a></li>
<li><a href="../symbols/LinkingBaseTool.html" class="linkConstructor">LinkingBaseTool</a></li>
<li><a href="../symbols/LinkingTool.html" class="linkConstructor">LinkingTool</a></li>
<li><a href="../symbols/LinkReshapingTool.html" class="linkConstructor">LinkReshapingTool</a></li>
<li><a href="../symbols/PanningTool.html" class="linkConstructor">PanningTool</a></li>
<li><a href="../symbols/RelinkingTool.html" class="linkConstructor">RelinkingTool</a></li>
<li><a href="../symbols/ResizingTool.html" class="linkConstructor">ResizingTool</a></li>
<li><a href="../symbols/RotatingTool.html" class="linkConstructor">RotatingTool</a></li>
<li><a href="../symbols/TextEditingTool.html" class="linkConstructor">TextEditingTool</a></li>
<li><a href="../symbols/Tool.html" class="linkConstructor">Tool</a></li>
<li><a href="../symbols/ToolManager.html" class="linkConstructor">ToolManager</a></li>
</ul>
</div>
</div>
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#CollectionNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#CollectionNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Collection Classes</span>
</div>
</div>
<div id="CollectionNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/Iterable.html" class="linkConstructor">Iterable</a></li>
<li><a href="../symbols/Iterator.html" class="linkConstructor">Iterator</a></li>
<li><a href="../symbols/List.html" class="linkConstructor">List</a></li>
<li><a href="../symbols/Map.html" class="linkConstructor">Map</a></li>
<li><a href="../symbols/Set.html" class="linkConstructor">Set</a></li>
</ul>
</div>
</div>
</div> <!-- /class="sidebar-nav -->
<!-- end publish.classesIndex -->
</div>
<div id="contentBody" class="col-md-10">
<div class="searchsumm">
<div class="table-wrap">
<div class="table-cell" id="apisearch" data-base="../">
<div class="title">Search API</div>
<div class="field">
<label for="search-field" class="search-icon"></label>
<input id="search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
</div>
<div class="table-cell" id="apisumm">
<input type="checkbox" id="showsumms" />
<label class="apisumms" for="showsumms">Show Summaries</label>
</div>
</div>
</div>
<!-- ============================== header ================================= -->
<div id="header" class="fineprint">
<b>GoJS</b>® Diagramming Components<br/>version 1.8.36 for JavaScript/HTML<br/>by <a href="https://www.nwoods.com/">Northwoods Software®</a>
</div>
<!-- ============================== class title ============================ -->
<h2 class="classTitle">
Class RelinkingTool
</h2>
<!-- ============================== class summary ========================== -->
<p class="classsummary">
<span class="extends"> Extends
<a href="../symbols/LinkingBaseTool.html" class="linkConstructor">LinkingBaseTool</a>.</span>
The RelinkingTool allows the user to reconnect an existing <a href="../symbols/Link.html" class="linkConstructor">Link</a>
if the <a href="../symbols/Link.html#relinkableTo" class="linkProperty">Link.relinkableTo</a> and/or <a href="../symbols/Link.html#relinkableFrom" class="linkProperty">Link.relinkableFrom</a> properties are true.
<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="../symbols/Diagram.html#toolManager" class="linkProperty">Diagram.toolManager</a> as the <a href="../symbols/ToolManager.html#relinkingTool" class="linkProperty">ToolManager.relinkingTool</a>.
<p>
This tool makes use of two <a href="../symbols/Adornment.html" class="linkConstructor">Adornment</a>s,
each including a relink handle (potentially one for each end of the link),
shown when a link is selected.
<p>
This tool conducts a transaction while the tool is active.
A successful relinking will result in a "LinkRelinked" <a href="../symbols/DiagramEvent.html" class="linkConstructor">DiagramEvent</a> and a "Relinking" transaction.
</p>
<!-- ============================== constructor summary ==================== -->
<h2 id="constructor" class="summaryCaption"> Constructor <span class="nodetails"> Summary</span><span class="details"> Details</span></h2>
<div class="table-responsive">
<table class="summaryTable table table-bordered table-condensed" summary="A summary of the constructor documented in the class RelinkingTool.">
<thead>
<tr>
<th scope="col" class="name">Name</th>
<th scope="col" class="description">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name" >
<div class="name">
RelinkingTool()
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>You do not normally need to create an instance of this tool
because one already exists as the <a href="../symbols/ToolManager.html#relinkingTool" class="linkProperty">ToolManager.relinkingTool</a>, which you can modify.<span class="nodetails" id="xconRelinkingTool"><a class="morelink" onclick="hst('conRelinkingTool')">More...</a></span> <span class="details" id="conRelinkingTool">
</span><div class="details" id="dconRelinkingTool"><p>
The <a href="../symbols/Tool.html#name" class="linkProperty">Tool.name</a> of this tool is "Relinking".</div>
</div>
</td>
</tr>
</tbody>
</table>
</div><!-- class="table-responsive">-->
<!-- ============================== properties summary ===================== -->
<h2 class="summaryCaption">Properties<span class="nodetails"> Summary</span><span class="details"> Details</span></h2>
<div class="table-responsive">
<table class="summaryTable table table-bordered table-condensed" summary="A summary of the properties documented in the class RelinkingTool.">
<thead>
<tr>
<th scope="col" class="name">Name, Value Type</th>
<th scope="col" class="description">Description</th>
</tr>
</thead>
<tbody>
<tr id="fromHandleArchetype" >
<td class="name">
<div class="name">
fromHandleArchetype
</div>
<div class="attributes">
<span class="light">{<a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a>}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<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.<span class="nodetails" id="xpropfromHandleArchetype"><a class="morelink" onclick="hst('propfromHandleArchetype')">More...</a></span> <span class="details" id="propfromHandleArchetype">
By default this is a <a href="../symbols/Shape.html" class="linkConstructor">Shape</a> that is a small blue diamond.
Setting this property does not raise any events.
</span><div class="details" id="dpropfromHandleArchetype"><p>
Here is an example of changing the default handle to be larger green triangles:
<pre class="javascript">
myDiagram.toolManager.relinkingTool.toHandleArchetype =
$(go.Shape, "Triangle",
{ width: 10, height: 10, fill: "limegreen", segmentIndex: 0 });
</pre></div>
<div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/RelinkingTool.html#toHandleArchetype" class="linkProperty">toHandleArchetype</a></li>
</ul>
</div>
</div>
</td>
</tr>
<tr id="handle" >
<td class="name">
<div class="name">
handle
</div>
<div class="attributes">
<span class="light">{<a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a>}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>This read-only property returns the <a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a> that is the tool handle being dragged by the user.<span class="nodetails" id="xprophandle"><a class="morelink" onclick="hst('prophandle')">More...</a></span> <span class="details" id="prophandle">
This will be contained by an <a href="../symbols/Adornment.html" class="linkConstructor">Adornment</a> whose category is "RelinkFrom" or "RelinkTo".
Its <a href="../symbols/Adornment.html#adornedPart" class="linkProperty">Adornment.adornedPart</a> is the same as the <a href="../symbols/LinkingBaseTool.html#originalLink" class="linkProperty">originalLink</a>.</span>
</div>
</td>
</tr>
<tr id="toHandleArchetype" >
<td class="name">
<div class="name">
toHandleArchetype
</div>
<div class="attributes">
<span class="light">{<a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a>}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<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.<span class="nodetails" id="xproptoHandleArchetype"><a class="morelink" onclick="hst('proptoHandleArchetype')">More...</a></span> <span class="details" id="proptoHandleArchetype">
By default this is a <a href="../symbols/Shape.html" class="linkConstructor">Shape</a> that is a small blue diamond.
Setting this property does not raise any events.
</span><div class="details" id="dproptoHandleArchetype"><p>
Here is an example of changing the default handle to be larger orange triangles:
<pre class="javascript">
myDiagram.toolManager.relinkingTool.toHandleArchetype =
$(go.Shape, "Triangle",
{ width: 10, height: 10, fill: "orange", segmentIndex: -1 });
</pre></div>
<div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/RelinkingTool.html#fromHandleArchetype" class="linkProperty">fromHandleArchetype</a></li>
</ul>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div><!-- class="table-responsive">-->
<dl class="inheritsList">
<dt>Properties borrowed from class <a href="../symbols/LinkingBaseTool.html" class="linkConstructor">LinkingBaseTool</a>: </dt><dd><a href="../symbols/LinkingBaseTool.html#isForwards" class="linkProperty">isForwards</a>, <a href="../symbols/LinkingBaseTool.html#isUnconnectedLinkValid" class="linkProperty">isUnconnectedLinkValid</a>, <a href="../symbols/LinkingBaseTool.html#linkValidation" class="linkProperty">linkValidation</a>, <a href="../symbols/LinkingBaseTool.html#originalFromNode" class="linkProperty">originalFromNode</a>, <a href="../symbols/LinkingBaseTool.html#originalFromPort" class="linkProperty">originalFromPort</a>, <a href="../symbols/LinkingBaseTool.html#originalLink" class="linkProperty">originalLink</a>, <a href="../symbols/LinkingBaseTool.html#originalToNode" class="linkProperty">originalToNode</a>, <a href="../symbols/LinkingBaseTool.html#originalToPort" class="linkProperty">originalToPort</a>, <a href="../symbols/LinkingBaseTool.html#portGravity" class="linkProperty">portGravity</a>, <a href="../symbols/LinkingBaseTool.html#portTargeted" class="linkProperty">portTargeted</a>, <a href="../symbols/LinkingBaseTool.html#targetPort" class="linkProperty">targetPort</a>, <a href="../symbols/LinkingBaseTool.html#temporaryFromNode" class="linkProperty">temporaryFromNode</a>, <a href="../symbols/LinkingBaseTool.html#temporaryFromPort" class="linkProperty">temporaryFromPort</a>, <a href="../symbols/LinkingBaseTool.html#temporaryLink" class="linkProperty">temporaryLink</a>, <a href="../symbols/LinkingBaseTool.html#temporaryToNode" class="linkProperty">temporaryToNode</a>, <a href="../symbols/LinkingBaseTool.html#temporaryToPort" class="linkProperty">temporaryToPort</a></dd><dt>Properties borrowed from class <a href="../symbols/Tool.html" class="linkConstructor">Tool</a>: </dt><dd><a href="../symbols/Tool.html#diagram" class="linkProperty">diagram</a>, <a href="../symbols/Tool.html#isActive" class="linkProperty">isActive</a>, <a href="../symbols/Tool.html#isEnabled" class="linkProperty">isEnabled</a>, <a href="../symbols/Tool.html#name" class="linkProperty">name</a>, <a href="../symbols/Tool.html#transactionResult" class="linkProperty">transactionResult</a></dd>
</dl>
<!-- ============================== methods summary ======================== -->
<h2 class="summaryCaption">Method <span class="nodetails"> Summary</span><span class="details"> Details</span></h2>
<div class="table-responsive">
<table class="summaryTable table table-bordered table-condensed" summary="A summary of the methods documented in the class RelinkingTool.">
<thead>
<tr>
<th scope="col" class="name">Name, Return Type</th>
<th scope="col" class="description">Description</th>
</tr>
</thead>
<tbody>
<tr id="canStart">
<td class="name">
<div class="name">
canStart()
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><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.<span class="nodetails" id="xmethcanStart"><a class="morelink" onclick="hst('methcanStart')">More...</a></span> <span class="details" id="methcanStart">
</span><div class="details" id="dmethcanStart"><p>
This method may be overridden, but we recommend that you call this base method.</div>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> </dt>
</dl>
</div>
</td>
</tr>
<tr id="copyLinkProperties">
<td class="name">
<div class="name">
copyLinkProperties(reallink, templink)
</div>
<div class="attributes">
<span class="since" title="since">1.3</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Make a temporary link look and act like the real Link being relinked.<span class="nodetails" id="xmethcopyLinkProperties"><a class="morelink" onclick="hst('methcopyLinkProperties')">More...</a></span> <span class="details" id="methcopyLinkProperties">
By default this method copies many of the routing-oriented properties
from the <a href="../symbols/LinkingBaseTool.html#originalLink" class="linkProperty">LinkingBaseTool.originalLink</a> to the <a href="../symbols/LinkingBaseTool.html#temporaryLink" class="linkProperty">LinkingBaseTool.temporaryLink</a>.
</span><div class="details" id="dmethcopyLinkProperties"><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.</div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/Link.html" class="linkConstructor">Link</a>}</span> <b>reallink</b>
</dt>
<dd></dd>
<dt>
<span class="light fixedFont">{<a href="../symbols/Link.html" class="linkConstructor">Link</a>}</span> <b>templink</b>
</dt>
<dd></dd>
</dl>
</div>
</td>
</tr>
<tr id="doActivate">
<td class="name">
<div class="name">
doActivate()
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Start the relinking operation.<span class="nodetails" id="xmethdoActivate"><a class="morelink" onclick="hst('methdoActivate')">More...</a></span> <span class="details" id="methdoActivate">
</span><div class="details" id="dmethdoActivate"><p>
Find the relink handle by calling <a href="../symbols/Tool.html#findToolHandleAt" class="linkMethod">Tool.findToolHandleAt</a>
looking for either the "RelinkFrom" adornment or the "RelinkTo" adornment,
saving the result in <a href="../symbols/RelinkingTool.html#handle" class="linkProperty">handle</a>.
<p>
This starts a transaction, captures the mouse, and sets the cursor.
<p>
The value of <a href="../symbols/LinkingBaseTool.html#isForwards" class="linkProperty">isForwards</a> is set depending on the category of the relink handle found.
The <a href="../symbols/LinkingBaseTool.html#originalLink" class="linkProperty">LinkingBaseTool.originalLink</a> property and various
"Original..." port and node properties are set too.
The temporary nodes and temporary link are also initialized.
<p>
This method may be overridden, but we recommend that you call this base method.</div>
</div>
</td>
</tr>
<tr id="doDeactivate">
<td class="name">
<div class="name">
doDeactivate()
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Finishing the linking operation stops the transaction, releases the mouse, and resets the cursor.<span class="nodetails" id="xmethdoDeactivate"><a class="morelink" onclick="hst('methdoDeactivate')">More...</a></span> <span class="details" id="methdoDeactivate">
</span><div class="details" id="dmethdoDeactivate"><p>
This method may be overridden, but we recommend that you call this base method.</div>
</div>
</td>
</tr>
<tr id="doMouseUp">
<td class="name">
<div class="name">
doMouseUp()
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>A mouse-up ends the relinking operation; if there is a valid <a href="../symbols/LinkingBaseTool.html#targetPort" class="linkProperty">targetPort</a> nearby,
this modifies the old link to connect with the target port.<span class="nodetails" id="xmethdoMouseUp"><a class="morelink" onclick="hst('methdoMouseUp')">More...</a></span> <span class="details" id="methdoMouseUp">
</span><div class="details" id="dmethdoMouseUp"><p>
A successful relinking calls <a href="../symbols/RelinkingTool.html#reconnectLink" class="linkMethod">reconnectLink</a> to actually change the link.
The "LinkRelinked" <a href="../symbols/DiagramEvent.html" class="linkConstructor">DiagramEvent</a> is raised with the link as the <a href="../symbols/DiagramEvent.html#subject" class="linkProperty">DiagramEvent.subject</a>
and with the now-disconnected original port as the <a href="../symbols/DiagramEvent.html#parameter" class="linkProperty">DiagramEvent.parameter</a>.
If the link was not reconnected, this calls <a href="../symbols/RelinkingTool.html#doNoRelink" class="linkMethod">doNoRelink</a>.
In any case this stops the tool.
<p>
A failure to find a valid target port results in no changes and no DiagramEvent.
<p>
This method may be overridden, but we recommend that you call this base method.
You might find it easier to override <a href="../symbols/RelinkingTool.html#reconnectLink" class="linkMethod">reconnectLink</a>.
It is actually most common to implement a "LinkRelinked" <a href="../symbols/DiagramEvent.html" class="linkConstructor">DiagramEvent</a> listener on the <a href="../symbols/Diagram.html" class="linkConstructor">Diagram</a>.</div>
</div>
</td>
</tr>
<tr id="doNoRelink">
<td class="name">
<div class="name">
doNoRelink(existinglink, toend)
</div>
<div class="attributes">
<span class="since" title="since">1.7</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This method is called upon a mouse up when <a href="../symbols/RelinkingTool.html#reconnectLink" class="linkMethod">reconnectLink</a> is not called.<span class="nodetails" id="xmethdoNoRelink"><a class="morelink" onclick="hst('methdoNoRelink')">More...</a></span> <span class="details" id="methdoNoRelink">
</span><div class="details" id="dmethdoNoRelink"><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="../symbols/Tool.html#transactionResult" class="linkProperty">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.</div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/Link.html" class="linkConstructor">Link</a>}</span> <b>existinglink</b>
</dt>
<dd></dd>
<dt>
<span class="light fixedFont">{boolean}</span> <b>toend</b>
</dt>
<dd>If true, the user was trying to modify the link's "to" node and port.</dd>
</dl>
</div>
</td>
</tr>
<tr id="reconnectLink">
<td class="name">
<div class="name">
reconnectLink(existinglink, newnode, newport, toend)
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Modify an existing <a href="../symbols/Link.html" class="linkConstructor">Link</a> to connect to a new node and port.<span class="nodetails" id="xmethreconnectLink"><a class="morelink" onclick="hst('methreconnectLink')">More...</a></span> <span class="details" id="methreconnectLink">
</span><div class="details" id="dmethreconnectLink"><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.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/RelinkingTool.html#doNoRelink" class="linkMethod">doNoRelink</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/Link.html" class="linkConstructor">Link</a>}</span> <b>existinglink</b>
</dt>
<dd></dd>
<dt>
<span class="light fixedFont">{<a href="../symbols/Node.html" class="linkConstructor">Node</a>}</span> <b>newnode</b>
</dt>
<dd>the <a href="../symbols/Node.html" class="linkConstructor">Node</a> to connect to or from.</dd>
<dt>
<span class="light fixedFont">{<a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a>}</span> <b>newport</b>
</dt>
<dd>the <a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a> port to connect to or from.</dd>
<dt>
<span class="light fixe