MCPcopy Create free account
hub / github.com/angular-rust/ux-components / scrollvmove

Method scrollvmove

src/elements/scrollable.rs:197–205  ·  view source on GitHub ↗
(&self, e: &MouseEvent, _: f32)

Source from the content-addressed store, hash-verified

195 }
196
197 fn scrollvmove(&self, e: &MouseEvent, _: f32) {
198 let mut state = self.state.borrow_mut();
199 if state.drag_v && state.visible_v {
200 let _dest =
201 (e.y as f32 - state.drag_y).clamp(self.y(), self.bottom() - self.scrollv.h());
202 state.percent_v = (_dest - self.y()) / (self.h() - self.scrollv.h());
203 self.update_scroll();
204 } //drag_v
205 }
206
207 //horizontal
208

Callers

nothing calls this directly

Calls 4

bottomMethod · 0.80
yMethod · 0.45
hMethod · 0.45
update_scrollMethod · 0.45

Tested by

no test coverage detected