Commit addition of IO shapes immediately (#2750)
This commit is contained in:
parent
c828a2eb6f
commit
8e1105144a
@ -4,7 +4,6 @@
|
|||||||
import { fabric } from "fabric";
|
import { fabric } from "fabric";
|
||||||
import type { PanZoom } from "panzoom";
|
import type { PanZoom } from "panzoom";
|
||||||
|
|
||||||
import { emitChangeSignal } from "../MaskEditor.svelte";
|
|
||||||
import { BORDER_COLOR, disableRotation, SHAPE_MASK_COLOR } from "./lib";
|
import { BORDER_COLOR, disableRotation, SHAPE_MASK_COLOR } from "./lib";
|
||||||
import { undoStack } from "./tool-undo-redo";
|
import { undoStack } from "./tool-undo-redo";
|
||||||
|
|
||||||
@ -192,7 +191,6 @@ const generatePolygon = (canvas: fabric.Canvas, pointsList): void => {
|
|||||||
canvas.setActiveObject(polygon);
|
canvas.setActiveObject(polygon);
|
||||||
// view undo redo tools
|
// view undo redo tools
|
||||||
undoStack.onObjectAdded(polygon.id);
|
undoStack.onObjectAdded(polygon.id);
|
||||||
emitChangeSignal();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
polygon.on("modified", () => {
|
polygon.on("modified", () => {
|
||||||
|
@ -83,6 +83,7 @@ class UndoStack {
|
|||||||
this.push();
|
this.push();
|
||||||
}
|
}
|
||||||
this.shapeIds.add(id);
|
this.shapeIds.add(id);
|
||||||
|
emitChangeSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
onObjectModified(): void {
|
onObjectModified(): void {
|
||||||
|
Loading…
Reference in New Issue
Block a user