-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: restore text dimensions #5432
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
Reading through the code changes, this looks good overall. Perhaps rewriting text dimensions calculations would come after |
@@ -124,6 +125,7 @@ const restoreElementWithProperties = < | |||
|
|||
const restoreElement = ( | |||
element: Exclude<ExcalidrawElement, ExcalidrawSelectionElement>, | |||
refreshDimensions = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to keep this false to avoid breaking changes ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not a breaking change, it's a new default
nvm. But, whether the default is false
or true
doesn't matter, it'd still be a breaking change if we remove this in the future
# Conflicts: # src/element/newElement.ts # src/packages/excalidraw/CHANGELOG.md # src/tests/data/__snapshots__/restore.test.ts.snap
I've removed the |
This PR makes sure that text dimensions are recalculated on restore, except during collaboration for perf reasons (we should take another look into rewriting our current text dimensions calculation to use the measureText).