aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index f669ec6..7e04456 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -73,7 +73,7 @@ fn main() {
// Move the canvas together with the mouse
if rl.is_mouse_button_down(MouseButton::MOUSE_MIDDLE_BUTTON) {
- transform.move_by_px((rl.get_mouse_position() - last_mouse_pos).into());
+ transform.move_by_px(&(rl.get_mouse_position() - last_mouse_pos).into());
}
let mouse_wheel_move = rl.get_mouse_wheel_move();
@@ -81,8 +81,8 @@ fn main() {
// Zoom in for positive and zoom out for negative mouse wheel rotations.
let scale_factor = if mouse_wheel_move > 0 { 1.2 } else { 1. / 1.2 };
transform.try_zoom(
- rl.get_mouse_position().into(),
- mouse_wheel_move.abs() as f32 * scale_factor,
+ &rl.get_mouse_position().into(),
+ mouse_wheel_move.abs() as f64 * scale_factor,
);
}