-
-
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 drag between 2 grids with max row set #1687
Comments
can you please provide a video because I'm not seeing your issue. you can also try using https://gridstackjs.com/demo/two.html or a modified version if you need 2 grids. |
Actually i found out how to reproduce it https://jsfiddle.net/rhq02fkL/29/ |
should not see two drop shadow when #393 was fixed.... Also see issues with your demo outside of this:
regardless I can see 2 drop shadows when doing vertical grids, so I will create demo for that so I can fix. |
oh? Well im working on an inventory system with gridstack and use addGrid to dynamicly add grids. didnt know that this is the wrong way of doing it |
Okay i've updated my example with your fixes named just to make sure its correct https://jsfiddle.net/hfjr65qw/32/ Also its not only the drop shadow This example is even more broken than my version somehow lol https://gyazo.com/3aa64bfd28f08147595a66440fff6a81 |
I know, but that is the clue bad things will happen! Update: actually the real issue with is with |
* fix gridstack#1687 * broken in 4.x - dragging between 2 grids with maxRow/row set * willItFit() could modify the passed in node (with new algorithm) instead of making a clone copy to check if it fits. * added a new vertical grid demo (which has known issues documented) * added unit test
fixed in next release. don't forget to donate if you find lib useful! |
If my projects works out and dont forget it i will donate you something 😄 I checked out the master after you pushed. It seem to work way better than before Im still having problems with the shadow tho. i have a 1x1 field to drop an item into. Sometimes the drop shadows still wont dissapear. I will test this further and make sure to make a demo for you Do you mean 4.0.3 or master when you say release? |
4.0.3 |
a change in 4.0.3 broke my example (like yours).... will have to revisit this. Lot more work than expected. Get that donation going... |
* partial fix for gridstack#1687 last change to willItFit() broke this case. Working but still some issues...
* fix gridstack#1687 * willItFit() will now save the location we can be added to, which is used upon inserting.
Subject of the issue
Widgets collide and bug over each other when hovering over another grid
Your environment
Gridstack (the verison used on the official site) sorry dont know that one) (V4 if im not mistaken) <- 4.0.1
Chrome Version 89.0.4389.90 (64-Bit)
Steps to reproduce
https://gridstackjs.com/#demo
when moving the item from top to bottom (i hope thats eough to reproduce)
Expected behavior
Widget does not collide with others and just can correctly place back like in the previous v3 versions
Actual behavior
When dragging one widget to another grid and then back (without releasing it) the widget will come nearly impossible to place back in the old grid and even collid or stack on to another object.
Its also happening when just dragging it into another grid.
You can also see the collision happening here https://gridstackjs.com/demo/advance.html
p.s im sorry if im not giving enough information.
if you need anything more please comment
The text was updated successfully, but these errors were encountered: