Merge remote-tracking branch 'origin/StableVersion' into dev_vite
This commit is contained in:
@@ -70,7 +70,7 @@ export class AddLayerCommand extends Command {
|
||||
|
||||
undo() {
|
||||
// 从图层列表删除该图层
|
||||
this.layers.value = [...this.beforeLayers];
|
||||
this.layers.value = [...this.beforeLayers];
|
||||
|
||||
// 恢复原活动图层
|
||||
this.activeLayerId.value = this.oldActiveLayerId;
|
||||
@@ -564,12 +564,11 @@ export class RemoveLayerCommand extends Command {
|
||||
}
|
||||
}
|
||||
layer.fabricObjects?.forEach((fabric) => {
|
||||
const { object } = findObjectById(this.canvas, fabric.id);
|
||||
if (object && !allObjects.includes(object)) {
|
||||
allObjects.push(object);
|
||||
}
|
||||
});
|
||||
|
||||
const { object } = findObjectById(this.canvas, fabric.id);
|
||||
if (object && !allObjects.includes(object)) {
|
||||
allObjects.push(object);
|
||||
}
|
||||
});
|
||||
// 递归收集子图层的对象
|
||||
if (layer.children && Array.isArray(layer.children)) {
|
||||
layer.children.forEach((childLayer) => {
|
||||
|
||||
Reference in New Issue
Block a user