[Web] Fix Web MouseWheel scrolling
This commit is contained in:
parent
f92f1ce9c0
commit
6e5994eca8
4 changed files with 34 additions and 11 deletions
|
|
@ -526,7 +526,7 @@ const GodotInput = {
|
|||
godot_js_input_mouse_wheel_cb: function (callback) {
|
||||
const func = GodotRuntime.get_func(callback);
|
||||
function wheel_cb(evt) {
|
||||
if (func(evt['deltaX'] || 0, evt['deltaY'] || 0)) {
|
||||
if (func(evt.deltaMode, evt.deltaX ?? 0, evt.deltaY ?? 0)) {
|
||||
evt.preventDefault();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue