diff --git a/crates/egui/src/containers/scroll_area.rs b/crates/egui/src/containers/scroll_area.rs index 5f7a9a03..0c2cead7 100644 --- a/crates/egui/src/containers/scroll_area.rs +++ b/crates/egui/src/containers/scroll_area.rs @@ -54,6 +54,11 @@ impl State { pub fn store(self, ctx: &Context, id: Id) { ctx.data_mut(|d| d.insert_persisted(id, self)); } + + /// Get the current kinetic scrolling velocity. + pub fn velocity(&self) -> Vec2 { + self.vel + } } pub struct ScrollAreaOutput {