From 0a507fb158972061d2368edb0cd9bd7dcc42e43c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BF=97=E9=B9=8F?= <2916022834@qq.com> Date: Wed, 28 Jan 2026 10:08:36 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E4=BB=B6=E9=80=89=E5=8F=96icon?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CanvasEditor/components/SelectMenuPanel/index.vue | 2 +- src/component/Canvas/CanvasEditor/managers/PartManager.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/component/Canvas/CanvasEditor/components/SelectMenuPanel/index.vue b/src/component/Canvas/CanvasEditor/components/SelectMenuPanel/index.vue index a52d393b..6f8a54a4 100644 --- a/src/component/Canvas/CanvasEditor/components/SelectMenuPanel/index.vue +++ b/src/component/Canvas/CanvasEditor/components/SelectMenuPanel/index.vue @@ -764,7 +764,7 @@ } .tool-content { - overflow-y: auto; + // overflow-y: auto; max-height: 20rem; margin-top: 1rem; padding: 0 1.5rem; diff --git a/src/component/Canvas/CanvasEditor/managers/PartManager.js b/src/component/Canvas/CanvasEditor/managers/PartManager.js index 66569b5b..3f68adcc 100644 --- a/src/component/Canvas/CanvasEditor/managers/PartManager.js +++ b/src/component/Canvas/CanvasEditor/managers/PartManager.js @@ -307,7 +307,12 @@ export class PartManager { for (let i = 0; i < list.length; i++) { const item = list[i]; const icon = await this.loadImageToObject(item.label === 1 ? addIcon : removeIcon); + let size = 20; + let scaleX = size / (icon.width * this.partGroup.scaleX); + let scaleY = size / (icon.height * this.partGroup.scaleY); icon.set({ + scaleX: scaleX, + scaleY: scaleY, left: item.x - this.partGroup.width / 2, top: item.y - this.partGroup.height / 2, originX: fixedObject.originX, @@ -315,6 +320,7 @@ export class PartManager { }) this.partGroup.add(icon); } + console.log(this.partGroup); this.canvas.renderAll(); return true; }