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.
Constructs a DimensioningLink and sets the following properties:
Optional
init: Partial<DimensioningLink>The general angle at which the measurement should be made.
The default value is 0, meaning to go measure only along the X axis, with the dimension line and label above the two nodes (at lower Y coordinates). New values must be one of: 0, 90, 180, 270, or NaN. The value NaN indicates that the measurement is point-to-point and not orthogonal.
The distance at which the dimension line should be from the points being measured.
The default value is 30. Larger values mean further away from the nodes. The new value must be greater than or equal to zero.
The distance that the extension lines should come short of the measured points.
The default value is 10.
The distance that the dimension line should be "indented" from the ends of the extension lines that are orthogonal to the dimension line.
The default value is 10.
Override
cloneCopies properties to a cloned DimensioningLink.
Override
compute
A custom routed go.Link for showing the distances between a point on one node and a point on another node.
Note that because this is a Link, the points being measured must be on go.Nodes, not simple go.Parts. The exact point on each Node is determined by the go.Link.fromSpot and go.Link.toSpot.
Several properties of the DimensioningLink customize the appearance of the dimensioning: direction, for orientation of the dimension line and which side it is on, extension, for how far the dimension line is from the measured points, inset, for leaving room for a text label, and gap, for distance that the extension line starts from the measured points.
If you want to experiment with this extension, try the Dimensioning sample.