Files
excalidraw/packages
Mark Tolmacs 75da14f5ef fix(restore): recover text from originalText when text is missing
A text element without `text` was restored empty (and deleted on
import) even when it had an `originalText`. Use the unwrapped
`originalText` instead; it's rewrapped when the text is measured.

Line height detection divides the element's height by its number of
lines, so only use the height when it belongs to the restored `text`
— it says nothing about the line height of an unwrapped
`originalText`. The height is now also coerced to a number.

The existing test restoring a `null` text now also nulls
`originalText`, as it otherwise recovers the text from it.

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2026-10-21 08:20:39 +00:00
..