Add version bumping in movePoints

This commit is contained in:
Mark Tolmacs 2025-03-20 13:23:10 +01:00
parent 917d23365e
commit f6ae6d7b0e

View file

@ -37,7 +37,7 @@ import { updateElbowArrowPoints } from "./elbowArrow";
import { getElementPointsCoords, getMinMaxXYFromCurvePathOps } from "./bounds"; import { getElementPointsCoords, getMinMaxXYFromCurvePathOps } from "./bounds";
import { headingIsHorizontal, vectorToHeading } from "./heading"; import { headingIsHorizontal, vectorToHeading } from "./heading";
import { mutateElement } from "./mutateElement"; import { bumpVersion, mutateElement } from "./mutateElement";
import { getBoundTextElement, handleBindTextResize } from "./textElement"; import { getBoundTextElement, handleBindTextResize } from "./textElement";
import { import {
isBindingElement, isBindingElement,
@ -1473,6 +1473,7 @@ export class LinearElementEditor {
Object.assign(element, { Object.assign(element, {
...updates, ...updates,
angle: 0 as Radians, angle: 0 as Radians,
...updateElbowArrowPoints( ...updateElbowArrowPoints(
element, element,
options.sceneElementsMap, options.sceneElementsMap,
@ -1483,6 +1484,7 @@ export class LinearElementEditor {
), ),
}); });
} }
bumpVersion(element);
} else { } else {
const nextCoords = getElementPointsCoords(element, nextPoints); const nextCoords = getElementPointsCoords(element, nextPoints);
const prevCoords = getElementPointsCoords(element, element.points); const prevCoords = getElementPointsCoords(element, element.points);