An implementation of the IReshapeHandler interface that can be used to constrain the reshaping of an existing instance conveniently.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.input.ConstrainedReshapeHandler
See Also
Constructors
Initializes a new instance of the ConstrainedReshapeHandler class that delegates to the wrappedHandler
.
Parameters
A map of options to pass to the method.
- wrappedHandler - IReshapeHandler
- The handler to wrap.
Properties
Gets the wrappedHandler's bounds property.
Implements
Gets the wrapped handler to which calls will be ultimately delegated.
Methods
Cancels the move operation and calls onCanceled
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context to retrieve information about the drag from.
- originalBounds - Rect
- The value of the coordinate of the bounds property at the time of initializeReshape.
See Also
Implements
Applies the constraints for the new bounds.
Remarks
newBounds
after applying the constraints.Parameters
A map of options to pass to the method.
- 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.
Returns
- ↪Rect
- The constrained value of
newBounds
.
Handles the reshape operation and subsequently calls onReshaped
Remarks
Parameters
A map of options to pass to the method.
- 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.
See Also
Implements
Initializes the reshape operation and subsequently calls onInitialized
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context in which the drag will be performed.
See Also
Implements
Called when the cancelReshape method has been called.
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The input mode context.
- originalBounds - Rect
- The original bounds.
Called when the reshapeFinished method has been called.
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The input mode context.
- originalBounds - Rect
- The original bounds.
- newBounds - Rect
- The new bounds.
Called when the initializeReshape method has been called.
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The input mode context.
- originalBounds - Rect
- The original bounds.
Called when the handleReshape operation has been performed.
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The input mode context.
- originalBounds - Rect
- The original Bounds.
- newBounds - Rect
- The new Bounds.
Handles the finish operation and invokes onFinished
Parameters
A map of options to pass to the method.
- 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