zonear / isotope-perfectmasonry

PerfectMasonry extension for Isotope
137 stars 49 forks source link

$container has to be resized to display properly. #2

Closed ghost closed 11 years ago

ghost commented 11 years ago

For some reason this plugin displays everything in a single column until the screen is resized and then it acts correctly. Additionally, it will occasionally display everything correctly, but some elements will overlap until the screen is resized. Any ideas on this problem?

mikkotikkanen commented 11 years ago

Hmm. Sounds weird. I haven't seen such behavior before. Does the example work correctly for you?

mikkotikkanen commented 11 years ago

Any updates on this issue?

elkirkmo commented 11 years ago

This what I ended up writing which worked. I can't remember how it fixed my original problem, but it did. Thanks for following up.

if ($(window).width() >= 768) {
        $('#iso-container').isotope({
            layoutMode: 'perfectMasonry',
            perfectMasonry: 
                {
                columnWidth: 210
                }

            });
        }

    else {
        $('#iso-container').isotope({
            layoutMode: 'straightDown'
            });
         }
mikkotikkanen commented 11 years ago

k. Well, I'll close the issue then :) Let me know if you find out why that happened to you.