Fix simultaneous update issue with arrows

This commit is contained in:
Mark Tolmacs 2025-05-02 15:31:35 +02:00
parent 272b418445
commit 868517ab75
No known key found for this signature in database

View file

@ -178,8 +178,11 @@ export const moveElement = (
}
if (isFrameLikeElement(originalElement)) {
getFrameChildren(originalElementsMap, originalElement.id).forEach(
(child) => {
const originalChildren = getFrameChildren(
originalElementsMap,
originalElement.id,
);
originalChildren.forEach((child) => {
const latestChildElement = elementsMap.get(child.id);
if (!latestChildElement) {
@ -213,7 +216,9 @@ export const moveElement = (
},
{ informMutation: shouldInformMutation, isDragging: false },
);
updateBindings(latestChildElement, scene);
updateBindings(latestChildElement, scene, {
simultaneouslyUpdated: originalChildren,
});
const boundTextElement = getBoundTextElement(
latestChildElement,
@ -231,8 +236,7 @@ export const moveElement = (
{ informMutation: shouldInformMutation, isDragging: false },
);
}
},
);
});
}
};