From 9b1af8936cf45de5b2ec0a7ebbf16eb06e146656 Mon Sep 17 00:00:00 2001 From: wit_cat <96361142+little-starts@users.noreply.github.com> Date: Tue, 12 Mar 2024 18:24:38 +0800 Subject: [PATCH] More mouse V3.2 (#192) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * More_Mouse V3.2 fix(code):修复了显示提示被全屏遮挡的BUG fix(code):修复了在隐藏动画播放时显示提示报错的BUG fix(block):修复并重新上线全屏系列积木 * fix More_Mouse V3.2 fix(code):全屏可能导致的BUG feat(block):检测是否全屏,当退出全屏 * More_Mouse V3.2 fix(block):下线全屏积木 * More_Mouse V3.2 fix(code):删除多余的函数 * More_Mouse V3.2 fix(code):修复设置分辨率导致gandi渲染出问题的BUG * More_Mouse V3.2 pref(code):优化鼠标滚轮老是卡住的问题,减小概率 --- wit_cat/More_Mouse.js | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) 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; });