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
Large gaps when overlapping items without vertical compacting #1982
Comments
I have faced this issue before. And I have implement a function with deleting blank line with two objects after onDragStop and onResizeStop callback. By separating layout to object with { [lineNumber (eg 0, 1, 2)]: [item.i] } and calculate the gap line with two lines.
This code works in my project |
same question, looking forward to a reply |
any luck on this? I'm facing the same issue, also on using compact null the static elements are not behaving as expected and are being pushed by other elements when dragging them around. The behavior: Screen.Recording.2024-04-01.at.3.07.55.PM.movHere the code sample: |
Describe the bug
Hello,
I want to use the grid layout with
compactType={null}
andallowOverlap={false}
in order to freely position items.If I now drag one item on top of another item, the second item gets pushed down vertically way too far and there is a large gap between the two items.
You can easily see this issue in Example 11 if you move any item just a little bit downwards so that it barely overlaps with the item underneath it.
I would expect that the second item ends up directly underneath the first item.
If the grid layout actually works as intended and this is not a bug, is there a way for me to achieve my desired behaviour?
Thanks a lot.
Kind regards,
Thomas
Your Example Website or App
https://react-grid-layout.github.io/react-grid-layout/examples/11-no-vertical-compact.html
Steps to Reproduce the Bug or Issue
Expected behavior
I would expect that the items end up underneath each other without a gap.
react-grid-layout library version
1.4.2
Operating System Version
macOS
Browser
Chrome
Additional context
No response
Screenshots or Videos
No response
The text was updated successfully, but these errors were encountered: