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-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.styles.IArrow
See Also
Properties
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.
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).
See Also
Methods
getBoundsProvider
(edge: IEdge, atSource: boolean, anchor: Point, directionVector: Point) : IBoundsProviderGets an IBoundsProvider implementation that can yield this arrow's bounds if painted 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 paint 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 painting. 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
Constants
A singleton IArrow instance that paints a circle-shaped black arrow.
See Also
A singleton IArrow instance that paints a cross-shaped black arrow.
See Also
A singleton IArrow instance that paints a black arrow.
See Also
A singleton IArrow instance that paints a diamond-shaped black arrow.
See Also
A singleton IArrow instance that paints no arrow at all.
See Also
A singleton IArrow instance that paints a short black arrow.
See Also
A singleton IArrow instance that paints a simple black arrow.
See Also
A singleton IArrow instance that paints a triangle-shaped black arrow.
See Also
Static Methods
Creates an Arrow instance from the given arrow-like object by performing automatic type conversion.