The DvtDiagramLayoutContextLink interface defines the link context for a layout call.
- Source:
Methods
-
getEndConnectorOffset() → {number}
-
Get the offset of the end connector. This is the amount of space that the link should leave between its ending point and the node for the connector to be drawn.
- Source:
Returns:
- Type
- number
-
getEndId() → {string}
-
Get the id of the end node of this link.
- Source:
Returns:
- Type
- string
-
getId() → {string}
-
Get the id of the link.
- Source:
Returns:
- Type
- string
-
getLabelBounds() → {Object}
-
Get the label bounds. The bounds are in the coordinate system of the label.
- Source:
Properties:
Name Type Description xnumber x-coordinate ynumber y-coordinate wnumber width hnumber height Returns:
An object with the following properties for the label bound- Type
- Object
-
getLabelPosition() → {Object}
-
Get the position of the link label. The position is in the coordinate system of the link's container. The position represents the upper-left corner for locales with left-to-right reading direction and the upper-right corner for locales with right-to-left reading direction.
- Source:
Properties:
Name Type Description xnumber x-coordinate ynumber y-coordinate Returns:
An object with the following properties for the position of the link label- Type
- Object
-
getLabelRotationAngle() → {number}
-
Get the angle of rotation of the link label, relative to the label rotation point, in radians.
- Source:
Returns:
- Type
- number
-
getLabelRotationPoint() → {Object}
-
Get the point about which to rotate the link label, in the coordinate system of the label.
- Source:
Properties:
Name Type Description xnumber x-coordinate ynumber y-coordinate Returns:
An object with the following properties for the label rotation point- Type
- Object
-
getLayoutAttributes() → {object}
-
Get the corresponding object from the links option array.
- Source:
Returns:
- Type
- object
-
getLinkWidth() → {number}
-
Get the width of this link.
- Source:
Returns:
- Type
- number
-
getPoints() → {array}
-
Get the points to use for rendering this link. The returned array can contain coordinates, like [x1, y1, x2, y2, ..., xn, yn], or SVG path commands, like ["M", x1, y1, "L", x2, y2, ..., "L", xn, yn]. The points are in the coordinate system of the link's container.
- Source:
Returns:
- Type
- array
-
getSelected() → {boolean}
-
Determine whether this link is selected.
- Source:
Returns:
- Type
- boolean
-
getStartConnectorOffset() → {number}
-
Get the offset of the start connector. This is the amount of space that the link should leave between its starting point and the node for the connector to be drawn.
- Source:
Returns:
- Type
- number
-
getStartId() → {string}
-
Get the id of the start node of this link.
- Source:
Returns:
- Type
- string
-
setLabelPosition(pos)
-
Set the position of the link label. The position is in the coordinate system of the link's container. The position represents the upper-left corner for locales with left-to-right reading direction and the upper-right corner for locales with right-to-left reading direction.
Parameters:
Name Type Description posObject An object with the following properties for the position of the link label - Source:
Properties:
Name Type Description xnumber x-coordinate ynumber y-coordinate -
setLabelRotationAngle(angle)
-
Set the angle of rotation of the link label, relative to the label rotation point, in radians.
Parameters:
Name Type Description anglenumber angle of rotation - Source:
-
setLabelRotationPoint(point)
-
Set the point about which to rotate the link label, in the coordinate system of the label.
Parameters:
Name Type Description pointObject An object with the following properties for the label rotation point - Source:
Properties:
Name Type Description xnumber x-coordinate ynumber y-coordinate -
setPoints(points)
-
Set the points to use for rendering this link. The given array can contain coordinates, like [x1, y1, x2, y2, ..., xn, yn], or SVG path commands, like ["M", x1, y1, "L", x2, y2, ..., "L", xn, yn]. The points are in the coordinate system of the link's container.
Parameters:
Name Type Description pointsarray array of points to use for rendering this link - Source: