-
-
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
Can't shrink item when grid is full (when using max row size) #2449
Comments
I've added a very crude fix which gets me going for now. Updated moveNodeCheck() to do the simple case moveNode if the size is smaller - because we know it will be no worse making it smaller.
|
| The next one I add is off the screen Please provide a running example as bug requires to validate and debug the underlying issue. |
I found a better fix, I changed this
to this
It says you can move and resize as long as it doesn't make the situation worse (i.e. taller than current max or actual max). I'll see if I can share an example in a sec. |
This will do it. Use the button to add a widget and it will break the max row restriction. I'd then like to shrink the width of panel 1 so I can move the new panel into a valid position. |
again a bandaid. the out of bound widget should never have been added in the first place..., but this is resonable workaround to fix a bad situation... Can you provide a code changelist, with better comments saying not making it worse and refering to this bug. thanks. |
I've created a pull request for my change. I hope that is what you wanted. I'm not an expert when it comes to GIT my team uses TFS. |
* fix gridstack#2449 * move, while still being under maxRow or at least not making it worse (case where widget was somehow added past our max)
it's ok thanks. I pushed in the fix as that was a commit and not a review for me to approve. |
Subject of the issue
I have set row = 34 and added enough items to fill the screen. The next one I add is off the screen. I then try to shrink the previous items to make room for the new one to move onto the screen.
However, resizing seems to be disabled.
Your environment
9.0.2
Steps to reproduce
You MUST provide a working demo - keep it simple and avoid frameworks as that could have issues - you can use
https://jsfiddle.net/adumesny/jqhkry7g
Expected behavior
I would expect reducing the size of an item to still work. Seems reasonable that you can't make anything bigger.
The text was updated successfully, but these errors were encountered: