C

ConstrainedDragHandler<TWrapped>
abstract

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

Type Parameters

TWrapped

: IDragHandler
The exact type of the wrapped implementation.

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<TWrapped>'s IDragHandler.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<TWrapped>
final

Parameters

context: IInputModeContext
The context to retrieve information about the drag from.
originalLocation: Point
The value of the coordinate of the location<TWrapped> property at the time of initializeDrag<TWrapped>.
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<TWrapped> property at the time of initializeDrag<TWrapped>.
newLocation: Point
The coordinates in the world coordinate system that the client wants the handle to be at. Depending on the implementation the location<TWrapped> 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<TWrapped>
final

Parameters

context: IInputModeContext
The context to retrieve information about the drag from.
originalLocation: Point
The value of the location<TWrapped> property at the time of initializeDrag<TWrapped>.
newLocation: Point
The coordinates in the world coordinate system that the client wants the handle to be at. Depending on the implementation the location<TWrapped> may or may not be modified to reflect the new value. This is the same value as delivered in the last invocation of handleMove<TWrapped>
Handles the move operation and subsequently calls onMoved<TWrapped>
This method will use the constrainNewLocation<TWrapped> 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<TWrapped> property at the time of initializeDrag<TWrapped>.
newLocation: Point
The coordinates in the world coordinate system that the client wants the handle to be at. Depending on the implementation the location<TWrapped> may or may not be modified to reflect the new value.
Initializes the drag operation and subsequently calls onInitialized<TWrapped>
final

Parameters

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

Parameters

context: IInputModeContext
The input mode context.
originalLocation: Point
The original location.
Called when the dragFinished<TWrapped> 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<TWrapped> method has been called.
protected

Parameters

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

Parameters

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