画布增加的新功能
This commit is contained in:
@@ -2,6 +2,7 @@ import { findObjectById } from "../utils/helper";
|
||||
import { findLayerRecursively } from "../utils/layerHelper";
|
||||
import { restoreFabricObject } from "../utils/objectHelper";
|
||||
import { Command } from "./Command";
|
||||
import EventManager from "../utils/event.js";
|
||||
|
||||
/**
|
||||
* 对象变换命令
|
||||
@@ -75,7 +76,7 @@ export class TransformCommand extends Command {
|
||||
|
||||
// 触发画布更新
|
||||
this.canvas.renderAll();
|
||||
|
||||
EventManager.emit("object:modified:execute", targetObject);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -113,7 +114,7 @@ export class TransformCommand extends Command {
|
||||
}, 300);
|
||||
// 触发画布更新
|
||||
this.canvas.renderAll();
|
||||
|
||||
EventManager.emit("object:modified:undo", targetObject);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -167,7 +168,7 @@ export class TransformCommand extends Command {
|
||||
);
|
||||
|
||||
if (clippingMaskFabricObject) {
|
||||
clippingMaskFabricObject.clipPath = null;
|
||||
// clippingMaskFabricObject.clipPath = null;
|
||||
clippingMaskFabricObject.set({
|
||||
absolutePositioned: true,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user