C

ConstrainedDragHandler<TWrapped>
abstract

An implementation of the IDragHandler interface that can be used to constrain the movement of an existing instance.
ImplementsInheritance Hierarchy

Members

Show:

Constructors

Initializes a new instance of the ConstrainedDragHandler<TWrapped> class that delegates to the wrappedHandler.
protected

Parameters

wrappedHandler: TWrapped
The handler to wrap.

Properties

Gets the wrappedHandler's location property.
readonly
Gets the wrapped handler to which calls will be ultimately delegated.
protectedreadonlyfinal

Property Value

The wrapped handler.

Methods

Cancels the move operation and calls onCanceled
final

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.
Applies the constraints for the new location.
protectedabstract

Parameters

context: IInputModeContext
The context in which the drag will be performed.
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.

Return Value

Point
The constrained value of newLocation.
Handles the finish operation and invokes onFinished
final

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
Handles the move operation and subsequently calls onMoved
This method will use the constrainNewLocation callback to let subclasses constrain the movement.
final

Parameters

context: IInputModeContext
The context in which the drag will be performed.
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.
Initializes the drag operation and subsequently calls onInitialized
final

Parameters

context: IInputModeContext
The context in which the drag will be performed.
Called when the cancelDrag method has been called.
protected

Parameters

context: IInputModeContext
The input mode context.
originalLocation: Point
The original location.
Called when the dragFinished method has been called.
protected

Parameters

context: IInputModeContext
The input mode context.
originalLocation: Point
The original location.
newLocation: Point
The new location.
Called when the initializeDrag method has been called.
protected

Parameters

context: IInputModeContext
The input mode context.
originalLocation: Point
The original location.
Called when the handleMove operation has been performed.
protected

Parameters

context: IInputModeContext
The input mode context.
originalLocation: Point
The original location.
newLocation: Point
The new location.