Packagecom.yworks.graph.input.snapLines
Interfacepublic interface IPortSnapResultProvider

Interface that is used by the GraphSnapContext for ports to collect a number of SnapResults during the move/edit operation. This interface is queried from the ILookup of the IPorts that are being moved during the edit.

See also

com.yworks.graph.input.snapLines.GraphSnapContext
IPort
SnapResult
ILookup
com.yworks.graph.model.PortDecorator.portSnapResultProviderDecorator


Public Methods
 MethodDefined By
  
collectSnapResults(context:GraphSnapContext, evt:CollectSnapResultEvent, suggestedLocation:IPoint, port:IPort):void
Called when a node is dragged to add SnapResults for SnapLines to which this bend can potentially snap.
IPortSnapResultProvider
Method Detail
collectSnapResults()method
public function collectSnapResults(context:GraphSnapContext, evt:CollectSnapResultEvent, suggestedLocation:IPoint, port:IPort):void

Called when a node is dragged to add SnapResults for SnapLines to which this bend can potentially snap.

Parameters

context:GraphSnapContext — The snap context which manages the snap lines and the settings.
 
evt:CollectSnapResultEvent — The event argument to obtain the necessary information from and add results to.
 
suggestedLocation:IPoint — The location of the port if the port would not snap.
 
port:IPort — The port that is being moved.

See also

com.yworks.canvas.input.IDragHandler.handleMove
SnapResult
SnapLine
com.yworks.graph.model.IPort.location
com.yworks.canvas.input.snapLines.CollectSnapResultEvent.addSnapResult