Fix crash and clean up frontend -> backend input handling code (#1770)

This commit is contained in:
Keavon Chambers 2024-06-03 01:09:22 -07:00 committed by GitHub
parent 72ccba09af
commit 449729f1e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 47 additions and 53 deletions

View file

@ -355,7 +355,7 @@ impl EditorHandle {
/// Mouse scrolling within the screenspace bounds of the viewport
#[wasm_bindgen(js_name = onWheelScroll)]
pub fn on_wheel_scroll(&self, x: f64, y: f64, mouse_keys: u8, wheel_delta_x: i32, wheel_delta_y: i32, wheel_delta_z: i32, modifiers: u8) {
pub fn on_wheel_scroll(&self, x: f64, y: f64, mouse_keys: u8, wheel_delta_x: f64, wheel_delta_y: f64, wheel_delta_z: f64, modifiers: u8) {
let mut editor_mouse_state = EditorMouseState::from_keys_and_editor_position(mouse_keys, (x, y).into());
editor_mouse_state.scroll_delta = ScrollDelta::new(wheel_delta_x, wheel_delta_y, wheel_delta_z);