pub trait OngoingScrollExt {
// Required method
fn lock_axis(&mut self, delta: &mut Point<Pixels>, touch_phase: TouchPhase);
}Expand description
gpui delimits scroll gestures with std::time::Instant, which is
unimplemented on wasm32: the first wheel event over an axis-locked scroll
area panics with “time not implemented on this platform” and takes the whole
application down, leaving the canvas unresponsive. Losing the axis lock in
the browser is by far the lesser cost, so the locks below are no-ops there.
Required Methods§
Sourcefn lock_axis(&mut self, delta: &mut Point<Pixels>, touch_phase: TouchPhase)
fn lock_axis(&mut self, delta: &mut Point<Pixels>, touch_phase: TouchPhase)
Locks a wheel delta to the axis its gesture started on, where the platform supports it.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".