diff --git a/core/core-frontend/src/components/data-visualization/ComponentToolBar.vue b/core/core-frontend/src/components/data-visualization/ComponentToolBar.vue index 996d42d3bd..59d517ec36 100644 --- a/core/core-frontend/src/components/data-visualization/ComponentToolBar.vue +++ b/core/core-frontend/src/components/data-visualization/ComponentToolBar.vue @@ -42,20 +42,26 @@ const reposition = () => { let lastWheelNum = 0 const handleMouseWheel = e => { - const delta = e.wheelDelta ? e.wheelDelta : -e.detail - if (lastWheelNum === 240 && delta === 240) { - //放大 - scaleIncrease(3) - } else if (lastWheelNum === -240 && delta === -240) { - // 缩小 - scaleDecrease(3) - } + let dvMain = document.getElementById('dv-main-center') + let dvMainLeftSlide = document.getElementById('dv-main-left-sidebar') + let areaLeftWidth = dvMainLeftSlide.clientWidth + 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) { + //放大 + scaleIncrease(3) + } else if (lastWheelNum === -240 && delta === -240) { + // 缩小 + scaleDecrease(3) + } - if (delta === 240 || delta === -240) { - e.stopPropagation() - e.preventDefault() + if (delta === 240 || delta === -240) { + e.stopPropagation() + e.preventDefault() + } + lastWheelNum = delta } - lastWheelNum = delta } onMounted(() => { diff --git a/core/core-frontend/src/components/data-visualization/canvas/MarkLine.vue b/core/core-frontend/src/components/data-visualization/canvas/MarkLine.vue index 105a8f1480..2a87f43790 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/MarkLine.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/MarkLine.vue @@ -227,7 +227,7 @@ onMounted(() => { })