fix
This commit is contained in:
@@ -18,6 +18,7 @@ export class FillGroupLayerBackgroundCommand extends Command {
|
||||
this.canvas = options.canvas;
|
||||
this.layers = options.layers;
|
||||
this.canvasManager = options.canvasManager;
|
||||
this.layerManager = options.layerManager;
|
||||
this.layerId = options.layerId;
|
||||
this.fillColor = options.fillColor;
|
||||
this.oldFill = null;
|
||||
@@ -211,6 +212,7 @@ export class FillGroupLayerBackgroundCommand extends Command {
|
||||
this.group.set({
|
||||
id: layerObjects[0]?.id || generateId("group-"),
|
||||
layerId: this.layer?.id,
|
||||
layerName: this.layer?.name,
|
||||
});
|
||||
// this.group.setCoords();
|
||||
// this.group.setObjectsCoords();
|
||||
@@ -225,7 +227,7 @@ export class FillGroupLayerBackgroundCommand extends Command {
|
||||
this.group.clipPath = clipPath;
|
||||
}
|
||||
layer.fabricObjects = [
|
||||
this.group.toObject(["id", "layerId"]) || this.group,
|
||||
this.group.toObject(["id", "layerId", "layerName"]) || this.group,
|
||||
];
|
||||
// removeCanvasObjectByObject(this.canvas, layerObjects?.[0]);
|
||||
insertObjectAtZIndex(this.canvas, this.group, insertIndex, false, true);
|
||||
|
||||
@@ -2595,7 +2595,7 @@ export class CreateImageLayerCommand extends Command {
|
||||
|
||||
// 生成图层名称
|
||||
const fileName =
|
||||
this.layerName || `${new Date().toLocaleString()}`;
|
||||
this.layerName || `${new Date().toLocaleTimeString()}`;
|
||||
|
||||
this.fabricImage.set({
|
||||
id: this.imageId,
|
||||
|
||||
@@ -15,6 +15,8 @@ import {
|
||||
import { createRasterizedImage } from "../utils/rasterizedImage";
|
||||
import { message } from "ant-design-vue";
|
||||
import { restoreFabricObject } from "../utils/objectHelper";
|
||||
import i18n from "@/lang/index.ts";
|
||||
const { t } = i18n.global;
|
||||
|
||||
/**
|
||||
* 组合图层命令
|
||||
@@ -338,7 +340,7 @@ export class RasterizeLayerCommand extends Command {
|
||||
// 创建新的组合图层
|
||||
this.rasterizedLayer = createLayer({
|
||||
id: this.rasterizedLayerId,
|
||||
name: `${this.layer.name} (组合)`,
|
||||
name: `${this.layer.name} (${t('Canvas.group')})`,
|
||||
type: LayerType.BITMAP,
|
||||
visible: this.layer.visible,
|
||||
locked: this.layer.locked,
|
||||
|
||||
Reference in New Issue
Block a user