Skip to content

Preserve drag clone styles exactly - #25

Merged
smoores-dev merged 1 commit into
mainfrom
preserve-styles
May 19, 2026
Merged

Preserve drag clone styles exactly#25
smoores-dev merged 1 commit into
mainfrom
preserve-styles

Conversation

@smoores-dev

Copy link
Copy Markdown
Member

Two changes of note:

  1. Account for marginTop when calculating translations, because domRect includes margins
  2. Do a deep clone of computed styles when creating the drag clone, so that the cloned node and all of the cloned descendants appear visually identical even though they're in a different part of the CSSOM tree

@smoores-dev
smoores-dev merged commit be47482 into main May 19, 2026
2 checks passed
@smoores-dev
smoores-dev deleted the preserve-styles branch May 19, 2026 19:44
pdiffley pushed a commit that referenced this pull request Jun 5, 2026
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.

1 participant