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

Is there a way to specify port "offsets"?

$
0
0

@michaelchann wrote:

I have a question about ports.

I can add a shape to my node template, position it, and have that be my port. This works great.
I can set a toSpot on my Link which will target a specific spot on that shape. This is also great.

What I can’t quite figure out how to do, is how to use an offset port spot inside of a shape that still does the smart thing where it ends the link line (and arrowhead, more importantly in my case) at the edge of the rendered shape.

Basically, when I set my shape to be my port, the links endpoint seems to be the center of the shape, but its length just hits the edge. This behavior is great.

What I would like, though, is to be able to specify (per link) a point or offset from center inside the port shape that retains this behavior of placing the ends / arrows of my link at the edge of the shape. If i specify a toSpot the automatic edge length behavior seems lost and the ends go right to the specified point regardless of where the edge is. I can’t use toShortLength because my shape is irregular and the link can come in from any angle.

Is this possible?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles