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; }