Commit addition of IO shapes immediately (#2750)

This commit is contained in:
Abdo 2023-10-20 02:38:03 +03:00 committed by GitHub
parent c828a2eb6f
commit 8e1105144a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -4,7 +4,6 @@
import { fabric } from "fabric";
import type { PanZoom } from "panzoom";
import { emitChangeSignal } from "../MaskEditor.svelte";
import { BORDER_COLOR, disableRotation, SHAPE_MASK_COLOR } from "./lib";
import { undoStack } from "./tool-undo-redo";
@ -192,7 +191,6 @@ const generatePolygon = (canvas: fabric.Canvas, pointsList): void => {
canvas.setActiveObject(polygon);
// view undo redo tools
undoStack.onObjectAdded(polygon.id);
emitChangeSignal();
}
polygon.on("modified", () => {

View File

@ -83,6 +83,7 @@ class UndoStack {
this.push();
}
this.shapeIds.add(id);
emitChangeSignal();
}
onObjectModified(): void {