Drag the node in treeLayout

hi,

when using treeLayout, there are more than one links from node A to node B, if I drag node A ,the links will be Merged into one,what’s happend?and how to make it not to Merge the links to one?

Usually that depends on what the effective fromSpot is (i.e. the link’s Link.fromSpot and the “from” port’s GraphObject.fromSpot) and the various properties on the Link that govern how it is routed. What’s your link template and what “from…” properties have you set on the from port of node A?

hi,walter,
<span =“Apple-tab-span” style=“white-space:pre”> here’s my LinkTemplate.

<span =“Apple-tab-span” style=“white-space:pre”> var $$ = go.GraphObject.make;<span =“Apple-tab-span” style=“white-space:pre”>
<span =“Apple-tab-span” style=“white-space:pre”> $$(go.Link, new go.Binding(“points”).makeTwoWay(),
<span =“Apple-tab-span” style=“white-space:pre”> new go.Binding(“curviness”,“curviness”),
<span =“Apple-tab-span” style=“white-space:pre”> $$(go.Shape, {strokeWidth : 1 },
<span =“Apple-tab-span” style=“white-space:pre”> new go.Binding(“stroke”, “color”)
<span =“Apple-tab-span” style=“white-space:pre”> ),
<span =“Apple-tab-span” style=“white-space:pre”> $$(go.Shape,
<span =“Apple-tab-span” style=“white-space:pre”> {toArrow : “standard”, stroke : null},
<span =“Apple-tab-span” style=“white-space:pre”> new go.Binding(“fill”, “color”)
<span =“Apple-tab-span” style=“white-space:pre”> ),
<span =“Apple-tab-span” style=“white-space:pre”> $$(go.Panel, “Auto”,
<span =“Apple-tab-span” style=“white-space:pre”> $$(go.Shape, // the link shape
<span =“Apple-tab-span” style=“white-space:pre”> {fill : radgrad, stroke : null}
<span =“Apple-tab-span” style=“white-space:pre”> ),
<span =“Apple-tab-span” style=“white-space:pre”> $$(go.TextBlock, “transition”, // the label
<span =“Apple-tab-span” style=“white-space:pre”> {
<span =“Apple-tab-span” style=“white-space:pre”> textAlign : “center”,
<span =“Apple-tab-span” style=“white-space:pre”> editable : true,
<span =“Apple-tab-span” style=“white-space:pre”> font : “8pt helvetica, arial, sans-serif”,
<span =“Apple-tab-span” style=“white-space:pre”> stroke : “#333”,
<span =“Apple-tab-span” style=“white-space:pre”> margin : 4
<span =“Apple-tab-span” style=“white-space:pre”> },
<span =“Apple-tab-span” style=“white-space:pre”> new go.Binding(“text”, “text”).makeTwoWay()
<span =“Apple-tab-span” style=“white-space:pre”> )
<span =“Apple-tab-span” style=“white-space:pre”> )
<span =“Apple-tab-span” style=“white-space:pre”> )<span =“Apple-tab-span” style=“white-space:pre”>

<span =“Apple-tab-span” style=“white-space:pre”> and I have never set any “from…” properties on the from port of node A. is this the reason?

Wait – do you actually have Diagram.layout be an instanceof TreeLayout? If that is the case I am surprised that multiple Links from Node A to Node B have any separation at all from each other.

Are there any values of link.data.points and link.data.curviness beforehand?

A screenshot would be useful for you to show the before and after.