feat: Keep text label horizontal (#9364)
All checks were successful
Tests / test (push) Successful in 5m5s

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
Márk Tolmács 2025-04-13 21:21:49 +02:00 committed by GitHub
parent dff69e9191
commit 01304aac49
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 161 additions and 34 deletions

View file

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