Packagecom.yworks.graph.model
Interfacepublic interface IBendCreator
Implementors DefaultBendCreator

Callback interface for instances that can create bends for a given edge and graph.

Implementations of this interface may be found in the ILookup.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.



Public Methods
 MethodDefined By
  
createBend(context:IInputModeContext, graph:IGraph, edge:IEdge, x:Number, y:Number):int
Creates a bend at the given graph for the given edge at the position supplied.
IBendCreator
Method Detail
createBend()method
public function createBend(context:IInputModeContext, graph:IGraph, edge:IEdge, x:Number, y:Number):int

Creates a bend at the given graph for the given edge at the position supplied.

Parameters

context:IInputModeContext — The context for which the bend should be created.
 
graph:IGraph — The graph, the edge belongs to.
 
edge:IEdge — The edge.
 
x:Number — The preferred x coordinate of the bend.
 
y:Number — The preferred y coordinate of the bend.

Returns
int — The index of the bend in the edges' IBendList or -1 if no bend has been created.