Expose scene.mutateElement and use original mutateElement

This commit is contained in:
Marcel Mraz 2025-04-16 13:10:14 +02:00
parent 11600ee6a6
commit 2e4ca2d11a
No known key found for this signature in database
GPG key ID: 4EBD6E62DC830CD2
44 changed files with 249 additions and 260 deletions

View file

@ -199,7 +199,7 @@ export const textWysiwyg = ({
container.type,
);
app.scene.mutate(container, { height: targetContainerHeight });
app.scene.mutateElement(container, { height: targetContainerHeight });
return;
} else if (
// autoshrink container height until original container height
@ -212,7 +212,7 @@ export const textWysiwyg = ({
height,
container.type,
);
app.scene.mutate(container, { height: targetContainerHeight });
app.scene.mutateElement(container, { height: targetContainerHeight });
} else {
const { y } = computeBoundTextPosition(
container,
@ -285,7 +285,7 @@ export const textWysiwyg = ({
editable.style.fontFamily = getFontFamilyString(updatedTextElement);
}
app.scene.mutate(updatedTextElement, { x: coordX, y: coordY });
app.scene.mutateElement(updatedTextElement, { x: coordX, y: coordY });
}
};
@ -557,7 +557,7 @@ export const textWysiwyg = ({
if (editable.value.trim()) {
const boundTextElementId = getBoundTextElementId(container);
if (!boundTextElementId || boundTextElementId !== element.id) {
app.scene.mutate(container, {
app.scene.mutateElement(container, {
boundElements: (container.boundElements || []).concat({
type: "text",
id: element.id,
@ -568,7 +568,7 @@ export const textWysiwyg = ({
bumpVersion(container);
}
} else {
app.scene.mutate(container, {
app.scene.mutateElement(container, {
boundElements: container.boundElements?.filter(
(ele) =>
!isTextElement(