Manages interactive snapping of elements to other elements during drag operations like movements.Namespace: yWorks.Canvas.Input
Assembly: yWorks.yFilesSilverlight.Viewer (in yWorks.yFilesSilverlight.Viewer.dll) Version: 188.8.131.52
public class SnapContext
Public Class SnapContext
This class should be used by IInputMode implementations and similar code as follows:
- To initialize the operation InitializeDrag(IInputModeContext, PointD) needs to be called.
- Method DragInitialized()()()() needs to be called after the mode has performed all of its own initialization.
- Then a series of zero or more invocations of either HandleMove(PointD) or DisableSnapping()()()() needs to be called for each incremental movement of the user's input device.
- If HandleMove(PointD) had been called, the mode should perform the move and report back to the instance by calling the Dragged(PointD, SnapState) method.
- If the operation is canceled by the user CancelDrag()()()() should be called.
- If the operation is finalized the DragFinished(PointD) method should be called.