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

How to create a Link without using Models

$
0
0

@kgilpin wrote:

All of the examples I have found use GraphLinksModel or TreeModel to create links.

How does one create a link using JS?

For example:

  diagram.add(
    $(go.Link,
      {
        fromNode: obj1.part,
        toNode: obj2.part,
      },
      $(go.Shape),
      $(go.Shape, { toArrow: "Standard" })),
  );

When I use the snippet above, the link is drawn in the wrong place, and it's always drawn in the same place regardless of the fromNode and toNode.

Posts: 5

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles