The default implementation of the INodeSnapResultProvider interface.
Type Details
- yFiles module
- view
Methods
collectCircleSnapResults
(context: GraphSnapContext, evt: CollectSnapResultsEventArgs, snapCircle: SnapCircle, suggestedLayout: Rect, node: INode)Calculates a SnapResult and adds it to the argument.
Remarks
This method delegates to collectPointSnapResult using the center of the
suggestedLayout
to snap to the circle.Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - GraphSnapContext
- The context in which the snapping is performed.
- evt - CollectSnapResultsEventArgs
- The arguments to add the results to.
- snapCircle - SnapCircle
- The snap reference containing data about the circle.
- suggestedLayout - Rect
- The layout of the node if it would move without snapping.
- node - INode
- The node that is currently being processed.
collectGridSnapResult
(context: GraphSnapContext, evt: CollectSnapResultsEventArgs, snapGrid: SnapGrid, location: Point, node: INode)Calculates a SnapResult and adds it to the argument.
Remarks
This method delegates to collectPointSnapResult using gridSnapType as the additional arguments. This method snaps the
location
to the next grid point or grid lines that are determined by nodeGridConstraintProvider or obtained from the context.Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - GraphSnapContext
- The context in which the snapping is performed.
- evt - CollectSnapResultsEventArgs
- The arguments to add the results to.
- snapGrid - SnapGrid
- The snap reference containing data about the grid.
- location - Point
- A location in the layout of the suggested layout of the node that will be snapped to a grid point location.
- node - INode
- The node that is currently being processed.
collectGridSnapResults
(context: GraphSnapContext, evt: CollectSnapResultsEventArgs, snapGrid: SnapGrid, suggestedLayout: Rect, node: INode)Collects snap results that snap the node to a grid and adds them to the argument.
Remarks
This implementation simply delegates to collectGridSnapResult using the center of the
suggestedLayout
.Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - GraphSnapContext
- The context in which the snapping is performed.
- evt - CollectSnapResultsEventArgs
- The arguments to add the results to.
- snapGrid - SnapGrid
- The snap reference containing data about the grid.
- suggestedLayout - Rect
- The layout of the node if it would move without snapping.
- node - INode
- The node that is currently being processed.
collectLineSnapResults
(context: GraphSnapContext, evt: CollectSnapResultsEventArgs, snapLine: SnapLine, suggestedLayout: Rect, node: INode)Collect snap results that snap the node center to the given snap line.
Remarks
If the node will snap, a SnapResult for a SnapLine will be created and added to the event argument.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - GraphSnapContext
- The context in which the snapping is performed.
- evt - CollectSnapResultsEventArgs
- The arguments to add the results to.
- snapLine - SnapLine
- The snap line to test snapping for.
- suggestedLayout - Rect
- The layout of the node if it would move without snapping.
- node - INode
- The node that is currently being processed.
collectOrthogonalLineSnapResults
(context: GraphSnapContext, evt: CollectSnapResultsEventArgs, snapLine: OrthogonalSnapLine, suggestedLayout: Rect, node: INode)Verifies whether the node will snap to the given snap line.
Remarks
If the node will snap, a SnapResult for a SnapLine will be created and added to the event argument.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - GraphSnapContext
- The context in which the snapping is performed.
- evt - CollectSnapResultsEventArgs
- The arguments to add the results to.
- snapLine - OrthogonalSnapLine
- The snap line to test snapping for.
- suggestedLayout - Rect
- The layout of the node if it would move without snapping.
- node - INode
- The node that is currently being processed.
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.
Implements
Constants
Yields the static shared instance of this class.