mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-06 02:48:27 +00:00
Flatten level of indentation
This commit is contained in:
parent
525bc8588d
commit
0d27e84e83
@ -60,23 +60,22 @@ impl Viewer {
|
||||
|
||||
/// Handle an input event
|
||||
pub fn handle_input_event(&mut self, event: InputEvent) {
|
||||
if let Some(focus_point) = self.focus_point {
|
||||
match event {
|
||||
InputEvent::Translation { previous, current } => {
|
||||
self.camera.apply_translation(
|
||||
previous,
|
||||
current,
|
||||
focus_point,
|
||||
);
|
||||
}
|
||||
InputEvent::Rotation { angle_x, angle_y } => {
|
||||
self.camera.apply_rotation(angle_x, angle_y, focus_point);
|
||||
}
|
||||
InputEvent::Zoom(zoom_delta) => {
|
||||
self.camera.apply_zoom(zoom_delta, focus_point);
|
||||
}
|
||||
};
|
||||
}
|
||||
let Some(focus_point) = self.focus_point else {
|
||||
return;
|
||||
};
|
||||
|
||||
match event {
|
||||
InputEvent::Translation { previous, current } => {
|
||||
self.camera
|
||||
.apply_translation(previous, current, focus_point);
|
||||
}
|
||||
InputEvent::Rotation { angle_x, angle_y } => {
|
||||
self.camera.apply_rotation(angle_x, angle_y, focus_point);
|
||||
}
|
||||
InputEvent::Zoom(zoom_delta) => {
|
||||
self.camera.apply_zoom(zoom_delta, focus_point);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/// Handle the screen being resized
|
||||
|
Loading…
Reference in New Issue
Block a user