Repository navigation
fix: preserve authored transforms during dragging and animation - #2478
Open
sameerdeolalikar wants to merge 1 commit into
Open
sameerdeolalikar wants to merge 1 commit into
sameerdeolalikar wants to merge 1 commit into
Conversation
Author
|
I checked the failed CircleCI build #566. It stops before executing the browser tests: The original local validation ran 21 TestCafe tests successfully on the newer local runtime, but that does not make the hosted check green. I have kept the drag fix separate from a CI/runtime upgrade. Could the maintainer rerun this on a supported Node/browser image, or indicate whether you would prefer the CI image update included here? |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2423.
Dragging a card with an authored transform clears that transform on drop. With animation enabled, reordering also clears the transforms and transitions of displaced cards. For example, cards styled with
rotate(5deg) scale(.9)lose their rotation and scale after one drag.Preserve the original inline styles around animation, compose Sortable's translation with the existing transform, and subtract only the animation offset when measuring an interrupted animation. Keep the source transform during native dragging. For fallback previews, preserve the source transform/origin and dimensions in the preview container's coordinate space; use the parent scale for pointer deltas.
Validation:
npm run buildpasses. Generated bundles are deliberately excluded per the contribution guide.Other browser engines, iOS-specific absolute preview positioning, and 3D perspective transforms were not tested. The older
translateZ(0)drag-image workaround is removed to preserve authored transforms; native dragging passed in Chromium, but the historical browser-specific pixel-capture issue was not reproduced separately.Implementation and regression tests were prepared with AI assistance. The checks above were executed locally.