mirror of
https://github.com/hannobraun/Fornjot
synced 2025-01-11 10:47:09 +00:00
Prepare for follow-on change
This commit is contained in:
parent
96204d4174
commit
4a46455826
@ -91,8 +91,10 @@ impl Viewer {
|
|||||||
y: -(y / height * 2. - 1.) / aspect_ratio,
|
y: -(y / height * 2. - 1.) / aspect_ratio,
|
||||||
};
|
};
|
||||||
|
|
||||||
let event = match (self.cursor, self.most_recent_mouse_button) {
|
let event = if let (Some(cursor_old), Some(button)) =
|
||||||
(Some(cursor_old), Some(button)) => match button {
|
(self.cursor, self.most_recent_mouse_button)
|
||||||
|
{
|
||||||
|
match button {
|
||||||
MouseButton::Left => {
|
MouseButton::Left => {
|
||||||
let diff_x = cursor_new.x - cursor_old.x;
|
let diff_x = cursor_new.x - cursor_old.x;
|
||||||
let diff_y = cursor_new.y - cursor_old.y;
|
let diff_y = cursor_new.y - cursor_old.y;
|
||||||
@ -121,8 +123,9 @@ impl Viewer {
|
|||||||
}
|
}
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
_ => None,
|
} else {
|
||||||
|
None
|
||||||
};
|
};
|
||||||
if let Some(event) = event {
|
if let Some(event) = event {
|
||||||
self.handle_input_event(event);
|
self.handle_input_event(event);
|
||||||
|
Loading…
Reference in New Issue
Block a user