Callback interface for instances that can create bends for a given edge and graph.
Inheritance Hierarchy
IBendCreator
Remarks
Implementations of this interface may be found in the lookup of IEdge instances. This interface is used by GraphEditorInputMode to create new bends for an edge as soon as the user performs the bend creation gesture.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.input.IBendCreator
See Also
Methods
Creates a bend at the given graph for the given edge at the position supplied.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - IInputModeContext
- The context for which the bend should be created.
- graph - IGraph
- The graph, the edge belongs to.
- edge - IEdge
- The edge.
- location - Point
- The preferred coordinates of the bend.
Returns
- ↪number
- The index of the bend in the edges' bends or
-1
if no bend has been created.
Constants
A static instance that does not create any bends.
This field is not available unless the module view-editor is loaded. Either load the module 'view-editor' explicitly or call
Class.ensure(GraphEditorInputMode)
More information.Static Methods
Creates an implementation of the interface IBendCreator by using the given function as implementation for its createBend method.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- createBend - function(IInputModeContext, IGraph, IEdge, Point):number
- A function for IBendCreator's single abstract method createBend.
Returns
- ↪IBendCreator
- An instance of the IBendCreator interface based on the given function.