An implementation of the IReshapeHandler interface that can be used to constrain the reshaping of an existing instance conveniently.
Implements
- I
Members
Show:
Constructors
Initializes a new instance of the ConstrainedReshapeHandler class that delegates to the wrappedHandler.
Initializes a new instance of the ConstrainedReshapeHandler class that delegates to the
wrappedHandler.Properties
Gets the wrappedHandler's bounds property.
Gets the wrappedHandler's bounds property.
readonlyfinal
Implements
IReshapeHandler.boundsGets the wrapped handler to which calls will be ultimately delegated.
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
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.
Implements
IReshapeHandler.cancelReshapeApplies the constraints for the new bounds.
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.
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.
Implements
IReshapeHandler.handleReshapeInitializes the reshape operation and subsequently calls onInitialized
Initializes the reshape operation and subsequently calls onInitialized
final
Parameters
- context: IInputModeContext
- The context in which the drag will be performed.
Implements
IReshapeHandler.initializeReshapeCalled when the cancelReshape method has been called.
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.
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.
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.
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.
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.