-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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: rewrite collab element reconciliation to fix z-index issues #4076
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/excalidraw/excalidraw/C6XmK9yCUj4W3V2K3D2i4aNkWDFH |
c893139
to
9dc4007
Compare
fa01724
to
1c69d74
Compare
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.
looks good and tests are super helpful 💯
fix #1376
This is a port from E+. The algo isn't super well written (there are several array reindexing), but it's fast enough — in worst cases (syncing ~1500+ elements) it's a couple of ms.
It works by annotating synced elements with their "parents" so that we know where in the array we should insert them.
Unclear how the algo will hold up in 3+ user rooms.