From 3e8fec74d5491013fa25768861b594a5cdb0f2c7 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 20 Apr 2022 13:28:36 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=9F=A9=E9=98=B5=E5=AF=86?= =?UTF-8?q?=E5=BA=A6=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/utils/utils.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/canvas/utils/utils.js b/frontend/src/components/canvas/utils/utils.js index 223869fa6b..0789e81d58 100644 --- a/frontend/src/components/canvas/utils/utils.js +++ b/frontend/src/components/canvas/utils/utils.js @@ -96,10 +96,10 @@ export function panelInit(componentData, componentStyle) { item.sizey = (item.sizey || 5) // 初始化密度为最高密度 if (componentStyle.aidedDesign.matrixBase !== 4) { - item.x = (item.x - 1) * componentStyle.aidedDesign.matrixBase + 1 - item.y = (item.y - 1) * componentStyle.aidedDesign.matrixBase + 1 - item.sizex = item.sizex * componentStyle.aidedDesign.matrixBase - item.sizey = item.sizey * componentStyle.aidedDesign.matrixBase + item.x = (item.x - 1) * 4 + 1 + item.y = (item.y - 1) * 4 + 1 + item.sizex = item.sizex * 4 + item.sizey = item.sizey * 4 } item.mobileSelected = (item.mobileSelected || false) item.mobileStyle = (item.mobileStyle || deepCopy(BASE_MOBILE_STYLE))