desandro/masonry — pull request #627 by matslindh (2014-11-28 11:57:37+00:00)
Title: Add support for optional lookAhead parameter.

Add support for optional lookAhead parameter.

Allows masonry to "look ahead" x number of elements to find an element that fits within the available columns better than the first one. This will help fill in layouts where elements spanning several columns leave large gaps in the layout if there are (widly) varying heights for the elements.

Trigger usage by adding `lookAhead: 5` to the options object when initializing masonry.

This feature requires a version of outlayer.js that has the `_getItemIndexToLayOut` method.