DrewDahlman / Mason

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

Changed randomness to be passed as a variable. #26

Closed tomeralmog closed 9 years ago

tomeralmog commented 10 years ago

Added randomSizes and randomFillers options if randomSizes are false then sizes need to be in data-layout attribute as in:

2

the datalayout corresponds to the size index (can be improved be passing the exact layout in the html

$("#grid").mason({ itemSelector: ".box", ratio: 1.5, sizes: [ [1,1], [1,2], [2,1], [2,2], ], columns: [ [0,480,1], [480,780,2], [780,1080,3],

], filler: { itemSelector: '.fillerBox', filler_class: 'custom_filler' }, randomSizes:false, randomFillers:false,

layout: 'fluid', gutter: 5 },function(){ console.log("COMPLETE!") });

DrewDahlman commented 10 years ago

Awesome thanks, I will take a look and verify this is all good!

cheers, Drew

tomeralmog commented 10 years ago

Please check latest commit. Forgot to clean up.

DrewDahlman commented 10 years ago

Would you mind setting up an example page?

tomeralmog commented 10 years ago

Here you go:

http://edenandtomer.com/mason/

Tomer

On Wed, Jan 29, 2014 at 12:09 PM, Drew Dahlman notifications@github.comwrote:

Would you mind setting up an example page?

Reply to this email directly or view it on GitHubhttps://github.com/DrewDahlman/Mason/pull/26#issuecomment-33625115

.

No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4259 / Virus Database: 3681/7041 - Release Date: 01/28/14

Tomer Almog tomeralmog@gmail.com

DrewDahlman commented 10 years ago

Awesome! nice work!

tomeralmog commented 10 years ago

Right back at you brother!

On Wed, Jan 29, 2014 at 12:53 PM, Drew Dahlman notifications@github.comwrote:

Awesome! nice work!

Reply to this email directly or view it on GitHubhttps://github.com/DrewDahlman/Mason/pull/26#issuecomment-33629413

.

No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4259 / Virus Database: 3681/7041 - Release Date: 01/28/14

Tomer Almog tomeralmog@gmail.com

tomeralmog commented 10 years ago

Hi Drew, added a mobile gutter option (your script defined it as 0, in this one you can pass a mobileGutter option to let the user choose)