katoid / angular-grid-layout

Responsive grid with draggable and resizable items for Angular applications.
https://katoid.github.io/angular-grid-layout
MIT License
436 stars 60 forks source link

Scroll issue with compact type free mode #75

Open pau-garrido opened 1 year ago

pau-garrido commented 1 year ago

Hello!

I'm having an issue which you can replicate in the playground (https://katoid.github.io/angular-grid-layout/playground). With the next configuration:

When you drag an object to the bottom of the page it just becomes crazy and the objects disappear. Probably because dragging the object to the bottom makes the grid height to increase (I think it shouldn't as we fixed it with the height input).

I think there is no way to really fix the height right now, so not making it bigger when you drag an object to the bottom and I would like to have this. I guess this bug is related to that.

Thanks!

llorenspujol commented 1 year ago

Thanks for reporting!

I am aware of this problem, in fact, it has been opened in the past https://github.com/katoid/angular-grid-layout/issues/72.

I understand that what you want is that is if the grid item is out of bounds, just not shrink the grid items as we do now. Shrink them with a maximum of the last position of the grid.

That being said, even it may seem an strange behavior, for me is the intended right now. If you have a fixed height, and you drag an item below far away of the others, the result would be that distance into the current grid height. This is what is happening now.

We can change it and see how it works, because I agree it feels buggy.

pau-garrido commented 1 year ago

Hey!

Yes, for us if we fix a height for the grid don't want this to increase even if the user tries to add items below. In my opinion it should not let the user to drag an item below if there is no available space in there.

Thanks!!!

pau-garrido commented 1 year ago

Hello,

Are you able to take a look at the issue? We don't know how to fix this problem, we are fixing the height of the grid but the user is still able to drag items out of the bounds of the grid. We would really appreciate any help on this.

Regards

llorenspujol commented 1 year ago

Hey @pau-garrido !

I did not have time to focus on angular-grid-layout, I am waiting to have a nice time window to spend on adding more feature and fixing issues like this one.

In the meantime, if you are really interested to solve this issue, you can always open a MR solving it. The solution should not be much complicated. If you have doubts you can join this discord to discuss it further.