Default implementation of the IReparentStripeHandler interface.
Implements
- I
Remarks
This implementation allows to specify a maximal nesting depth for reparent operations.
Members
Show:
Constructors
Initializes a new instance of the ReparentStripeHandler class.
Initializes a new instance of the ReparentStripeHandler class.
Parameters
Properties
Note that it is always possible to decrease the nesting depth, even if the resulting depth would still be too high. This allows to interactively reduce an invalid nesting depth in multiple steps. The default value is
0x7FFFFFFF, which effectively means an unlimited nesting depth.final
Note that it is always possible to decrease the nesting depth, even if the resulting depth would still be too high. This allows to interactively reduce an invalid nesting depth in multiple steps. The default value is
0x7FFFFFFF, which effectively means an unlimited nesting depth.final
Methods
This implementation adjusts the size of
stripe to Math.Max(originalStripeSize, originalParentSize) if reparentPosition is an ADD_CHILD operationprotected
Parameters
- 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.
- reparentPosition: StripeReparentPolicy
- Where to place the stripe as a result of the gesture that triggered the reparent operation.
- index: number
- The index where the stripe should be inserted.
- originalStripeSize: number
- The original size of
stripe - originalParentSize: number
- The original size of
newParent
Checks the constraints imposed by maxRowLevel or maxColumnLevel for a valid gesture.
Checks the constraints imposed by maxRowLevel or maxColumnLevel for a valid gesture.
Parameters
- 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.
Return Value
- boolean
trueiff the resulting nesting depth is smaller than maxRowLevel or maxColumnLevel, or if the nesting depth would not increase by the operation.
Implements
IReparentStripeHandler.isValidParentThis implementation adjusts the size of the moved and/or the target stripe by calling adjustSize.
Parameters
- 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 should be inserted.
- reparentPosition: StripeReparentPolicy
- Where to place the stripe as a result of the gesture that triggered the reparent operation.
Implements
IReparentStripeHandler.reparentDetermines whether the user may detach the given stripe from its current parent in order to reparent it.
Determines whether the user may detach the given stripe from its current parent in order to reparent it.
Parameters
- 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.
Return Value
- boolean
- This implementation returns always
true.