液化合并图层id丢失问题

This commit is contained in:
李志鹏
2025-11-05 16:37:22 +08:00
parent 0205f7c6cc
commit ccedd00ea7

View File

@@ -343,7 +343,7 @@ export class RasterizeLayerCommand extends Command {
visible: this.layer.visible, visible: this.layer.visible,
locked: this.layer.locked, locked: this.layer.locked,
opacity: this.layer.opacity, opacity: this.layer.opacity,
fabricObjects: [rasterizedImage], fabricObjects: [],
}); });
// 更新图像对象的图层关联 // 更新图像对象的图层关联
@@ -353,7 +353,7 @@ export class RasterizeLayerCommand extends Command {
layerId: this.rasterizedLayerId, layerId: this.rasterizedLayerId,
layerName: this.rasterizedLayer.name, layerName: this.rasterizedLayer.name,
}); });
this.rasterizedLayer.fabricObjects = [rasterizedImage.toObject(["id", "layerId", "layerName"])]
// 在适当位置添加新的组合图层 // 在适当位置添加新的组合图层
this._replaceLayerInStructure(); this._replaceLayerInStructure();