diff --git a/wit_cat/More_Mouse.js b/wit_cat/More_Mouse.js index c875f579..cd8fe28e 100644 --- a/wit_cat/More_Mouse.js +++ b/wit_cat/More_Mouse.js @@ -1630,19 +1630,13 @@ class WitCatMouse { }, 50); }); // 给页面绑定滑轮滚动事件 - document.addEventListener( - 'wheel', - (e) => { - this.MouseWheel = e.deltaY; - if (this.timer !== null) { - clearTimeout(this.timer); - } - this.timer = setTimeout(() => { - this.MouseWheel = 0; - }, 30); - }, - { capture: true } - ); + document.addEventListener('wheel', (e) => { + clearTimeout(this.timer); + this.MouseWheel = e.deltaY; + this.timer = setTimeout(() => { + this.MouseWheel = 0; + }, 30); + }, { capture: true }); window.addEventListener('deviceorientation', (e) => { this.Gyroscope = e; });