From 70b446fb0709cba7f8aff55a83f328eed4709b9c Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 11 Oct 2022 14:07:32 +0200 Subject: [PATCH] Invert zoom direction The intent behind the original zoom direction was to provide a consistent metaphor: You manipulate the model, not an abstract camera. Unfortunately, it turned out to not be that simple. At least on Gnome, if you enable "natural scrolling" (which is the same metaphor, applied to the Gnome UI), you invert all mouse whell input, and so also the zoom direction in Fornjot. With this change, the zoom direction in Fornjot follows the "natural scrolling" configuration in Gnome. Unfortunately I don't have data from other platforms. --- crates/fj-viewer/src/input/zoom.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/fj-viewer/src/input/zoom.rs b/crates/fj-viewer/src/input/zoom.rs index f4f7a0eb1..9c6e495b7 100644 --- a/crates/fj-viewer/src/input/zoom.rs +++ b/crates/fj-viewer/src/input/zoom.rs @@ -14,6 +14,6 @@ impl Zoom { let distance = (focus_point.0 - camera.position()).magnitude(); let displacement = zoom_delta * distance.into_f64(); camera.translation = camera.translation - * Transform::translation(Vector::from([0.0, 0.0, -displacement])); + * Transform::translation(Vector::from([0.0, 0.0, displacement])); } }