Customized IPositionHandler implementation that moves a stripe in the table hierarchy when the stripe is dragged.
Remarks
Type Details
- yfiles module
- view-table
- yfiles-umd modules
- view-table, view
- Legacy UMD name
- yfiles.input.ReparentStripePositionHandler
Constructors
Creates a new instance of this position handler which moves movedStripe
Properties
Gets the current IInputModeContext
Gets a view of the location of the item.
Remarks
Implements
Gets the moved stripe.
Methods
Called by clients to indicate that the dragging has been canceled by the user.
Remarks
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
Create a ghost object for the source region of the reparent gesture.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The current input mode context
Returns
- ↪ICanvasObject
- A canvas object that is used to visualize the target region.
See Also
Create a ghost visualization for the target region of the reparent gesture.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The current input mode context
- stripe - IStripe
- The stripe for which the visualization should be created.
Returns
- ↪ICanvasObject
- A canvas object that is used to visualize the target region.
See Also
determineGesture
(context: IInputModeContext, location: IPoint, sourceStripe: IStripe, targetSubregion: StripeSubregion, targetBounds: Rect) : StripeReparentPolicyDetermine the reparent gesture that would result from the given parameters.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The current input mode context
- location - IPoint
- The current drag location
- sourceStripe - IStripe
- The stripe that is moved
- targetSubregion - StripeSubregion
- The stripe subregion for the target.
- targetBounds - Rect
- The target bounds
Returns
- ↪StripeReparentPolicy
- A StripeReparentPolicy that specifies the operation to perform.
Called by clients to indicate that the repositioning has just been finished.
Remarks
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
Finds the target stripe subregion at location
and its associated owner node.
Parameters
A map of options to pass to the method.
- location - Point
- The hit location.
Returns
- ↪StripeSubregion
- A StripeSubregion that lies at
location
, or null if no such region could be found.
Called by clients to indicate that the element has been dragged and its position should be updated.
Remarks
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.
See Also
Implements
Called by clients to indicate that the element is going to be dragged.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context to retrieve information about the drag from.
See Also
Implements
Called whenever a change in the oldTable hierarchy occurs through this position handler
Called by clients to set the position to the given coordinates.
Parameters
A map of options to pass to the method.
- location - Point
- The new location.
See Also
updateSourceGhost
(context: IInputModeContext, sourceGhost: ICanvasObject, movedStripe: IStripe, reparentPosition: StripeReparentPolicy) : ICanvasObjectUpdates the source ghost visualization after a drag.
Remarks
sourceGhost
.Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The current input mode context.
- sourceGhost - ICanvasObject
- The canvas object that represents the source ghost.
- movedStripe - IStripe
- The IStripe which is moved by this reparent gesture.
- reparentPosition - StripeReparentPolicy
- Where to place the stripe after reparenting.
Returns
- ↪ICanvasObject
- An updated canvas object for the source ghost.
updateTargetGhost
(context: IInputModeContext, targetGhost: ICanvasObject, targetStripe: IStripe, reparentPosition: StripeReparentPolicy, targetBounds: Rect) : ICanvasObjectModifies the target ghost visualization after a drag.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The current input mode context.
- targetGhost - ICanvasObject
- The canvas object that represents the target ghost.
- targetStripe - IStripe
- The target for the reparent gesture.
- reparentPosition - StripeReparentPolicy
- The mode the describes the results of the reparent gesture.
- targetBounds - Rect
- The current visualization bounds that have been computed with updateTargetGhostBounds.
Returns
- ↪ICanvasObject
- An updated canvas object for the target ghost.
updateTargetGhostBounds
(originalTargetBounds: Rect, reparentPosition: StripeReparentPolicy, targetStripe: IStripe) : RectUpdates the visualization bounds for the target visualization depending on the provided values.
Parameters
A map of options to pass to the method.
- originalTargetBounds - Rect
- The target bounds prior to this method call.
- reparentPosition - StripeReparentPolicy
- Where to place the stripe after the reparenting operations according to the reparent gesture.
- targetStripe - IStripe
- The target stripe which has been determined by the input mode.
Returns
- ↪Rect
- Updated bounds for the target visualization.
Events
Occurs when a stripe state is changed by this input mode.
Event Registration
addStripeChangedListener(function(this, StripeEventArgs):void)
Event Deregistration
removeStripeChangedListener(function(this, StripeEventArgs):void)
Signature Details
function(sender: this, evt: StripeEventArgs)
Parameters
- sender - this
- The source of the event.
- evt - StripeEventArgs
- An object that contains the event data.