How can masonry plugin sort a brick wider then a columnWidth?

The masonry plugin stacks a brick into columns. It's a reorder of bricks to minimize the columns. How can it sort the bricks that are wider then the column width?

Answers


I think it's using a k-d tree or binary tree or a treemap algorithm. It's also called 2d bin-packing algorithm: http://www.codeincomplete.com/posts/2011/5/7/bin_packing/


Need Your Help

In a C++ class, what's the difference between accessing a member variable with “this”

c++ class pointers

I made a simple class to represent a door. To return the variables, I'm accessing them with the this pointer. With respect to just accessing variables, what's the difference between accessing them ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.