flickr / justified-layout

Pass in box sizes and get back sizes and coordinates for a justified layout
https://flickr.github.io/justified-layout/
MIT License
1.6k stars 87 forks source link

How to use with RWD #35

Closed GoOz closed 7 years ago

GoOz commented 7 years ago

Hi there,

It's more a question than an issue but I noticed Flickr's Explore page have a responsive layout for the image grid and the demo page doesn't seem to explain how achieve that.

Am I supposed manually add an eventListener and dynamically calculate containerWidth, send it to justifiedLayout function and rerun it for it to work? Or is it a better method hidden somewhere that you didn't documented.

superic commented 7 years ago

We listen for changes (window resizes) and then once the changes stop, we ask justified-layout to recalculate. Nothing special or hidden.