-
Notifications
You must be signed in to change notification settings - Fork 44
Description
The Idle → Inertia transition doc says:
This state transition only happens when the InteractionTracker is in the Idle state and TryUpdatePositionWithVelocity or TryUpdateScaleWithVelocity is called.
However, given:
var interactionTracker = InteractionTracker.CreateWithOwner(_visual.Compositor, new MyOwner());
interactionTracker.MinPosition = new(-1000);
interactionTracker.MaxPosition = new(1000);
var vis = VisualInteractionSource.Create(_visual);
interactionTracker.InteractionSources.Add(vis);
vis.ManipulationRedirectionMode = VisualInteractionSourceRedirectionMode.CapableTouchpadAndPointerWheel;
vis.PositionXSourceMode = InteractionSourceMode.EnabledWithoutInertia;
vis.PositionYSourceMode = InteractionSourceMode.EnabledWithoutInertia;Just scrolling with mouse wheel will cause Idle → Inertia transition. There are no TryUpdatePositionWithVelocity calls involved.
Also, the method name is TryUpdatePositionWithAdditionalVelocity, so that's a typo as well.
NOTE: When Idle transitions to Inertia with mouse wheel, the request id is always zero, indicating that it doesn't involve TryUpdatePositionWithAdditionalVelocity. Because:
Returns the request ID. On state transitions, the request which caused the change in state will be included in the args. These IDs will start at 1 and increase with each try call during the lifetime of the application.