Merge pull request #37414 from Schroedi/fix_html_mouse_input

Move wheel handlers from window to canvas element in HTML
This commit is contained in:
Fabio Alessandrelli 2020-05-01 12:51:35 +02:00 committed by GitHub
commit c7e662199f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -981,7 +981,7 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver,
SET_EM_CALLBACK(EMSCRIPTEN_EVENT_TARGET_WINDOW, mousemove, mousemove_callback)
SET_EM_CALLBACK(GODOT_CANVAS_SELECTOR, mousedown, mouse_button_callback)
SET_EM_CALLBACK(EMSCRIPTEN_EVENT_TARGET_WINDOW, mouseup, mouse_button_callback)
SET_EM_CALLBACK(EMSCRIPTEN_EVENT_TARGET_WINDOW, wheel, wheel_callback)
SET_EM_CALLBACK(GODOT_CANVAS_SELECTOR, wheel, wheel_callback)
SET_EM_CALLBACK(GODOT_CANVAS_SELECTOR, touchstart, touch_press_callback)
SET_EM_CALLBACK(GODOT_CANVAS_SELECTOR, touchmove, touchmove_callback)
SET_EM_CALLBACK(GODOT_CANVAS_SELECTOR, touchend, touch_press_callback)