Interface that is used by the GraphSnapContext for nodes to collect a number of SnapResults during the move/edit operation.
Inheritance Hierarchy
INodeSnapResultProvider
Remarks
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.input.INodeSnapResultProvider
See Also
Methods
collectSnapResults
(context: GraphSnapContext, evt: CollectSnapResultsEventArgs, suggestedLayout: Rect, node: INode)Called when a node is dragged to add SnapResults for OrthogonalSnapLines to which this node can potentially snap.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - GraphSnapContext
- The snap context which manages the snap lines and the settings.
- evt - CollectSnapResultsEventArgs
- The event argument to obtain the necessary information from and add results to.
- suggestedLayout - Rect
- The layout of the node if the node would not snap.
- node - INode
- The node that is being moved.
Static Methods
create
(collectSnapResults: function(GraphSnapContext, CollectSnapResultsEventArgs, Rect, INode):void) : INodeSnapResultProviderCreates an implementation of the interface INodeSnapResultProvider by using the given function as implementation for its collectSnapResults method.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- collectSnapResults - function(GraphSnapContext, CollectSnapResultsEventArgs, Rect, INode):void
- A function for INodeSnapResultProvider's single abstract method collectSnapResults.
Returns
- ↪INodeSnapResultProvider
- An instance of the INodeSnapResultProvider interface based on the given function.