-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
load() allows overlapping widgets #2492
Comments
an easy fix for this example is to make sure widgets have id, but when loading a new layout it shouldn't overlap anyway. |
* fix gridstack#2492 * make sure we use existing items and not reset to start from scratch so we do collision at each step.
* more fix gridstack#2492 * load() now calls doContentResize() at the end. * also fixed update() same content bug returning pre-maturely.
* more fix gridstack#2492 * back to clearing the list when doing load() to make sure we insert like if it was new, but make sure we force a collision check
fixed in next release. don't forget to donate if you find this lib useful! |
this broke in v10.3.0 as part of this change. will need to fix it again and add it to the test suite... SHA-1: ec3c7e4
|
Widgets should not be allowed to overlap
When calling load after items have been put in place, it will allow widgets to overlap each other.
Your environment
Steps to reproduce
https://jsfiddle.net/xc7540dt/2/
This differs from the baseline fiddle only in that it calls
grid.load(items)
at the end. But if you drag the widgets labeled 0 or 1, you can see that there is a duplicate behind them.Expected behavior
The expectation is that widgets should never overlap each other.
The text was updated successfully, but these errors were encountered: