Concrete SnapContext implementation which handles snapping movement for IGraph items.
Remarks
Snapping is enabled for IGraph items by setting an instance of this on the GraphEditorInputMode as snapContext.
This class provides a set of properties that determine the way snapping operations are being performed in the context of IGraphs.
IPositionHandler implementations and the like can retrieve instances of this class from the IInputModeContext.
Examples
mode.snapContext = new GraphSnapContext()
mode.snapContext = new GraphSnapContext({
nodeDistance: 30,
collectNodePairCenterSnapLines: true,
collectNodePairSegmentSnapLines: false,
})
const snapContext = inputModeContext.lookup(GraphSnapContext)
if (snapContext?.isInitializing) {
// ...
}
Related Programming Samples
- Snapping
- Shows how to enable snapping (guide lines) for interactive changes.
Type Details
- yFiles module
- view
See Also
Constructors
Creates a new instance with default settings.
Parameters
A map of options to pass to the method.
- snappableItems - SnappableItems
- Which types of items snap result provider implementations should snap. This option sets the snappableItems property on the created object.
- gridSnappableItems - GridSnappableItems
- Which types of items IGridConstraintProvider<T> implementations should snap. This option sets the gridSnappableItems property on the created object.
- collectEdgeSnapReferences - boolean
- Whether this instance should collect snap references for fixed edge segments. This option sets the collectEdgeSnapReferences property on the created object.
- collectNodeSizes - boolean
- Whether this instance should collect the sizes of fixed nodes. This option sets the collectNodeSizes property on the created object.
- collectNodeSnapReferences - boolean
- Whether this instance should collect snap references for fixed nodes. This option sets the collectNodeSnapReferences property on the created object.
- collectPortSnapReferences - boolean
- Whether this instance should collect snap references for fixed ports. This option sets the collectPortSnapReferences property on the created object.
- nodeDistance - number
- The preferred distance between node borders. This option sets the nodeDistance property on the created object.
- nodeToEdgeDistance - number
- The preferred distance between node borders and edge segments. This option sets the nodeToEdgeDistance property on the created object.
- edgeDistance - number
- The preferred distance between edges. This option sets the edgeDistance property on the created object.
- collectNodePairCenterSnapLines - boolean
- Whether this instance will try to align the centers of adjacent nodes so that their centers are equally far away from each other. This option sets the collectNodePairCenterSnapLines property on the created object.
- collectNodePairSnapLines - boolean
- A value indicating whether this instance will collect pairs of adjacent nodes and add snapping logic so that moved nodes will snap so that the distances to the adjacent nodes are equal. This option sets the collectNodePairSnapLines property on the created object.
- collectNodePairSegmentSnapLines - boolean
- A value indicating whether this instance will collect pairs of adjacent nodes and add snapping logic so that moved edge segments will snap so that the distances to the adjacent nodes are equal. This option sets the collectNodePairSegmentSnapLines property on the created object.
- nodeGridConstraintProvider - IGridConstraintProvider<INode>
- The grid constraint provider for the INodes. This option sets the nodeGridConstraintProvider property on the created object.
- bendGridConstraintProvider - IGridConstraintProvider<IBend>
- The grid constraint provider for the IBends. This option sets the bendGridConstraintProvider property on the created object.
- portGridConstraintProvider - IGridConstraintProvider<IPort>
- The grid constraint provider for the IPorts. This option sets the portGridConstraintProvider property on the created object.
- snapLineExtension - number
- The amount by which snap lines that are induced by existing edge segments and node borders are being extended. This option sets the snapLineExtension property on the created object.
- cropSnapLines - boolean
- A value indicating whether to crop the orthogonal snap lines at obstacles. This option sets the cropSnapLines property on the created object.
- considerInitialLabelLocationSnapping - boolean
- Whether this instance should collect snap lines for the initial position of a label. This option sets the considerInitialLabelLocationSnapping property on the created object.
- considerNodeLabelOwnerShapeSnapping - boolean
- Whether this instance should collect six snap lines, two through the center and four through the border sides of the label owner. This option sets the considerNodeLabelOwnerShapeSnapping property on the created object.
- considerNodeLabelOwnerDistanceSnapping - boolean
- Whether this instance should collect four snap lines in parallel to the owner's borders at the initial label distance. This option sets the considerNodeLabelOwnerDistanceSnapping property on the created object.
- considerNodeLabelOwnerLabelsDistanceSnapping - boolean
- Whether this instance should collect snap lines in parallel to the border of the label owner at the distance of other node labels of that owner. This option sets the considerNodeLabelOwnerLabelsDistanceSnapping property on the created object.
- considerNodeLabelAllNodeLabelsDistanceSnapping - boolean
- Whether this instance should collect snap lines in parallel to the border of the label owner at the distance of other node labels in the graph. This option sets the considerNodeLabelAllNodeLabelsDistanceSnapping property on the created object.
- considerEdgeLabelOwnerPathSnapping - boolean
- Whether this instance should collect snap lines on the edge path. This option sets the considerEdgeLabelOwnerPathSnapping property on the created object.
- considerEdgeLabelOwnerDistanceSnapping - boolean
- Whether this instance should collect two snap lines in parallel to the edge path of the label owner at the initial distance of the edge label. This option sets the considerEdgeLabelOwnerDistanceSnapping property on the created object.
- considerEdgeLabelOwnerLabelsDistanceSnapping - boolean
- Whether this instance should collect snap lines in parallel to the edge path of the label owner at the distances of all edge labels of that owner. This option sets the considerEdgeLabelOwnerLabelsDistanceSnapping property on the created object.
- considerEdgeLabelAllEdgeLabelsDistanceSnapping - boolean
- Whether this instance should collect snap lines in parallel to the edge path of the label owner at the distance of other edge labels in the graph. This option sets the considerEdgeLabelAllEdgeLabelsDistanceSnapping property on the created object.
- considerPortLabelOwnerLocationSnapping - boolean
- Whether this instance should collect snap lines to the center of the owner port. This option sets the considerPortLabelOwnerLocationSnapping property on the created object.
- affectedItems - IListEnumerable<IModelItem>
- The items that were affected by the drag gesture. This option sets the affectedItems property on the created object.
- visualizeSnapResults - boolean
- A value indicating whether to visualize the snap results. This option sets the visualizeSnapResults property on the created object.
- snapDistance - number
- The global snap distance, which is the maximum distance between the current mouse coordinates and the coordinates to which the mouse will snap. This option sets the snapDistance property on the created object.
- gridSnapType - GridSnapTypes
- The type of the grid snapping that should be performed. This option sets the gridSnapType property on the created object.
- gridSnapDistance - number
- The GridSnapDistance. This option sets the gridSnapDistance property on the created object.
- enabled - boolean
- A value indicating whether this SnapContext is enabled. This option sets the enabled property on the created object.
Properties
Gets or sets the items that were affected by the drag gesture.
Remarks
Gets or sets the grid constraint provider for the IBends.
Property Value
null
if none is set.Examples
const snapContext = new GraphSnapContext()
const gridInfo = new GridInfo(50, 50)
snapContext.nodeGridConstraintProvider = new GridConstraintProvider(
gridInfo,
)
snapContext.bendGridConstraintProvider = new GridConstraintProvider(
gridInfo,
)
snapContext.portGridConstraintProvider = new GridConstraintProvider(
gridInfo,
)
snapContext.gridSnapType = GridSnapTypes.GRID_POINTS
graphEditorInputMode.snapContext = snapContext
Gets or sets whether this instance should collect snap references for fixed edge segments.
Remarks
true
.See Also
Gets or sets whether this instance will try to align the centers of adjacent nodes so that their centers are equally far away from each other.
Remarks
Note that this will only make a difference for differently sized nodes.
By default this feature is turned off, so that the instance will try to distribute nodes evenly, so that there is the same spacing between their borders, not between their centers.
See Also
Gets or sets a value indicating whether this instance will collect pairs of adjacent nodes and add snapping logic so that moved edge segments will snap so that the distances to the adjacent nodes are equal.
Property Value
true
if pairs of nodes should be collected for additional edge snap lines; false
otherwise. The default is true
See Also
Gets or sets a value indicating whether this instance will collect pairs of adjacent nodes and add snapping logic so that moved nodes will snap so that the distances to the adjacent nodes are equal.
Property Value
true
if pairs of nodes should be collected for additional snap lines; false
otherwise. The default is true
See Also
Gets or sets whether this instance should collect the sizes of fixed nodes.
Remarks
true
.See Also
Gets or sets whether this instance should collect snap references for fixed nodes.
Remarks
true
.See Also
Gets or sets whether this instance should collect snap references for fixed ports.
Remarks
true
.See Also
Gets or sets whether this instance should collect snap lines in parallel to the edge path of the label owner at the distance of other edge labels in the graph.
Remarks
false
.Property Value
true
if this instance should collect this kind of snap lines; false
otherwise.See Also
Gets or sets whether this instance should collect two snap lines in parallel to the edge path of the label owner at the initial distance of the edge label.
Remarks
true
.Property Value
true
if this instance should collect this kind of snap lines; false
otherwise.See Also
Gets or sets whether this instance should collect snap lines in parallel to the edge path of the label owner at the distances of all edge labels of that owner.
Remarks
true
.Property Value
true
if this instance should collect this kind of snap lines; false
otherwise.See Also
Gets or sets whether this instance should collect snap lines on the edge path.
Remarks
true
.Property Value
true
if this instance should collect this kind of snap lines; false
otherwise.See Also
Gets or sets whether this instance should collect snap lines for the initial position of a label.
Remarks
true
.Property Value
true
if this instance should collect snap lines for the initial position of a label; false
otherwise.See Also
Gets or sets whether this instance should collect snap lines in parallel to the border of the label owner at the distance of other node labels in the graph.
Remarks
Note that the label snaps to these snap lines with the side that is closer to the node's border. That way, snapping to such a snap line preserves the perceived distance from the node border for both labels inside and outside the node bounds.
The default is false
.
Property Value
true
if this instance should collect this kind of snap lines; false
otherwise.See Also
Gets or sets whether this instance should collect four snap lines in parallel to the owner's borders at the initial label distance.
Remarks
Note that the label snaps to these snap lines with the side that is closer to the node's border. That way, snapping to such a snap line preserves the perceived distance from the node border for both labels inside and outside the node bounds.
The default is true
.
Property Value
true
if this instance should collect snap lines through the border and center of the label owner; otherwise, false
.See Also
Gets or sets whether this instance should collect snap lines in parallel to the border of the label owner at the distance of other node labels of that owner.
Remarks
Note that the label snaps to these snap lines with the side that is closer to the node's border. That way, snapping to such a snap line preserves the perceived distance from the node border for both labels inside and outside the node bounds.
The default is true
.
Property Value
true
if this instance should collect this kind of snap lines; false
otherwise.See Also
Gets or sets whether this instance should collect six snap lines, two through the center and four through the border sides of the label owner.
Remarks
true
.Property Value
true
if this instance should collect snap lines through the border and center of the label owner; otherwise, false
.See Also
Gets or sets whether this instance should collect snap lines to the center of the owner port.
Remarks
true
.Property Value
true
if this instance should collect snap lines through the center of the label owner; otherwise, false
.See Also
Gets or sets a value indicating whether to crop the orthogonal snap lines at obstacles.
Remarks
Note that only croppable OrthogonalSnapLines are considered for cropping.
The default is true
.
See Also
Gets the current input mode context.
Property Value
Defined in
Gets or sets the preferred distance between edges.
Remarks
This will influence the creation of the segment snap lines. For each orthogonally oriented fixed segment there will be snap lines on the segment itself and to both sides of the segment at the specified distance.
The default is 0.0d which disables parallel snap lines.
See Also
Gets or sets a value indicating whether this SnapContext is enabled.
Gets the nodes that stay fixed for the current edit.
Property Value
Gets or sets the GridSnapDistance.
Remarks
Defined in
Gets or sets which types of items IGridConstraintProvider<T> implementations should snap.
Remarks
Additionally to this selection of item types, it is necessary to specify the corresponding IGridConstraintProvider<T>.
Note that items may still snap to other items or SnapReferences when the necessary result providers are registered, and they are included in the snappableItems.
The default is ALL.
See Also
Gets or sets the type of the grid snapping that should be performed.
Remarks
Examples
Enabling grid snapping
const snapContext = new GraphSnapContext()
const gridInfo = new GridInfo(50, 50)
snapContext.nodeGridConstraintProvider = new GridConstraintProvider(
gridInfo,
)
snapContext.bendGridConstraintProvider = new GridConstraintProvider(
gridInfo,
)
snapContext.portGridConstraintProvider = new GridConstraintProvider(
gridInfo,
)
snapContext.gridSnapType = GridSnapTypes.GRID_POINTS
graphEditorInputMode.snapContext = snapContext
Note that the grid visualization has to be enabled separately
graphComponent.renderTree.createElement(
graphComponent.renderTree.backgroundGroup,
gridInfo,
new GridRenderer(),
)
See Also
Defined in
Gets whether the context is initialized.
Remarks
Defined in
Gets or sets a value indicating whether this instance is currently initializing.
Property Value
true
if this instance is initializing; false
otherwise.See Also
Defined in
Gets or sets the preferred distance between node borders.
Remarks
This will influence the creation of the node snap lines. For each fixed node there will be snap lines on the borders of the node itself and around the node at the specified distance.
The default is 0.0d which disables distant snap lines around the nodes.
See Also
Gets or sets the grid constraint provider for the INodes.
Property Value
null
if none is set.Examples
const snapContext = new GraphSnapContext()
const gridInfo = new GridInfo(50, 50)
snapContext.nodeGridConstraintProvider = new GridConstraintProvider(
gridInfo,
)
snapContext.bendGridConstraintProvider = new GridConstraintProvider(
gridInfo,
)
snapContext.portGridConstraintProvider = new GridConstraintProvider(
gridInfo,
)
snapContext.gridSnapType = GridSnapTypes.GRID_POINTS
graphEditorInputMode.snapContext = snapContext
Gets or sets the preferred distance between node borders and edge segments.
Remarks
This will influence the creation of the node snap lines. For each fixed node there will be snap lines on the borders of the node itself and around the node at the specified distance to which orthogonal edge segments can snap.
The default is -1.0d which disables distant snap lines around the nodes for edge segments.
See Also
Gets the original location of the mouse at the time the gesture was initialized.
Gets or sets the grid constraint provider for the IPorts.
Property Value
null
if none is set.Examples
const snapContext = new GraphSnapContext()
const gridInfo = new GridInfo(50, 50)
snapContext.nodeGridConstraintProvider = new GridConstraintProvider(
gridInfo,
)
snapContext.bendGridConstraintProvider = new GridConstraintProvider(
gridInfo,
)
snapContext.portGridConstraintProvider = new GridConstraintProvider(
gridInfo,
)
snapContext.gridSnapType = GridSnapTypes.GRID_POINTS
graphEditorInputMode.snapContext = snapContext
Gets or sets the global snap distance, which is the maximum distance between the current mouse coordinates and the coordinates to which the mouse will snap.
Remarks
The distance is interpreted in view coordinates.
The default is 5.0d
See Also
Defined in
Gets or sets the amount by which snap lines that are induced by existing edge segments and node borders are being extended.
Remarks
40.0d
, this value will be used to extend the ends of the snap lines.See Also
Gets or sets which types of items snap result provider implementations should snap.
Remarks
Note that items may still snap to the grid when the necessary IGridConstraintProvider<T> are registered, and they are included in the gridSnappableItems.
The default is NODE | ORTHOGONAL_SEGMENT | PORT_ADJACENT_SEGMENT | BEND_ADJACENT_SEGMENT | LABEL
See Also
Gets the collection of snapReferences other than OrthogonalSnapLines.
Remarks
true
. snappableItems should be used to determine if the moved item may be snapped to these references.Gets the collection of SnapResults.
Gets or sets a value indicating whether to visualize the snap results.
Property Value
true
if the results should be visualized, false
otherwise.See Also
Defined in
Methods
Adds MovementInfo representing an IBend that will be considered for the next drag gesture.
Remarks
Parameters
A map of options to pass to the method.
- info - MovementInfo
- The MovementInfo representing the bend to be moved. Can be created with getMovementInfo.
Adds MovementInfo representing the end of an IEdge that will be considered for the next drag gesture.
Remarks
Parameters
A map of options to pass to the method.
- info - MovementInfo
- The MovementInfo representing the edge end to be reparented. Can be created with getMovementInfos.
- sourceEnd - boolean
true
if theinfo
represents the source end of the edge.
Adds an item which will be reshaped.
Parameters
A map of options to pass to the method.
- item - IModelItem
- The item to be reshaped.
Adds MovementInfo representing an ILabel that will be considered for the next drag gesture.
Remarks
Parameters
A map of options to pass to the method.
- info - MovementInfo
- The MovementInfo representing the label to be moved. Can be created with getMovementInfo.
Adds MovementInfo representing an INode that will be considered for the next drag gesture.
Remarks
Parameters
A map of options to pass to the method.
- info - MovementInfo
- The MovementInfo representing the node to be moved. Can be created with getMovementInfo.
Adds an orthogonally moved segment to this context for which this instance will automatically collect SnapResults and provide a default visualization.
Parameters
A map of options to pass to the method.
- start - MovementInfo
- The starting point of the manipulated segment.
- end - MovementInfo
- The end point of the manipulated segment.
Adds MovementInfo representing an IPort that will be considered for the next drag gesture.
Remarks
Parameters
A map of options to pass to the method.
- info - MovementInfo
- The MovementInfo representing the port to be moved. Can be created with getMovementInfo.
Adds an entry for the same-height-snapping.
Remarks
Parameters
A map of options to pass to the method.
- rectangle - Rect
- The rectangle to obtain the height value from. This rectangle will be used for the snap result visualization.
See Also
Adds an entry for the same-width-snapping.
Remarks
Parameters
A map of options to pass to the method.
- rectangle - Rect
- The rectangle to obtain the width value from. This rectangle will be used for the snap result visualization.
See Also
Called when a drag has been canceled.
Remarks
Defined in
Disposes of all previously temporarily collected state and clears the snapResults collection.
Remarks
Overrides
Collects the SnapReferences for the nodes which are not moving.
Remarks
Parameters
A map of options to pass to the method.
- evt - CollectSnapReferencesEventArgs
- The CollectSnapReferencesEventArgs required for adding snap references.
Collects the SnapReferences for the ports which are not moving.
Remarks
Parameters
A map of options to pass to the method.
- evt - CollectSnapReferencesEventArgs
- The CollectSnapReferencesEventArgs required for adding snap references.
Collects snap references for edge segments.
Remarks
Parameters
A map of options to pass to the method.
- evt - CollectSnapReferencesEventArgs
- The CollectSnapReferencesEventArgs required for adding snap references.
Collects SnapGrids for bends, ports, and nodes if the corresponding bendGridConstraintProvider, portGridConstraintProvider, or nodeGridConstraintProvider are set.
Parameters
A map of options to pass to the method.
- evt - CollectSnapReferencesEventArgs
- The CollectSnapReferencesEventArgs required for adding snap references.
See Also
Collects all node widths and heights in collections used by the SnapSize.
Remarks
Collects first the entries with same size and then SnapSize for snapping to the width and height of these sizes.
Parameters
A map of options to pass to the method.
- evt - CollectSnapReferencesEventArgs
- The CollectSnapReferencesEventArgs required for adding snap references.
Finds pairs of nodes that are visually adjacent to create center and same distance snap lines.
Parameters
A map of options to pass to the method.
- evt - CollectSnapReferencesEventArgs
- The CollectSnapReferencesEventArgs required for adding snap references.
Helper method used by createSnapResultsModelManager to create the IObjectRenderer<SnapResult> for the SnapResult type.
Returns
- ↪IObjectRenderer<SnapResult>
- An instance that can install SnapResults in a CanvasComponent.
Defined in
createSnapResultsModelManager
(canvasComponent: CanvasComponent) : CollectionModelManager<SnapResult>Helper method that creates a CollectionModelManager<T> that can be used to present the current SnapResults in the provided CanvasComponent.
Parameters
A map of options to pass to the method.
- canvasComponent - CanvasComponent
- The control to initialize the CollectionModelManager<T> with.
Returns
- ↪CollectionModelManager<SnapResult>
- The model manager that manages the visual representation of the SnapResults.
Defined in
Called when a drag has been successfully finished.
Remarks
Parameters
A map of options to pass to the method.
- newLocation - Point
- The current mouse location.
- snappingDisabled - boolean
- If set to
true
snapping is temporarily disabled. This will remove the snap reference visualizations and return the unchanged coordinates.
Returns
- ↪Point
- The adjusted coordinates or the unchanged coordinates if snapping has been temporarily disabled by setting
snappingDisabled
totrue
.
Defined in
This method needs to be called by the client IInputMode that initialized this instance after it has performed the actual move operation with the adjusted coordinates after a call to handleMove.
Remarks
snappingDisabled
parameter set to true
.Parameters
A map of options to pass to the method.
- mouseLocation - Point
- The actual mouse location.
- finalLocation - Point
- The final snap location that has been used by the client code for the move.
Defined in
Collects a list of snap lines.
Remarks
See Also
Overrides
Gets the movement info for the given bend.
Remarks
Parameters
A map of options to pass to the method.
- bend - IBend
- The bend to obtain the info for.
Returns
- ↪MovementInfo
- An instance of MovementInfo that describes the movement of the bend.
Gets the movement info for the given node.
Remarks
Parameters
A map of options to pass to the method.
- node - INode
- The node to obtain the info for.
Returns
- ↪MovementInfo
- An instance of MovementInfo that describes the movement of the node.
Gets the movement info for the given label.
Remarks
Parameters
A map of options to pass to the method.
- label - ILabel
- The node to obtain the info for.
Returns
- ↪MovementInfo
- An instance of MovementInfo that describes the movement of the node.
Gets the movement info for the given port.
Remarks
Parameters
A map of options to pass to the method.
- port - IPort
- The port to obtain the info for.
Returns
- ↪MovementInfo
- An instance of MovementInfo that describes the movement of the port.
Gets the MovementInfo for the provided edge.
Remarks
Parameters
A map of options to pass to the method.
- edge - IEdge
- The edge to obtain the movement information of.
Returns
- ↪IListEnumerable<MovementInfo>
- An IListEnumerable<T> of MovementInfo items that describe the geometry of the edge being modified.
Handles a move.
Remarks
snappingDisabled
has to be set to true
.Parameters
A map of options to pass to the method.
- newLocation - Point
- The current mouse location.
- snappingDisabled - boolean
- If set to
true
, snapping is temporarily disabled. This will remove the snap reference visualizations and return the unchanged coordinates.
Returns
- ↪Point
- The adjusted coordinates or the unchanged coordinates if snapping has been temporarily disabled by setting
snappingDisabled
totrue
.
Defined in
Called by IInputMode implementations when an interactive drag is started.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context in which the interactive drag is started.
- originalLocation - Point
- The original location of the mouse.
Throws
- Exception({ name: 'InvalidOperationError' })
- If this context is already initialized.
Overrides
Raises the cleanUp event.
Parameters
A map of options to pass to the method.
- evt - InputModeEventArgs
- The InputModeEventArgs instance containing the event data.
Defined in
Raises the collect-snap-references event.
Parameters
A map of options to pass to the method.
- evt - CollectSnapReferencesEventArgs
- The CollectSnapReferencesEventArgs instance containing the event data.
Raises the collect-snap-results event.
Parameters
A map of options to pass to the method.
- evt - CollectSnapResultsEventArgs
- The CollectSnapResultsEventArgs instance containing the event data.
Defined in
Raises the initialized event.
Parameters
A map of options to pass to the method.
- evt - InputModeEventArgs
- The InputModeEventArgs instance containing the event data.
Defined in
Raises the initializing event.
Parameters
A map of options to pass to the method.
- evt - InputModeEventArgs
- The InputModeEventArgs instance containing the event data.
Defined in
processSnapResults
(snapResults: List<SnapResult>, originalLocation: Point, newLocation: Point) : PointChooses the current SnapResults from a temporary list.
Remarks
Parameters
A map of options to pass to the method.
- snapResults - List<SnapResult>
- A temporary list of suggested SnapResults.
- originalLocation - Point
- The point in world coordinates where the mouse move started.
- newLocation - Point
- The current mouse location.
Returns
- ↪Point
- The adjusted coordinates.
Defined in
Helper method that wraps the given context
so that a lookup query on the wrapped context for the SnapContext type yields this instance.
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context to wrap and delegate all calls to.
Returns
- ↪IInputModeContext
- A modified instance that yields this instance if it is queried for the SnapContext type.
Overrides
Events
Occurs when this instance has been cleaned up.
Occurs every time this instance has been initialized to collect OrthogonalSnapLines.
Remarks
Occurs while moving items and handles.
Remarks
The moving model items must register for this event, preferably in the initializeDrag method of the IDragHandler.
The event handler has to add SnapResults for the moving object to the list. The IDragHandlers of the moved items have to take care themselves whether to add a handler to the list depending on their settings.
Defined in
Occurs when this instance has been initialized.
Occurs when this instance is about to be initialized.