AvoidsNodes routed links typically have many points, and thus many segments, in them. You specified that the segmentIndex be 0, which means the first segment. A segmentFraction of 0.8 means eight-tenths of the way on that short first segment.
Probably you want to set segmentIndex to -2 for the next-to-last segment, but I’m not sure exactly what you want.
Hey @walter, so -2 did the trick. However, the disc still moves around if the segment becomes big (moves away from the “to” node). It’s because I’m specifying 0.2 as the fragmentFraction.
If I set the fragmentFraction to 0, then it sticks to the “to” node. Now, I’d like to keep a fixed distance from the “to” node, so I thought of adding a margin to the disc as follows:
margin: new go.Margin(0, 0, 20, 0)
However, the disc still sticks to the “to” node - it doesn’t keep a fixed 20 pixels from the “to” node.
I’d like to have the disc always 20 pixels away from the “to” node, so that the arrow is visible, and it doesn’t move depending on the length of the link.