Skip to content
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: Check for roundness undefined in restore.ts #8037

Closed
wants to merge 1 commit into from

Conversation

zsviczian
Copy link
Collaborator

null is a valid value for roundness. The current code treats null as "to-be restored".

Copy link

vercel bot commented May 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
excalidraw ✅ Ready (Inspect) Visit Preview May 20, 2024 6:24am
excalidraw-package-example ✅ Ready (Inspect) Visit Preview May 20, 2024 6:24am
excalidraw-package-example-with-nextjs ✅ Ready (Inspect) Visit Preview May 20, 2024 6:24am
1 Ignored Deployment
Name Status Preview Updated (UTC)
docs ⬜️ Ignored (Inspect) May 20, 2024 6:24am

Copy link

Coverage Report

Status Category Percentage Covered / Total
🔴 Lines 65.56% (🎯 70%) 51254 / 78176
🔴 Statements 65.56% (🎯 70%) 51254 / 78176
🔴 Functions 66.63% (🎯 68%) 1564 / 2347
🟢 Branches 80.99% (🎯 70%) 6294 / 7771
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
packages/excalidraw/data/restore.ts 90.2% 84.56% 78.57% 90.2% 84-87, 150, 200-202, 232-236, 357, 387-397, 442-443, 452-460, 467-476, 485-494, 512-517
Generated in workflow #2535

@dwelle
Copy link
Member

dwelle commented May 20, 2024

null is a valid value for roundness. The current code treats null as "to-be restored".

It doesn't. null is a a fallback:

image

What issue are you facing?

@zsviczian
Copy link
Collaborator Author

the issue is restoring old drawings in Obsidian. I think the root cause is probably that in Obsidian when I added an image from the Vault it created the Image element with the strokeSharpness property set. In the past this had no effect, but now, when I open old drawings pictures load with round corners.

I am just going to keep this change in my fork and close this PR.

@zsviczian zsviczian closed this May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants