From c2afb68d33ef358aa970e8b6ec5fd302c458741e Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 4 Mar 2024 18:22:30 +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=E7=BC=A9=E6=94=BE=E5=88=B0?= =?UTF-8?q?=E5=BE=88=E5=B0=8F=E6=97=B6=E5=8F=B3=E4=B8=8B=E6=8B=96=E6=8B=BD?= =?UTF-8?q?=E7=82=B9=E4=BC=9A=E4=BD=BF=E4=BA=A7=E7=94=9F=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E7=A7=BB=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 | 4 +++- .../src/utils/calculateComponentPositionAndSize.ts | 3 +++ 2 files changed, 6 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 1c80945a4f..4341c737fd 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/Shape.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/Shape.vue @@ -150,6 +150,7 @@ const state = reactive({ collisionGap: 10 // 碰撞深度有效区域, }) +const minGap = 15 const contentDisplay = ref(true) const shapeLock = computed(() => { @@ -669,8 +670,9 @@ const handleMouseDownOnPoint = (point, e) => { // 调整宽度 style.width = defaultStyle.value.height * originRadio } - calculateRadioComponentPositionAndSize(point, style, symmetricPoint) } + calculateRadioComponentPositionAndSize(point, style, symmetricPoint) + dvMainStore.setShapeStyle(style) // 矩阵逻辑 如果当前是仪表板(矩阵模式)则要进行矩阵重排 dashboardActive.value && emit('onResizing', moveEvent) diff --git a/core/core-frontend/src/utils/calculateComponentPositionAndSize.ts b/core/core-frontend/src/utils/calculateComponentPositionAndSize.ts index 85b0c62d75..a555ad37ee 100644 --- a/core/core-frontend/src/utils/calculateComponentPositionAndSize.ts +++ b/core/core-frontend/src/utils/calculateComponentPositionAndSize.ts @@ -396,5 +396,8 @@ export function calculateRadioComponentPositionAndSize(name, style, symmetricPoi } else if (['rt'].includes(name)) { style.left = symmetricPoint.x style.top = symmetricPoint.y - style.height + } else if (['rb'].includes(name)) { + style.left = symmetricPoint.x + style.top = symmetricPoint.y } }