Interface for an object that can be used to drag something displayed in a CanvasComponent
Remarks
Related Programming Samples
- Position Handler
- Shows how to customize and restrict the movement behavior of nodes.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.input.IDragHandler
See Also
Properties
Gets a view of the location of the item.
Remarks
Methods
Called by clients to indicate that the dragging has been canceled by the user.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context to retrieve information about the drag from.
- originalLocation - Point
- The value of the coordinate of the location property at the time of initializeDrag.
See Also
Called by clients to indicate that the repositioning has just been finished.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context to retrieve information about the drag from.
- originalLocation - Point
- The value of the location property at the time of initializeDrag.
- newLocation - Point
- The coordinates in the world coordinate system that the client wants the handle to be at. Depending on the implementation the location may or may not be modified to reflect the new value. This is the same value as delivered in the last invocation of handleMove
See Also
Called by clients to indicate that the element has been dragged and its position should be updated.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context to retrieve information about the drag from.
- originalLocation - Point
- The value of the location property at the time of initializeDrag.
- newLocation - Point
- The coordinates in the world coordinate system that the client wants the handle to be at. Depending on the implementation the location may or may not be modified to reflect the new value.
See Also
Called by clients to indicate that the element is going to be dragged.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context to retrieve information about the drag from.
See Also
Static Methods
Creates an implementation of the interface IDragHandler from the given definition.
Remarks
Parameters
A map of options to pass to the method.
- initializeDrag - function(IInputModeContext):void
Called by clients to indicate that the element is going to be dragged.
This property holds the implementation for initializeDrag.
- handleMove - function(IInputModeContext, Point, Point):void
Called by clients to indicate that the element has been dragged and its position should be updated.
This property holds the implementation for handleMove.
- cancelDrag - function(IInputModeContext, Point):void
Called by clients to indicate that the dragging has been canceled by the user.
This property holds the implementation for cancelDrag.
- dragFinished - function(IInputModeContext, Point, Point):void
Called by clients to indicate that the repositioning has just been finished.
This property holds the implementation for dragFinished.
- location - IPoint
Gets a view of the location of the item.
This property holds the implementation for location.
Returns
- ↪IDragHandler
- An instance of the IDragHandler interface based on the given definition.