I

IDragHandler

Interface for an object that can be used to drag something displayed in a CanvasComponent
Inheritance Hierarchy

Remarks

Items can be dragged with the mouse and an instance of this class will modify their position accordingly. A drag will trigger the invocation of initializeDrag, zero or more handleMove calls, and will be finalized by either dragFinished or cancelDrag.

See Also

API

IPositionHandler, IHandle, IInputModeContext

Demos

Shows how to customize and restrict the movement behavior of nodes.

Members

No filters for this type

Properties

Methods

Called by clients to indicate that the dragging has been canceled by the user.
This method may be called after the initial initializeDrag and zero or more invocations of handleMove. Implementations should reset the position of the items they modify to their initial state. Alternatively to this method the dragFinished method might be called.
abstract

Parameters

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

Developer's Guide
Called by clients to indicate that the repositioning has just been finished.
This method may be called after the initial initializeDrag and zero or more invocations of handleMove. Alternatively to this method the cancelDrag method might be called.
abstract

Parameters

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

Developer's Guide
Called by clients to indicate that the element has been dragged and its position should be updated.
This method may be called more than once after an initial initializeDrag and the final call will be followed by either one dragFinished or one cancelDrag call.
abstract

Parameters

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

Developer's Guide
Called by clients to indicate that the element is going to be dragged.

Static Methods

static

Parameters

Return Value

IDragHandler