Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions microsoft.ui.composition.interactions/interactiontracker.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ The following describes what triggers each state change to happen:
| Begin State | End State | Possible Triggers |
|------------------|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Idle | Interacting | This state transition only happens when a user manipulation that aligns with a VisualInteractionSource associated with the InteractionTracker is being performed. |
| Idle | Inertia | This state transition only happens when the InteractionTracker is in the Idle state and TryUpdatePositionWithVelocity or TryUpdateScaleWithVelocity is called. |
| Idle | Inertia | This state transition happens when the InteractionTracker is in the Idle state and TryUpdatePositionWithAdditionalVelocity or TryUpdateScaleWithAdditionalVelocity is called. It can also occur when input such as a mouse wheel scroll causes the InteractionTracker to enter an inertia-driven motion. |
| Idle | CustomAnimation | This state transition happens when InteractionTracker is in the Idle state and TryUpdatePositionWithAnimation or TryUpdateScaleWithAnimation is called. |
| Interacting | Inertia | This state transition only happens when a user manipulation that has been sent to the InteractionTracker completes. When the active input ends, the InteractionTracker will enter the Inertia state, and information such as the finger's release velocity and the InertiaDecayRate will determine the behavior during the Inertia state. |
| Inertia | Idle | This state transition happens when the function(s) being used to update position and/or scale are no longer resulting in change. In other words, position and scale velocity have both gotten to zero. This state transition can also happen if a call is made to explicitly update position or scale without animation or velocity. These calls will end inertia and transition to Idle with the updated property values. |
| Inertia | Inertia | This state transition happens when TryUpdatePositionWithVelocity or TryUpdateScaleWithVelocity is called when already in the Inertia state. Re-entering Inertia will cause all InertiaStateEntered properties to be reevaluated. |
| Inertia | Inertia | This state transition happens when TryUpdatePositionWithAdditionalVelocity or TryUpdateScaleWithAdditionalVelocity is called when already in the Inertia state. Re-entering Inertia will cause all InertiaStateEntered properties to be reevaluated. |
| Inertia | CustomAnimation | This state transition happens when a call to TryUpdatePositionWithAnimation or TryUpdateScaleWithAnimation is made while in the Inertia sate. |
| Inertia | Interacting | This state transition happens when active input from the user that hit-tests to the VisualInteractionSource comes in before Inertia has completed. |
| CustomAnimation | Idle | This state transition happens when all animations set on the InteractionTracker's position and scale properties have completed. |
| CustomAnimation | CustomAnimation | This state transition happens when a call to TryUpdatePositionWithAnimation or TryUpdateScaleWithAnimation is made while already in the CustomAnimation state. |
| CustomAnimation | Inertia | This state transition happens when a call to TryUpdatePositionWithVelocity or TryUpdateScaleWithVelocity is made when in the CustomAnimation state. |
| CustomAnimation | Inertia | This state transition happens when a call to TryUpdatePositionWithAdditionalVelocity or TryUpdateScaleWithAdditionalVelocity is made when in the CustomAnimation state. |
| CustomAnimation | Interacting | This state transition happens when a user manipulation that hit-tests to a VisualInteractionSource associated with the InteractionTracker is being performed. |

Any state transition made by the InteractionTracker will produce a callback indicating the new state with args that include information relevant to that state as well as the requestID for the request that caused the state change. Active manipulations from the user will result in a requestID of 0. Any Try\* call will issue a requestID that can be used for tracking which Try\* call caused the state change. The first requestID during the lifetime of the application will be 1, and each subsequent call will increment the requestID, meaning that each will be unique.
Expand Down