mirror of
https://github.com/ankitects/anki.git
synced 2025-11-13 16:17:13 -05:00
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:
parent
e989564be2
commit
d39284e101
2 changed files with 2 additions and 2 deletions
|
|
@ -116,7 +116,6 @@ function initCanvas(): fabric.Canvas {
|
||||||
modifiedPolygon(canvas, evt.target);
|
modifiedPolygon(canvas, evt.target);
|
||||||
undoStack.onObjectModified();
|
undoStack.onObjectModified();
|
||||||
}
|
}
|
||||||
saveNeededStore.set(true);
|
|
||||||
});
|
});
|
||||||
canvas.on("text:editing:entered", function() {
|
canvas.on("text:editing:entered", function() {
|
||||||
textEditingState.set(true);
|
textEditingState.set(true);
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
import { fabric } from "fabric";
|
import { fabric } from "fabric";
|
||||||
import { get } from "svelte/store";
|
import { get } from "svelte/store";
|
||||||
|
|
||||||
import { opacityStateStore } from "../store";
|
import { opacityStateStore, saveNeededStore } from "../store";
|
||||||
import type { Size } from "../types";
|
import type { Size } from "../types";
|
||||||
|
|
||||||
export const SHAPE_MASK_COLOR = "#ffeba2";
|
export const SHAPE_MASK_COLOR = "#ffeba2";
|
||||||
|
|
@ -244,6 +244,7 @@ const setShapePosition = (
|
||||||
}
|
}
|
||||||
|
|
||||||
object.setCoords();
|
object.setCoords();
|
||||||
|
saveNeededStore.set(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
export function enableUniformScaling(canvas: fabric.Canvas, obj: fabric.Object): void {
|
export function enableUniformScaling(canvas: fabric.Canvas, obj: fabric.Object): void {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue