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 */