desandro / draggabilly

:point_down: Make that shiz draggable
https://draggabilly.desandro.com
MIT License
3.86k stars 386 forks source link

How to prevent the parent container height from expanding upon rearrangement. #125

Closed kdamken closed 7 years ago

kdamken commented 8 years ago

Codepen example: http://codepen.io/kddd/pen/ONvBNa

Right now, you can drag the blocks around above and below each other and increase the size of the parent container element '.grid'. I'm trying to stop that from happening. I set the 'containment' option to both the parent and true and it's not working. Ideally packery would rearrange the blocks based on the constraints of the dimensions of the parent container.

I also tried setting the parent's height to a set height, but the blocks just overflow it.

Is this possible? Or is this more of a feature request.

desandro commented 8 years ago

This is a Packery issue. Sounds like you are asking for Packery's older v1 drag behavior. See metafizzy/packery#353