TypeError: settings.sizes[s] is undefined #14
Comments
hmm strange... My first thought is remove the "default" out of your promoted. Also do you have a jsfiddle? |
I had the same issue and fixed it. The problem was in mason.js at line 170. You first have to call index zero, so like this: |
@StefanSchwartze wanna do a pull request with your fix? |
Just did it. |
awesome. merged and set! |
I got same error. I used merged version and it didn't solve my problem. The difference is i'm not using promoted option. |
Interesting - I am wondering if this all comes down to combo between promoted and non promoted. I am going to run some tests. @appleparan - when you see this error does it completely break your grid? what happens? would you mind posting a fiddle? |
Error still there. The problem is the hardcoded index on lines 170: sometimes s is 0. so the index is out of bounds. I have a dirty workaround for that: to answer your question: yes - the layout brakes. |
I fixed it by doing this: Restored line 170 and 171 to I try to make a pull request |
Hi there,
just created mason instance with following parameters:
$("#mason-grid").mason({
itemSelector: ".mason-box",
ratio: 1.1,
sizes: [
[1, 1]
],
promoted: [
[1, 3, 'wide'],
[3, 1, 'tower'],
[2, 3, 'big'],
[1, 1, 'default']
],
filler: {
itemSelector: '.filler',
filler_class: 'custom_filler'
}....
ok...if I give some promoted classes I get this error:
TypeError: settings.sizes[s] is undefined
error source line: var h = settings.sizes[s][1];
//creality
The text was updated successfully, but these errors were encountered: