Default implementation of the IReshapeHandleProvider interface for nodes.
Remarks
Examples
Type Details
- yfiles module
- view-editor
- yfiles-umd modules
- view-editor, view-table, view
- Legacy UMD name
- yfiles.input.NodeReshapeHandleProvider
Constructors
NodeReshapeHandleProvider
(node: INode, reshapeHandler: IReshapeHandler, handlePositions: HandlePositions)Creates a default instance that provide handles for each of the handlePositions
given for the node
.
Parameters
A map of options to pass to the method.
- node - INode
- The node to provide reshape handles for.
- reshapeHandler - IReshapeHandler
- The reshape handler to delegate the actual reshaping to.
- handlePositions - HandlePositions
- A bitwise combination of all handle positions this instance should provide a handle for.
Properties
Gets or sets the event recognizer that determines if the center of the reshapeable is kept during the reshape gesture.
Remarks
Signature Details
function(eventSource: any, evt: EventArgs) : boolean
Parameters
- eventSource - any
- The source of the event.
- evt - EventArgs
- The arguments of the event to be decided to handle.
Returns
- boolean
true
if theevt
is considered to be handled.
Examples
See Also
Gets or sets the bitwise combination of all handle positions this instance provides a handle for.
Gets or sets the maximal bounds this reshapeable may fill.
Remarks
Defined in
Gets or sets the maximum size allowed for the reshapeable.
Gets or sets the minimum rectangular area that needs to be contained in the reshapeable.
Gets or sets the minimum size allowed for the reshapeable.
Gets the node to provide reshape handles for.
Gets or sets the event recognizer that determines if the width/height ratio of the reshapeable is kept during the reshape gesture.
Remarks
Signature Details
function(eventSource: any, evt: EventArgs) : boolean
Parameters
- eventSource - any
- The source of the event.
- evt - EventArgs
- The arguments of the event to be decided to handle.
Returns
- boolean
true
if theevt
is considered to be handled.
Examples
See Also
Gets the reshape handler to delegate the actual reshaping to.
Gets or sets the policy that determines how the mouse location is interpreted when the reshape gesture shall keep the aspect ratio.
Remarks
The ratioReshapeRecognizer is used to determine whether the aspect ratio shall be kept at all.
getHandle propagates this policy value to the reshapePolicy of its NORTH_WEST, NORTH_EAST, SOUTH_WEST and SOUTH_EAST handles. For WEST and EAST handles, HORIZONTAL is used. For NORTH and SOUTH handles, VERTICAL is used.
The default value is PROJECTION.
Examples
Gets or sets an INodeSizeConstraintProvider that is passed to the queried handles.
Methods
Returns the handlePositions property.
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context for which the handles are queried.
Returns
- ↪HandlePositions
- A bitwise combination of all handle positions this instance provides a handle for if queried in getHandle.
See Also
Implements
Provides a NodeReshapeHandlerHandle that uses the reshapeHandler to perform the actual reshaping.
Remarks
The minimumSize, maximumSize, minimumEnclosedArea, maximumBoundingArea, ratioReshapeRecognizer and centerReshapeRecognizer are propagated to the NodeReshapeHandlerHandle.
The reshapePolicy is only propagated if the position
is neither HORIZONTAL nor VERTICAL. If position
is HORIZONTAL, HORIZONTAL is set. If position
is VERTICAL, VERTICAL is set.
This method may be called for each possible single position contained in the set as returned by getAvailableHandles.
Parameters
A map of options to pass to the method.
- inputModeContext - IInputModeContext
- The context for which the handles are queried.
- position - HandlePositions
- The position to provide an instance for.
Returns
- ↪IHandle
- A handle implementation.