Coder Social home page Coder Social logo

Comments (3)

gilbitron avatar gilbitron commented on July 22, 2024

If you're loading a page with images I suggest using something like https://imagesloaded.desandro.com and calling FlexMasonry.refreshAll(); once all of the images have loaded.

from flexmasonry.

impressivewebs avatar impressivewebs commented on July 22, 2024

Is that because you're concerned that the images should be loaded first? If that's the case then I should just be able to do:

window.onload = function () {
  FlexMasonry.refreshAll();
};

But that still doesn't fix the problem. I've even tried adding a timer delay before refreshing, and it still doesn't do anything different. I think you should set up a working demo that's based on the basic instructions, so users can play around with it.

from flexmasonry.

JoshuaCrewe avatar JoshuaCrewe commented on July 22, 2024

@impressivewebs what about containing the images to the column width ?

img { 
  max-width: 100%;
  height: auto;
}

I did it on that pen and got some mixed results. When resizing the window it worked fine. Sometimes on load I'd get some gaps between the images. I think this is related to the PR which is open (#4) so adding

.grid {
    align-content: flex-start;
}

would get rid of those gaps I believe.

from flexmasonry.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.