feat: 优化填充组图层背景命令,支持实时更新和撤销功能,改进填充对象的处理逻辑
This commit is contained in:
@@ -143,18 +143,18 @@ export class ThumbnailManager {
|
||||
const objectsWithZIndex = [];
|
||||
|
||||
layersToRasterize.forEach((layer) => {
|
||||
if (layer.fill) {
|
||||
const { object } = findObjectById(this.canvas, layer.fill.id);
|
||||
if (object) {
|
||||
// 获取对象在画布中的z-index(数组索引)
|
||||
const zIndex = allCanvasObjects.indexOf(object);
|
||||
objectsWithZIndex.push({
|
||||
object: object,
|
||||
zIndex: zIndex,
|
||||
layerObj: layer.fill,
|
||||
});
|
||||
}
|
||||
}
|
||||
// if (layer.fill) {
|
||||
// const { object } = findObjectById(this.canvas, layer.fill.id);
|
||||
// if (object) {
|
||||
// // 获取对象在画布中的z-index(数组索引)
|
||||
// const zIndex = allCanvasObjects.indexOf(object);
|
||||
// objectsWithZIndex.push({
|
||||
// object: object,
|
||||
// zIndex: zIndex,
|
||||
// layerObj: layer.fill,
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
if (layer.fabricObject) {
|
||||
// 如果图层本身有fabricObject,直接添加
|
||||
|
||||
Reference in New Issue
Block a user