Skip to content

Commit 97b1f57

Browse files
committed
Add 2x factor to momentum scroll speed
1 parent 9e522b8 commit 97b1f57

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/blitz-dom/src/events/mouse.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,8 @@ pub(crate) fn handle_mouseup<F: FnMut(DomEvent)>(
349349
let fling = FlingState {
350350
target: state.target,
351351
last_seen_time: time_ms as f64,
352-
x_velocity: x_velocity as f64, // * 16.6666,
353-
y_velocity: y_velocity as f64, // * 16.6666,
352+
x_velocity: x_velocity as f64 * 2.0,
353+
y_velocity: y_velocity as f64 * 2.0,
354354
};
355355

356356
doc.scroll_animation = ScrollAnimationState::Fling(fling);

0 commit comments

Comments
 (0)