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

DragOverlay Wrapper does not resize to its content size. #367

Closed
clarknova opened this issue Jul 20, 2021 · 1 comment
Closed

DragOverlay Wrapper does not resize to its content size. #367

clarknova opened this issue Jul 20, 2021 · 1 comment

Comments

@clarknova
Copy link

The DragOverlay Wrapper seems to have the same size as the component that was used to start the drag and not the size of its content which messes up collison.

image
For example: I want to drop it in the right dropzone but because of the overlay shape it has collision with the left dropzone.

@clarknova clarknova changed the title DragOverlay Wrapper does not resize to its conent size. DragOverlay Wrapper does not resize to its content size. Jul 20, 2021
@clauderic
Copy link
Owner

The DragOverlay wrapper is intentionally sized the same as the draggable source, and will remain that way even if its children are sized differently.

However, if you decide to resize the first child of DragOverlay, we will now use the collision rect of the child rather than the DragOverlay as of this commit: #337

This will be released in the next major version, however you can start using it right away by upgrading to the versions of @dnd-kit tagged with @next on npm

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

No branches or pull requests

2 participants