The interface for the visual representation of an arrow that is normally used to decorate the visual representation of an IEdge.
Remarks
Instances of this class are used by IEdgeStyle implementations.
This is a convertible type that can be used with the following notation(s) in parameter lists, parameter objects or setters.
The strings applying to this scheme are converted to Arrows:
'[color] [scale] type'
color = CSS color strings
scale = xx-small|x-small|small|medium|large|x-large|xx-large
type = normal|none|default|simple|short|diamond|cross|circle|ball|triangle
Valid color strings are the same as for Color. Square brackets mark optional declarations.
Related Programming Samples
- 12 Custom Arrow
- Create a custom arrow that matches our edge style
Type Details
- yFiles module
- view
See Also
Properties
Gets a value that tells the IEdgeStyleRenderer whether to crop the edge at the geometry of the port or rather at the shape of the owner of the port this arrow connects to, when the arrow is rendered at the end of the edge.
Remarks
false
and the edge will end at the visible border of the node, pointing towards it, even if it is located inside the geometry of the owning element (typically a node). Setting this property to true
indicates to the rendering process that the edge should be cropped at the port, directly. Note that this means that edges need to be rendered in front of the nodes or that nodes need to be transparent in order to not hide the arrow heads behind the node visualization.See Also
Gets the cropping length associated with this instance.
Remarks
This value is defined as the distance between the node-edge intersection and the tip of the arrow.
It is used by IEdgeStyle implementations to let the edge appear to end shortly before its actual target.
Property Value
See Also
Gets the length of the arrow (the distance from the arrow's tip to the position where the visual representation of the edge's path should begin).
Methods
getBoundsProvider
(edge: IEdge, atSource: boolean, anchor: Point, directionVector: Point) : IBoundsProviderGets an IBoundsProvider implementation that can yield this arrow's bounds if rendered at the given location using the given direction for the given edge.
Parameters
A map of options to pass to the method.
- edge - IEdge
- The edge this arrow belongs to
- atSource - boolean
- Whether this will be the source arrow
- anchor - Point
- The anchor point for the tip of the arrow
- directionVector - Point
- The direction the arrow is pointing in
Returns
- ↪IBoundsProvider
- An implementation of the IBoundsProvider interface that can subsequently be used to query the bounds. Clients will always call this method before using the implementation and may not cache the instance returned. This allows for applying the flyweight design pattern to implementations.
See Also
Gets an IVisualCreator implementation that will render this arrow at the given location using the given direction for the given edge.
Parameters
A map of options to pass to the method.
- edge - IEdge
- The edge this arrow belongs to
- atSource - boolean
- Whether this will be the source arrow
- anchor - Point
- The anchor point for the tip of the arrow
- direction - Point
- The direction the arrow is pointing in
Returns
- ↪IVisualCreator
- An implementation of the IVisualCreator interface that can subsequently be used to perform the actual rendering. Clients will always call this method before using the implementation and may not cache the instance returned. This allows for applying the flyweight design pattern to implementations.
See Also
Static Methods
Creates an Arrow instance from the given arrow-like object by performing automatic type conversion.