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

Modify coordination of Points in a link

$
0
0

@chzh.austin wrote:

I would like to modify the coordination of Points in a link via adding a offset

                if (part instanceof go.Link) {
                    let points = new go.List<go.Point>(go.Point);
                    part.points.each((point: go.Point) => {
                        points.add(new go.Point(offset.x + point.x, offset.y + point.y));
                    });
                    part.points = points;
                }

However, it seems the number of points is wrong through iteration, it should be 6 but I only get 4. So I get a weird shape of link. The left part is before offset but right is with offset.

I then realize if I drag the node a little bit, the link auto correct itself.

What might be the possible issue here? Thanks.

-Chuan

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6969

Trending Articles