mirror of
https://github.com/hannobraun/Fornjot
synced 2025-01-18 06:06:09 +00:00
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.
This commit is contained in:
parent
856a93b643
commit
70b446fb07
@ -14,6 +14,6 @@ impl Zoom {
|
|||||||
let distance = (focus_point.0 - camera.position()).magnitude();
|
let distance = (focus_point.0 - camera.position()).magnitude();
|
||||||
let displacement = zoom_delta * distance.into_f64();
|
let displacement = zoom_delta * distance.into_f64();
|
||||||
camera.translation = camera.translation
|
camera.translation = camera.translation
|
||||||
* Transform::translation(Vector::from([0.0, 0.0, -displacement]));
|
* Transform::translation(Vector::from([0.0, 0.0, displacement]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user