From 7fe2f46dc222c685c1bdb603bb2cc8292bc4d09a Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Sun, 18 Feb 2024 12:05:42 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BB=84=E4=BB=B6=E8=A7=92=E8=90=BD=E5=A4=84?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=82=B9=E4=BF=9D=E6=8C=81=E5=AE=BD=E9=AB=98?= =?UTF-8?q?=E6=AF=94=E6=8B=96=E5=8A=A8=E6=97=B6=E5=87=BA=E7=8E=B0=E9=97=AA?= =?UTF-8?q?=E5=8A=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/data-visualization/canvas/Shape.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/components/data-visualization/canvas/Shape.vue b/core/core-frontend/src/components/data-visualization/canvas/Shape.vue index d77d1440e6..7a7be23b11 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/Shape.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/Shape.vue @@ -232,6 +232,7 @@ const { } = toRefs(props) const domId = ref('shape-id-' + element.value.id) const pointList = ['lt', 't', 'rt', 'r', 'rb', 'b', 'lb', 'l'] +const pointCorner = ['lt', 'rt', 'rb', 'lb'] const pointList2 = ['r', 'l'] const initialAngle = { // 每个点对应的初始角度 @@ -639,7 +640,9 @@ const handleMouseDownOnPoint = (point, e) => { const adaptorWidthOffset = heightOffset * originRadio // 保持宽高比例是相对高度偏移量 const adaptorHeightOffset = widthOffset / originRadio - if (Math.abs(widthOffset) > Math.abs(adaptorWidthOffset)) { + if (pointCorner.includes(point)) { + style.height = defaultStyle.value.height + adaptorHeightOffset + } else if (Math.abs(widthOffset) > Math.abs(adaptorWidthOffset)) { // 调整高度 style.height = defaultStyle.value.height + adaptorHeightOffset } else {