desandro/masonry — pull request #433 by sonnyking (2013-11-07 18:18:29+00:00)
Title: default columnWidth as smallest child, modified basic example to demonst...

Hello,

On a recent project I had the need to add a little more rigor to the calculation of columnWidth when not specified as a option during construction. I simply added a method called getColumnWidth that iterates over the items and assigns the columnWidth to the with of the value of the smallest item.

This was needed as the first item in my layout spanned 8 columns with all of other items spanning 4 (bootstrap grid). With Masonry assigning the column width of the first item I could not create the desired layout. I've updated the basic example to demonstrate the value of the "smallest item" approach. Would love to see this as a supported feature.

Super awesome lib and thanks!