Interface used for implementations that recognize, approve and disapprove stripe reparenting gestures, as well as actually performs the reparenting.
Type Details
- yfiles module
- view-table
- yfiles-umd modules
- view-table, view
- Legacy UMD name
- yfiles.input.IReparentStripeHandler
See Also
Methods
isValidParent
(context: IInputModeContext, stripe: IStripe, newParent: IStripe, index: number, reparentPosition: StripeReparentPolicy) : booleanDetermines whether the provided node may be reparented to a newParent
.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context that provides information about the user input.
- stripe - IStripe
- The stripe that will be reparented.
- newParent - IStripe
- The potential new parent.
- index - number
- The index where the stripe would be reparented
- reparentPosition - StripeReparentPolicy
- Where to place the stripe as a result of the gesture that would be used for the reparent operation.
Returns
- ↪boolean
- Whether
newParent
is a valid new parent forstripe
for the given index and gesture.
reparent
(context: IInputModeContext, movedStripe: IStripe, newParent: IStripe, index: number, reparentPosition: StripeReparentPolicy)Performs the actual reparenting after the reparent gesture has been finalized.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context that provides information about the user input.
- movedStripe - IStripe
- The stripe that will be reparented.
- newParent - IStripe
- The potential new parent.
- index - number
- The index where the stripe should be inserted.
- reparentPosition - StripeReparentPolicy
- Where to place the stripe as a result of the gesture that triggered the reparent operation.
Determines whether the user may detach the given stripe from its current parent in order to reparent it.
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context that provides information about the user input.
- stripe - IStripe
- The stripe that is about to be detached from its current parent.
Returns
- ↪boolean
- Whether the stripe may be detached and reparented.
Static Methods
Creates an implementation of the interface IReparentStripeHandler from the given definition.
Remarks
Parameters
A map of options to pass to the method.
- shouldReparent - function(IInputModeContext, IStripe):boolean
Determines whether the user may detach the given stripe from its current parent in order to reparent it.
This property holds the implementation for shouldReparent.
- isValidParent - function(IInputModeContext, IStripe, IStripe, number, StripeReparentPolicy):boolean
Determines whether the provided node may be reparented to a
newParent
.This property holds the implementation for isValidParent.
- reparent - function(IInputModeContext, IStripe, IStripe, number, StripeReparentPolicy):void
Performs the actual reparenting after the reparent gesture has been finalized.
This property holds the implementation for reparent.
Returns
- ↪IReparentStripeHandler
- An instance of the IReparentStripeHandler interface based on the given definition.