The DvtDiagramLayoutContextNode interface defines the node context for a layout call.
- Source:
Methods
-
getBounds() → {Object}
-
Get the bounds of the node. Currently the method returns the same value as getContentBounds(). The bounds are in the coordinate system of the node.
- Source:
Properties:
Name Type Description x
number x-coordinate y
number y-coordinate w
number width h
number height Returns:
An object with the following properties for the bounds of the node- Type
- Object
-
getContentBounds() → {Object}
-
Get the bounds of the node content. Currently the method returns the same value as getBounds(). The bounds are in the coordinate system of the node.
- Source:
Properties:
Name Type Description x
number x-coordinate y
number y-coordinate w
number width h
number height Returns:
An object with the following properties for the bounds of the node content- Type
- Object
-
getId() → {string}
-
Get the id of the node.
- 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 x
number x-coordinate y
number y-coordinate w
number width h
number height Returns:
An object with the following properties for the label bounds- Type
- Object
-
getLabelPosition() → {Object}
-
Get the position of the node label. The position is in the coordinate system of the node's container.
- Source:
Properties:
Name Type Description x
number x-coordinate y
number y-coordinate Returns:
An object with the following properties for the position of the node label- Type
- Object
-
getLabelRotationAngle() → {number}
-
Get the angle of rotation of the node label, relative to the label rotation point, in radians.
- Source:
Returns:
- Type
- number
-
getLabelRotationPoint() → {Object}
-
Get the point about which to rotate the node label, in the coordinate system of the label.
- Source:
Properties:
Name Type Description x
number x-coordinate y
number y-coordinate Returns:
An object with the following properties for the label rotation point- Type
- Object
-
getLayoutAttributes() → {Object}
-
Get the corresponding object from the nodes option array.
- Source:
Returns:
- Type
- Object
-
getPosition() → {Object}
-
Get the position of the node. The position is in the coordinate system of the node's container.
- Source:
Properties:
Name Type Description x
number x-coordinate y
number y-coordinate Returns:
An object with the following properties for the position of the node- Type
- Object
-
getSelected() → {boolean}
-
Determine whether this node is selected.
- Source:
Returns:
- Type
- boolean
-
setLabelPosition(pos)
-
Set the position of the node label. The position is in the coordinate system of the node's container.
Parameters:
Name Type Description pos
Object An object with the following properties for position of the node label - Source:
Properties:
Name Type Description x
number x-coordinate y
number y-coordinate -
setLabelRotationAngle(angle)
-
Set the angle of rotation of the node label, relative to the label rotation point, in radians.
Parameters:
Name Type Description angle
number angle of rotation - Source:
-
setLabelRotationPoint(point)
-
Set the point about which to rotate the node label, in the coordinate system of the label.
Parameters:
Name Type Description point
Object An object with the following properties for label rotation point - Source:
Properties:
Name Type Description x
number x-coordinate y
number y-coordinate -
setPosition(pos)
-
Set the position of the node. The position is in the coordinate system of the node's container.
Parameters:
Name Type Description pos
Object An object with the following properties for the position of the node - Source:
Properties:
Name Type Description x
number x-coordinate y
number y-coordinate