- I
- I
Remarks
- shape – The basic shape of the arrow, e.g. DOUBLE_ARROW or NOTCHED_ARROW.
- angle – The tip angle.
- shaftRatio – The relative shaft thickness.
Examples
The following example shows an ArrowNodeStyle pointing upwards.
graph.createNode(
new Rect(0, 0, 60, 80),
new ArrowNodeStyle({
direction: 'up',
}),
)The following example shows a ArrowNodeStyle with a thick notched shaft and a short head
graph.createNode(
new Rect(0, 100, 80, 60),
new ArrowNodeStyle({
shape: 'notched-arrow',
shaftRatio: 0.8,
angle: 0.15 * Math.PI,
}),
)See Also
Developer's Guide
Members
Constructors
Properties
The exterior angle between one side of the arrow and the perpendicular to the direction of the arrow.
Negative values are only supported with a shaftRatio = 1 or the shape set to PARALLELOGRAM or TRAPEZOID.
If the arrow head cannot be properly displayed with the given value, the actual angle is capped.
The default value is π / 4.
See Also
Developer's Guide
The default value is an empty string, in which case no class is set for the visualization.
Multiple classes can be set by separating them with spaces, just like with the SVG class attribute.
Gets or sets the direction the shape points to.
Gets the renderer implementation that can be queried for implementations that provide details about the visual appearance and visual behavior for a given node and this style instance.
const creator = style.renderer.getVisualCreator(node, style)
const visual = creator.createVisual(context)Implements
INodeStyle.rendererFor direction LEFT and RIGHT, the shaftRatio relates to the height of the node. For direction UP and DOWN, it relates to the width of the node.
The value needs to lie within [0,1].
The default value is 1/3.
See Also
Developer's Guide