Skip to content

feat: improve no compact mode without collision prevent #126

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jakubbialas
Copy link

I have been happily using grid with compact mode 'none' and 'prevent collision' enabled for the last 3 years, until my PO decided he want to enable collisions. As you might know it isn't working grate in that combination (items spread across the grid and single mis-drag can destroy whole layout):

before.mp4

I implemented feature,that should change behaviour in compact mode 'none' without 'prevent collision', It basically restores original layout before resolving collisions, that way items are returning to their places if not colliding with dragged item:

after.mp4

I also made resizing items more deterministic, by extending moveElement function into more like moveAndResizeElement.

@llorenspujol please have a look at it, I'm open to any questions and feedback.

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