From e0d1be0cfa9b24d4a004475db5c1da9fdbbcd598 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, 12 Nov 2025 10:26:43 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=A8=A1=E5=BC=8F=E4=B8=8B?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=80=89=E4=B8=AD=E5=9B=BE=E5=B1=82=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=BF=80=E6=B4=BB=E7=AC=AC=E4=B8=80=E4=B8=AA=E5=9B=BE?= =?UTF-8?q?=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/Canvas/CanvasEditor/commands/LayerCommands.js | 3 +++ src/component/Canvas/CanvasEditor/managers/LayerManager.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/component/Canvas/CanvasEditor/commands/LayerCommands.js b/src/component/Canvas/CanvasEditor/commands/LayerCommands.js index 67cb05e4..cec13748 100644 --- a/src/component/Canvas/CanvasEditor/commands/LayerCommands.js +++ b/src/component/Canvas/CanvasEditor/commands/LayerCommands.js @@ -608,6 +608,9 @@ export class RemoveLayerCommand extends Command { ); if (newActiveLayer) { this.activeLayerId.value = newActiveLayer.id; + if(this.canvas.toolId === OperationType.SELECT){ + this.layerManager.selectLayerObjects(newActiveLayer.id); + } } else { this.activeLayerId.value = null; } diff --git a/src/component/Canvas/CanvasEditor/managers/LayerManager.js b/src/component/Canvas/CanvasEditor/managers/LayerManager.js index c885c2ac..74095eda 100644 --- a/src/component/Canvas/CanvasEditor/managers/LayerManager.js +++ b/src/component/Canvas/CanvasEditor/managers/LayerManager.js @@ -1195,7 +1195,7 @@ export class LayerManager { } /** - * 选择图层下的所有对象 + * 选择图层下的所有画布对象 * @param {string} layerId 图层ID * @returns {fabric.ActiveSelection|null} 返回活动选择组或null */