C

ConstrainedReshapeHandler
abstract

An implementation of the IReshapeHandler interface that can be used to constrain the reshaping of an existing instance conveniently.
ImplementsInheritance Hierarchy

Members

Show:

Constructors

Initializes a new instance of the ConstrainedReshapeHandler class that delegates to the wrappedHandler.
protected

Parameters

wrappedHandler: IReshapeHandler
The handler to wrap.

Properties

Gets the wrappedHandler's bounds property.
readonlyfinal
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.
originalBounds: Rect
The value of the coordinates of the bounds property at the time of initializeReshape.
Applies the constraints for the new bounds.
This method should return a Rect which represents the newBounds after applying the constraints.
protectedabstract

Parameters

context: IInputModeContext
The context in which the reshape will be performed.
originalBounds: Rect
The value of the bounds property at the time of initializeReshape.
newBounds: Rect
The coordinates in the world coordinate system that the client wants the handle to be at. Depending on the implementation the bounds may or may not be modified to reflect the new value.

Return Value

Rect
The constrained value of newBounds.
Handles the reshape operation and subsequently calls onReshaped.
This method will use the constrainNewBounds callback to let subclasses constrain the reshaping.
final

Parameters

context: IInputModeContext
The context in which the reshape will be performed.
originalBounds: Rect
The value of the bounds property at the time of initializeReshape.
newBounds: Rect
The coordinates in the world coordinate system that the client wants to reshape the item to. Depending on the implementation, the bounds may or may not be modified to reflect the new value.
Initializes the reshape operation and subsequently calls onInitialized
final

Parameters

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

Parameters

context: IInputModeContext
The input mode context.
originalBounds: Rect
The original bounds.
Called when the reshapeFinished method has been called.
protected

Parameters

context: IInputModeContext
The input mode context.
originalBounds: Rect
The original bounds.
newBounds: Rect
The new bounds.
Called when the initializeReshape method has been called.
protected

Parameters

context: IInputModeContext
The input mode context.
originalBounds: Rect
The original bounds.
Called when the handleReshape operation has been performed.
protected

Parameters

context: IInputModeContext
The input mode context.
originalBounds: Rect
The original Bounds.
newBounds: Rect
The new Bounds.
Handles the finish operation and invokes onFinished.
final

Parameters

context: IInputModeContext
The context to retrieve information about the drag from.
originalBounds: Rect
The value of the bounds property at the time of initializeReshape.
newBounds: Rect
The coordinates in the world coordinate system that the client wants the handle to be at. Depending on the implementation, the bounds may or may not be modified to reflect the new value. This is the same value as delivered in the last invocation of handleReshape.