Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Double tree add link

$
0
0

@zekelynch wrote:

Hi!

We used double-tree in our project to layout the nodes, which is great and satisfied out needs!
However, after we expand our initial tree, we want to add multiple links by triggering some functionality. And we don’t now how to do that.

Here is the code we try to accomplish it, but it act pretty weird:
It only add the very last link to our graph, and sometimes it will change the nodes layout…

resLink.forEach(v=>{
       let $$ = go.GraphObject.make;
       let link = $$(go.Link, $$(go.Shape));
       link.fromNode = this.myDiagram.findNodeForKey(v.from);
       link.toNode = this.myDiagram.findNodeForKey(v.to);
       this.myDiagram.add(link)
       this.myDiagram.commitTransaction("Double Tree Layout");
})

Thank you for your help!!!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles