An implementation of the IHandle interface that can be used to constrain the handle of an item.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.input.ConstrainedHandle
See Also
Constructors
Initializes a new instance of the ConstrainedHandle class that delegates to the wrappedHandle
.
Parameters
A map of options to pass to the method.
- wrappedHandle - IHandle
- The handle to wrap.
Properties
Gets the wrappedHandler's cursor property.
Gets the wrappedHandler's location property.
Implements
Gets the wrappedHandler's type property.
Gets the wrapped handler to which calls will be ultimately delegated.
Defined in
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.
- originalLocation - Point
- The value of the coordinate of the location property at the time of initializeDrag.
See Also
Implements
constrainNewLocation
(context: IInputModeContext, originalLocation: Point, newLocation: Point) : PointApplies the constraints for the new location.
Parameters
A map of options to pass to the method.
- 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.
Returns
- ↪Point
- The constrained value of
newLocation
.
Defined in
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.
- 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
See Also
Implements
Calls the wrappedHandler's handleClick method.
Parameters
A map of options to pass to the method.
- evt - ClickEventArgs
- Arguments describing the click.
See Also
Implements
Handles the move operation and subsequently calls onMoved
Remarks
Parameters
A map of options to pass to the method.
- 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.
See Also
Implements
Initializes the drag 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 cancelDrag method has been called.
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The input mode context.
- originalLocation - Point
- The original location.
Defined in
Called when the dragFinished method has been called.
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The input mode context.
- originalLocation - Point
- The original location.
- newLocation - Point
- The new location.
Defined in
Called when the initializeDrag method has been called.
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The input mode context.
- originalLocation - Point
- The original location.
Defined in
Called when the handleMove operation has been performed.
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The input mode context.
- originalLocation - Point
- The original location.
- newLocation - Point
- The new location.