From 9054d175f69bc7e47e3735255a1c3952609607f8 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 30 Oct 2023 11:29:52 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=BC=A0=E6=A0=87=E6=BB=9A?= =?UTF-8?q?=E8=BD=AE=E6=94=BE=E5=A4=A7=E6=95=88=E6=9E=9C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/data-visualization/ComponentToolBar.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/core-frontend/src/components/data-visualization/ComponentToolBar.vue b/core/core-frontend/src/components/data-visualization/ComponentToolBar.vue index 59d517ec36..e2e8a46874 100644 --- a/core/core-frontend/src/components/data-visualization/ComponentToolBar.vue +++ b/core/core-frontend/src/components/data-visualization/ComponentToolBar.vue @@ -48,15 +48,15 @@ const handleMouseWheel = e => { let areaRight = dvMain.clientWidth + areaLeftWidth if (areaLeftWidth < e.clientX && e.clientX < areaRight) { const delta = e.wheelDelta ? e.wheelDelta : -e.detail - if (lastWheelNum === 240 && delta === 240) { + if ((lastWheelNum === 240 && delta === 240) || delta > 240) { //放大 scaleIncrease(3) - } else if (lastWheelNum === -240 && delta === -240) { + } else if ((lastWheelNum === -240 && delta === -240) || delta < -240) { // 缩小 scaleDecrease(3) } - if (delta === 240 || delta === -240) { + if (delta >= 240 || delta <= -240) { e.stopPropagation() e.preventDefault() }