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: elements in non-existing frame getting removed #6708

Merged
merged 5 commits into from
Jun 22, 2023
Merged

Conversation

ryan-di
Copy link
Member

@ryan-di ryan-di commented Jun 22, 2023

fix issue reported https://discord.com/channels/723672430744174682/723672430744174685/1121405542435409982

description:

root cause

  • removeElementsFromFrame depends on shift in zindex.ts
  • which assumes that if an element has frameId, the frame must be present
  • when the frame is non-existent, then all elements with the frameId will not be removed whenever shift is called

TODOs:

  • investigate how an element can have frameId when its frame is non-existent
  • refactor zindex.ts so that when a frame is non-existent, its elements are kept

@vercel
Copy link

vercel bot commented Jun 22, 2023

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

Name Status Preview Updated (UTC)
excalidraw ✅ Ready (Inspect) Visit Preview Jun 22, 2023 10:07pm
excalidraw-package-example ✅ Ready (Inspect) Visit Preview Jun 22, 2023 10:07pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
docs ⬜️ Ignored (Inspect) Jun 22, 2023 10:07pm

@dwelle
Copy link
Member

dwelle commented Jun 22, 2023

merging now so it gets into production sooner. Thansk!

@dwelle dwelle enabled auto-merge (squash) June 22, 2023 22:07
@dwelle dwelle merged commit b7350f9 into master Jun 22, 2023
@dwelle dwelle deleted the frame-fix branch June 22, 2023 22:10
alswl pushed a commit to alswl/excalidraw that referenced this pull request Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frames
Projects
None yet
Development

Successfully merging this pull request may close these issues.

elements with non-present frames will be removed when other elements are dragged or shifted
2 participants