fix: reset angle when binding text to arrow

This commit is contained in:
dwelle 2025-04-13 19:20:25 +02:00
parent 6b13e889f1
commit d6efa0f73c

View file

@ -439,7 +439,7 @@ const repairContainerElement = (
// if defined, lest boundElements is stale // if defined, lest boundElements is stale
!boundElement.containerId !boundElement.containerId
) { ) {
(boundElement as Mutable<ExcalidrawTextElement>).containerId = (boundElement as Mutable<typeof boundElement>).containerId =
container.id; container.id;
} }
} }
@ -464,6 +464,10 @@ const repairBoundElement = (
? elementsMap.get(boundElement.containerId) ? elementsMap.get(boundElement.containerId)
: null; : null;
if (boundElement.angle) {
(boundElement as Mutable<typeof boundElement>).angle = 0 as Radians;
}
if (!container) { if (!container) {
boundElement.containerId = null; boundElement.containerId = null;
return; return;