From f590a725265fd14200211f2b6121e43b4e95e4f6 Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Mon, 30 Jan 2023 12:19:05 +0800
Subject: [PATCH] =?UTF-8?q?refactor(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?=
=?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=AA=E8=A1=A8=E6=9D=BF=E7=9F=A9=E9=98=B5?=
=?UTF-8?q?=E6=A8=A1=E5=BC=8F=E4=B8=8B=E7=9A=84=E6=8B=96=E6=8B=BD=E5=8F=AF?=
=?UTF-8?q?=E8=83=BD=E5=87=BA=E7=8E=B0=E7=9A=84=E6=9D=BE=E5=BC=80=E6=89=8B?=
=?UTF-8?q?=E6=9F=84=E5=90=8E=E5=A4=A7=E5=B0=8F=E5=86=8D=E6=AC=A1=E5=8F=98?=
=?UTF-8?q?=E5=8C=96=EF=BC=8C=E4=BD=8D=E7=BD=AE=E6=9C=AA=E7=BD=AE=E9=A1=B6?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../canvas/components/editor/DeEditor.vue | 3 +-
frontend/src/components/deDrag/index.vue | 30 +++++++++++--------
2 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/frontend/src/components/canvas/components/editor/DeEditor.vue b/frontend/src/components/canvas/components/editor/DeEditor.vue
index 64ee36fd7f..8f2eeff20e 100644
--- a/frontend/src/components/canvas/components/editor/DeEditor.vue
+++ b/frontend/src/components/canvas/components/editor/DeEditor.vue
@@ -126,7 +126,7 @@
:canvas-id="canvasId"
/>
-
+
false
}
- const [parentWidth, parentHeight] = this.getParentSize()
- this.parentWidth = parentWidth
- this.parentHeight = parentHeight
- const [width, height] = getComputedSize(this.$el)
- this.aspectFactor = (this.w !== 'auto' ? this.w : width) / (this.h !== 'auto' ? this.h : height)
- if (this.outsideAspectRatio) {
- this.aspectFactor = this.outsideAspectRatio
- }
- this.width = this.w !== 'auto' ? this.w : width
- this.height = this.h !== 'auto' ? this.h : height
- this.right = this.parentWidth - this.width - this.left
- this.bottom = this.parentHeight - this.height - this.top
+ this.sizeAdaptor()
// 绑定data-*属性
this.settingAttribute()