scale grab offset together with the overlay/anchor (#404)

fixes #397
This commit is contained in:
Orion
2026-01-21 03:22:12 +01:00
committed by GitHub
parent 2ade8c542e
commit 37fde4c642

View File

@@ -806,6 +806,7 @@ where
pointer.interaction.mode = PointerMode::Special;
let grab_dist = grab_data.offset.translation.length().clamp(0.5, 5.0) * 0.2 + 0.4;
handle_scale(&mut app.anchor, pointer.now.scroll_y * grab_dist);
handle_scale(&mut grab_data.offset, pointer.now.scroll_y * grab_dist);
} else if app.session.config.allow_sliding && pointer.now.scroll_y.is_finite() {
// single grab push/pull
let grab_dist = grab_data.offset.translation.length().clamp(0.5, 5.0);
@@ -828,6 +829,7 @@ where
&mut overlay_state.transform,
pointer.now.scroll_y * grab_dist,
);
handle_scale(&mut grab_data.offset, pointer.now.scroll_y * grab_dist);
} else if app.session.config.allow_sliding && pointer.now.scroll_y.is_finite() {
// single grab push/pull
let grab_dist = grab_data.offset.translation.length().clamp(0.5, 5.0);