Class DimensioningLink

GoJS® Diagramming Components
version 3.0.1
by Northwoods Software®

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.

Hierarchy

  • Link
    • DimensioningLink

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.

Index

Accessors

GraphObject.actionCancel GraphObject.actionDown GraphObject.actionMove GraphObject.actionUp GraphObject.actualBounds GraphObject.alignment GraphObject.alignmentFocus GraphObject.angle GraphObject.background GraphObject.click GraphObject.column GraphObject.columnSpan GraphObject.contextClick GraphObject.contextMenu GraphObject.cursor GraphObject.desiredSize GraphObject.doubleClick GraphObject.enabledChanged GraphObject.fromLinkable GraphObject.fromLinkableDuplicates GraphObject.fromLinkableSelfNode GraphObject.fromMaxLinks GraphObject.height GraphObject.isActionable GraphObject.isPanelMain GraphObject.margin GraphObject.maxSize GraphObject.measuredBounds GraphObject.minSize GraphObject.mouseDragEnter GraphObject.mouseDragLeave GraphObject.mouseDrop GraphObject.mouseEnter GraphObject.mouseHold GraphObject.mouseHover GraphObject.mouseLeave GraphObject.mouseOver GraphObject.name GraphObject.naturalBounds GraphObject.opacity GraphObject.panel GraphObject.part GraphObject.pickable GraphObject.portId GraphObject.position GraphObject.row GraphObject.rowSpan GraphObject.scale GraphObject.segmentFraction GraphObject.segmentIndex GraphObject.segmentOffset GraphObject.segmentOrientation GraphObject.shadowVisible GraphObject.stretch GraphObject.toLinkable GraphObject.toLinkableDuplicates GraphObject.toLinkableSelfNode GraphObject.toMaxLinks GraphObject.toolTip GraphObject.visible GraphObject.width Link.adjusting Link.corner Link.curve Link.curviness Link.fromEndSegmentLength Link.fromNode Link.fromPort Link.fromPortChanged Link.fromPortId Link.fromShortLength Link.fromSpot Link.geometry Link.isLabeledLink Link.isOrthogonal Link.isTreeLink Link.key Link.labelNodes Link.midAngle Link.midPoint Link.path Link.points Link.pointsCount Link.relinkableFrom Link.relinkableTo Link.resegmentable Link.routeBounds Link.routing Link.smoothness Link.toEndSegmentLength Link.toNode Link.toPort Link.toPortChanged Link.toPortId Link.toShortLength Link.toSpot Panel.alignmentFocusName Panel.columnCount Panel.columnSizing Panel.data Panel.defaultAlignment Panel.defaultColumnSeparatorDashArray Panel.defaultColumnSeparatorStroke Panel.defaultColumnSeparatorStrokeWidth Panel.defaultRowSeparatorDashArray Panel.defaultRowSeparatorStroke Panel.defaultRowSeparatorStrokeWidth Panel.defaultSeparatorPadding Panel.defaultStretch Panel.elements Panel.graduatedMax Panel.graduatedMin Panel.graduatedRange Panel.graduatedTickBase Panel.graduatedTickUnit Panel.gridCellSize Panel.gridOrigin Panel.isClipping Panel.isEnabled Panel.isOpposite Panel.itemArray Panel.itemCategoryProperty Panel.itemIndex Panel.itemTemplate Panel.itemTemplateMap Panel.leftIndex Panel.padding Panel.rowCount Panel.rowSizing Panel.topIndex Panel.type Panel.viewboxStretch Part.adornments Part.category Part.containingGroup Part.containingGroupChanged Part.copyable Part.deletable Part.diagram Part.dragComputation Part.groupable Part.highlightedChanged Part.isAnimated Part.isHighlighted Part.isInDocumentBounds Part.isLayoutPositioned Part.isSelected Part.isShadowed Part.isTopLevel Part.layer Part.layerChanged Part.layerName Part.layoutConditions Part.location Part.locationObject Part.locationObjectName Part.locationSpot Part.maxLocation Part.minLocation Part.movable Part.reshapable Part.resizable Part.resizeAdornmentTemplate Part.resizeCellSize Part.resizeObject Part.resizeObjectName Part.rotatable Part.rotateAdornmentTemplate Part.rotateObject Part.rotateObjectName Part.rotationSpot Part.selectable Part.selectionAdorned Part.selectionAdornmentTemplate Part.selectionChanged Part.selectionObject Part.selectionObjectName Part.shadowBlur Part.shadowColor Part.shadowOffset Part.text Part.textEditable Part.zOrder

Methods

GraphObject.apply GraphObject.attach GraphObject.bind GraphObject.bindModel GraphObject.bindObject GraphObject.bindTwoWay GraphObject.findBindingPanel GraphObject.getDocumentAngle GraphObject.getDocumentPoint GraphObject.getDocumentScale GraphObject.getLocalPoint GraphObject.isContainedBy GraphObject.isEnabledObject GraphObject.isVisibleObject GraphObject.set GraphObject.setProperties GraphObject.theme GraphObject.themeData GraphObject.themeModel GraphObject.themeObject GraphObject.trigger Link.addPoint Link.canRelinkFrom Link.canRelinkTo Link.clearPoints Link.computeAdjusting Link.computeCurve Link.computeCurviness Link.computeEndSegmentLength Link.computeOtherPoint Link.computeSpacing Link.computeSpot Link.computeThickness Link.findClosestSegment Link.getLinkDirection Link.getLinkPoint Link.getLinkPointFromPoint Link.getOtherNode Link.getOtherPort Link.getPoint Link.hasCurviness Link.insertPoint Link.invalidateRoute Link.makeGeometry Link.move Link.removePoint Link.setPoint Link.updateRoute Panel.add Panel.addColumnDefinition Panel.addRowColumnDefinition Panel.addRowDefinition Panel.copy Panel.copyTemplate Panel.elt Panel.findColumnForLocalX Panel.findItemPanelForData Panel.findMainElement Panel.findObject Panel.findRowForLocalY Panel.getColumnDefinition Panel.getRowDefinition Panel.graduatedPointForValue Panel.graduatedValueForPoint Panel.insertAt Panel.rebuildItemElements Panel.remove Panel.removeAt Panel.removeColumnDefinition Panel.removeRowDefinition Part.addAdornment Part.canCopy Part.canDelete Part.canEdit Part.canGroup Part.canLayout Part.canMove Part.canReshape Part.canResize Part.canRotate Part.canSelect Part.clearAdornments Part.ensureBounds Part.findAdornment Part.findCommonContainingGroup Part.findSubGraphLevel Part.findTopLevelPart Part.getDocumentBounds Part.invalidateLayout Part.isMemberOf Part.isVisible Part.moveTo Part.removeAdornment Part.updateAdornments Part.updateRelationshipsFromData Part.updateTargetBindings

Constructors

Accessors

  • 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.

Methods

  • Constructs the link's route by modifying points.

    Returns boolean

    true if it computed a route of points