The interface of the factory that is passed to implementations of the IFoldingEdgeConverter's addFoldingEdge method.
Remarks
- addAsSeparateEdge – Call this to add a separate folding edge for the given master edge to the view. Pass the return value of that method to the caller.
- addToExistingFoldingEdge – Call this to reuse a folding edge that is already part of the view as a representative for the master edge. Pass the return value of that method to the caller.
- excludeFoldingEdge – Call this in order not to add a folding edge for the master edge to the view at all. Pass
null
to the caller.
Type Details
- yfiles module
- view-folding
- yfiles-umd modules
- view-folding, view-graphml, view
- Legacy UMD name
- yfiles.graph.IFoldingEdgeFactory
See Also
Methods
Tells the IFoldingView implementation to add the edge provided to the addFoldingEdge method as a separate folding edge to the view at the given ports.
Remarks
Parameters
A map of options to pass to the method.
- sourcePort - IPort
- The source port at the source node in the view to use or
null
if an extra folding state port should be added for the edge to connect to at the source. - targetPort - IPort
- The target port at the target node in the view to use or
null
if an extra folding state port should be added for the edge to connect to at the target.
Returns
- ↪IEdge
- The folding edge that has been created in the view. Don't change the properties of the edge directly.
See Also
Tells the IFoldingView implementation to logically add the edge provided to the addFoldingEdge method to a folding edge that already exists in the view.
Remarks
foldingEdge
will have the master edge added to its collection of master edges. Note that the returned folding edge should not be modified by this code, instead the updateFoldingEdgeState callback needs to be used to change the appearance of the folding edge. Implementations can use the getExistingFoldingEdges method to retrieve the current set of existing folding edges that interconnect the same source and target nodes. The range of valid parameters is constrained to this collection.Parameters
A map of options to pass to the method.
- foldingEdge - IEdge
- One of the existing folding edges from the view which has been chosen to represent the master edge in this view.
Returns
- ↪IEdge
- The folding edge that represents the edge in the view, which is the same as the
foldingEdge
parameter. Don't change the properties of the edge directly.
See Also
Tells the IFoldingView implementation not to add a folding edge for the edge provided to the addFoldingEdge method in this view.
Remarks
null
should be returned as the result of a addFoldingEdge call, which is the same as the return value of this method. So it is possible to just pass the return value on to the caller.Returns
- ↪IEdge
- This method will always return
null
. This is for symmetry reasons to be easily exchangeable with the other methods.
See Also
Helper methods that can be used by the implementation of the addFoldingEdge method to determine the folding edges that are currently part of the view and interconnect the same nodes as the folding edge would, if it was included in the view.
Remarks
Parameters
A map of options to pass to the method.
- ignoreDirection - boolean
- Whether the direction of the edges should be ignored so that reverse edges are included in the enumeration, too.
Returns
- ↪IEnumerable<IEdge>
- An collection of currently existing folding edges in the view that interconnects the same source and target node.
Static Methods
Creates an implementation of the interface IFoldingEdgeFactory from the given definition.
Remarks
Parameters
A map of options to pass to the method.
- addAsSeparateEdge - function(IPort, IPort):IEdge
Tells the IFoldingView implementation to add the edge provided to the addFoldingEdge method as a separate folding edge to the view at the given ports.
This property holds the implementation for addAsSeparateEdge.
- addToExistingFoldingEdge - function(IEdge):IEdge
Tells the IFoldingView implementation to logically add the edge provided to the addFoldingEdge method to a folding edge that already exists in the view.
This property holds the implementation for addToExistingFoldingEdge.
- excludeFoldingEdge - function():IEdge
Tells the IFoldingView implementation not to add a folding edge for the edge provided to the addFoldingEdge method in this view.
This property holds the implementation for excludeFoldingEdge.
- getExistingFoldingEdges - function(boolean):IEnumerable<IEdge>
Helper methods that can be used by the implementation of the addFoldingEdge method to determine the folding edges that are currently part of the view and interconnect the same nodes as the folding edge would, if it was included in the view.
This property holds the implementation for getExistingFoldingEdges.
Returns
- ↪IFoldingEdgeFactory
- An instance of the IFoldingEdgeFactory interface based on the given definition.