pub(crate) enum PanPolicy {
Undetermined,
NoScroll,
Lock(PanAxis),
Free,
}Expand description
The axis-lock policy for a pan gesture, decided at pan-start from the hit
node’s touch-action and scrollable axes plus the gesture’s dominant axis.
Variants§
Undetermined
Not yet decided (the hit-test/scroll-tree lookup hasn’t run). The first panning move emits the full 2D delta; the policy is set retroactively once the hit node is resolved.
NoScroll
touch-action: none (or pinch-zoom alone): no single-finger direct
manipulation. Suppress scrolling and fling.
Lock(PanAxis)
Lock the gesture to a single axis (zero the other axis in the emitted
delta and the velocity). Used for pan-x/pan-y, and for auto when
the hit node cannot scroll the dominant axis (scroll-chaining lock).
Free
No lock: emit the full 2D delta so both axes scroll freely. Used for
auto/manipulation/pan-x pan-y when the hit node can scroll the
dominant axis.
Implementations§
Trait Implementations§
impl Copy for PanPolicy
impl StructuralPartialEq for PanPolicy
Auto Trait Implementations§
impl Freeze for PanPolicy
impl RefUnwindSafe for PanPolicy
impl Send for PanPolicy
impl Sync for PanPolicy
impl Unpin for PanPolicy
impl UnsafeUnpin for PanPolicy
impl UnwindSafe for PanPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more