Fix IO masks not saving when scaled (#4021)

* trigger save after modifying object

* remove redundant save

already called by undoStack.onObjectModified or setShapePosition
This commit is contained in:
llama 2025-05-22 19:43:38 +08:00 committed by GitHub
parent e989564be2
commit d39284e101
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -116,7 +116,6 @@ function initCanvas(): fabric.Canvas {
modifiedPolygon(canvas, evt.target);
undoStack.onObjectModified();
}
saveNeededStore.set(true);
});
canvas.on("text:editing:entered", function() {
textEditingState.set(true);

View file

@ -4,7 +4,7 @@
import { fabric } from "fabric";
import { get } from "svelte/store";
import { opacityStateStore } from "../store";
import { opacityStateStore, saveNeededStore } from "../store";
import type { Size } from "../types";
export const SHAPE_MASK_COLOR = "#ffeba2";
@ -244,6 +244,7 @@ const setShapePosition = (
}
object.setCoords();
saveNeededStore.set(true);
};
export function enableUniformScaling(canvas: fabric.Canvas, obj: fabric.Object): void {