This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. See the Extensions intro page for more information.
Optional
init: Partial<AvoidsLinksRouter>Gets or sets whether the AvoidsLinksRouter should reduce spacing between separated Links to avoid overlap with nearby Nodes. If avoidsNodes is false, all separated links will have a distance of exactly linkSpacing, even if this causes them to cross over a nearby Node.
The default value is true.
Gets or sets the number of times the AvoidsLinksRouter will run iteratively. In the vast majority of cases, one iteration should be enough and this parameter should not need to be modified. Multiple iterations may be useful when numerous links coincide, particularly when they are close to Nodes with avoidsNodes set to true.
The default value is 1.
Gets or sets the desired distance between Links that are separated by AvoidsLinksRouter. If avoidsNodes is true, this value is the maximum allowed distance between such links, but the distance could be smaller to avoid overlapping Nodes.
The default value is 4.
Override
canOverride
route
A way of reducing the number of cases where link segments of orthogonal links overlap.
Typical setup:
If you want to experiment with this extension, try the AvoidsLinksRouter sample.