DrewDahlman / Mason

Mason.js for creating a perfect grid with jQuery.
http://masonjs.com/
MIT License
1.22k stars 183 forks source link

Incorrect layout? #7

Closed davshoward closed 11 years ago

davshoward commented 11 years ago

Based on a few of the random layouts from on of your own examples (https://drewdahlman.com/experiments/mason/example/fluid_gutters.html) I wanted to know if the layout is applying correctly?

Here are three images:

http://i.imgur.com/tl72HJp.jpg http://i.imgur.com/pobY7eW.jpg http://i.imgur.com/p6QFWRp.jpg

In each there are spaces that are being filled by fillers that a normal block could fit into. In the first image, box 3 could fit in the top right; in the second image boxes 6/7/8 could all move up a space; and in the third image boxes 6/7 could move up whilst box 8 could fit to the right hand side.

Should they be doing this, or is it working as expected? If the latter, is it possible to make them fill the spaces, that are there, whilst still remaining the the correct order?

DrewDahlman commented 11 years ago

This is working properly - this isn't "Masonry" or "Isotope" in the approach. What Mason does is look for those spaces where gaps exist, in Masonry / Isotope you would see those elements shift up to fill - but that results in other strange gaps. or a ragged edge.

The whole purpose of Masonjs is to create a perfect filled space. Not to shift things around, it will always maintain the order of elements, but it will also respect the floats and what the browser did initially.

davshoward commented 11 years ago

Ah okay. Great plugin, just not what I'm after then :-p