metafizzy / packery

:bento: Gapless, draggable grid layouts
https://packery.metafizzy.co
4.13k stars 315 forks source link

Prevent re-order after resizing the browser #541

Open WilliamVercken opened 4 years ago

WilliamVercken commented 4 years ago

Hi! I'm using Packery with a responsive grid and I have a issue. I want to be able to resize the browser without re-ordering the items.

Here is an example : https://codepen.io/Ariakan/full/eYNOYRX Move "2" over "3" and resize your browser to make the grid smaller. Or move "3" over "1" and "2" and do the same.

I want to let the items stay where they are. Is there a way to do it with Packery ?

Thank you for your help!

WilliamVercken commented 4 years ago

Ok, here is a little update : I know we can use the "resize: false" option, but it don't work in my case because the height of my blocks changes : https://codepen.io/Ariakan/full/PoqYGeX

If the height doesn't change, it works : https://codepen.io/Ariakan/full/oNXvzEo But I need to keep the proportions of my blocks.