Interface used by the framework mainly for calculating the visible path of an edge.
Inheritance Hierarchy
IEdgePathCropper
Remarks
This interface is queried through the lookup of IPort instances to calculate the visible portion of an edge path.
It is rarely needed to implement this interface. Custom styles based on EdgeStyleBase<TVisual> should call cropPath to crop the edge path. For custom cropping it is sufficient in most cases to use a configured DefaultEdgePathCropper instance.
Related Programming Samples
- 08 Edge Cropping
- Customize where edges at the node are cropped
- 06 Edge Cropping
- Crop the edge at the port outline
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.styles.IEdgePathCropper
See Also
Methods
Crops the provided path
at one end of an edge.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- edge - IEdge
- The edge whose path is to be cropped.
- atSource - boolean
- Whether to crop the source or target side of the path.
- arrow - IArrow
- The arrow that is used at the end of the edge.
- path - GeneralPath
- The path to crop.
Returns
- ↪GeneralPath
- The cropped path. This is can be either the same instance of the given path or a newly created instance.
Constants
This singleton implements the same cropping behavior as DefaultEdgePathCropper and is immutable.
Remarks
It crops an edge's path at the node bounds of the source or target side with respect to the given arrow.
Static Methods
Creates an implementation of the interface IEdgePathCropper by using the given function as implementation for its cropEdgePath method.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- cropEdgePath - function(IEdge, boolean, IArrow, GeneralPath):GeneralPath
- A function for IEdgePathCropper's single abstract method cropEdgePath.
Returns
- ↪IEdgePathCropper
- An instance of the IEdgePathCropper interface based on the given function.