From 3d2fc9b72d64897dd662dc36fc86365676d7f22d Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Thu, 4 Jul 2024 18:26:22 +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=E5=A4=A7=E5=B1=8F=E9=A2=84=E8=A7=88=E5=8F=B3?= =?UTF-8?q?=E4=BE=A7=E6=9C=89=E9=83=A8=E5=88=86=E7=A9=BA=E7=99=BD=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/data-visualization/canvas/DePreview.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/core-frontend/src/components/data-visualization/canvas/DePreview.vue b/core/core-frontend/src/components/data-visualization/canvas/DePreview.vue index 19bbcb4b81..9bb9ef5b7c 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/DePreview.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/DePreview.vue @@ -9,7 +9,7 @@ import { storeToRefs } from 'pinia' import elementResizeDetectorMaker from 'element-resize-detector' import UserViewEnlarge from '@/components/visualization/UserViewEnlarge.vue' import CanvasOptBar from '@/components/visualization/CanvasOptBar.vue' -import { isMainCanvas } from '@/utils/canvasUtils' +import { isDashboard, isMainCanvas } from '@/utils/canvasUtils' import { activeWatermark } from '@/components/watermark/watermark' import { personInfoApi } from '@/api/user' import router from '@/router' @@ -153,7 +153,9 @@ const resetLayout = () => { let canvasHeight = previewCanvas.value.clientHeight scaleWidth.value = Math.floor((canvasWidth * 100) / canvasStyleData.value.width) scaleHeight.value = Math.floor((canvasHeight * 100) / canvasStyleData.value.height) - scaleMin.value = Math.min(scaleWidth.value, scaleHeight.value) + scaleMin.value = isDashboard() + ? Math.min(scaleWidth.value, scaleHeight.value) + : (canvasWidth * 100) / canvasStyleData.value.width if (dashboardActive.value) { cellWidth.value = canvasWidth / pcMatrixCount.value.x cellHeight.value = canvasHeight / pcMatrixCount.value.y