DrewDahlman / Mason

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

Uncaught TypeError: Cannot read property '1' of undefined #10

Closed Mohsen-Khakbiz closed 11 years ago

Mohsen-Khakbiz commented 11 years ago

Hey dude. I'm using this cool plugin but always get this error. My JS:

$('.hub').mason({
    itemSelector: '.tile',
    ratio: 1,
    sizes: [
        [1,1]
    ],
    promoted: [
        [0.5,0.5,'tile140x140'],
        [0.5,1,'tile140x290'],
        [1,0.5,'tile290x140'],
        [1,1,'tile290x290'],
        [2,2,'tile590x590'],
        [2,2.5,'tile590x740']
    ],
    columns: [
        [0,480,1],
        [480,780,2],
        [780,1080,3],
        [1080,1320,4],
        [1320,1680,5]
    ],
    layout: 'fluid',
    gutter: 5
});
DrewDahlman commented 11 years ago

do you have a fiddle you can post?

Mohsen-Khakbiz commented 11 years ago

Yes. http://jsfiddle.net/Mohsen_Khakbiz/FBQdx/6/ Also I have a question about horizontal scroll. Should I open a new issue or I can ask here?

XenGi commented 11 years ago

Why do I get mails from this issue?

thefron commented 11 years ago

I also have the same issue.

DrewDahlman commented 11 years ago

Your fiddle seems to be working... I see that error, I am thinking it's coming from the matrix building. I am working on a new release which handles errors in a better way.

Ask the question about scroll in a different issue please.

cheers!

Mohsen-Khakbiz commented 11 years ago

Ok I'll be waiting for new release. Thanks

littleiffel commented 11 years ago

Hi There,

thanks for your great plugin. This problem however is still open. ANd it appears depending on some configuration. However I tried to figure out why this happens, but didn't find anything. I have made a fiddle with latest code from amsonjs and Error still appears in Console.

This behaviour leads to broken grid layout

http://jsfiddle.net/3phM3/

aneeven commented 10 years ago

same here

geancanova commented 10 years ago

I got this same error here.

amandagarceau commented 10 years ago

I am experiencing the same issue. Since this issue was closed, I started a new one here: https://github.com/DrewDahlman/Mason/issues/31