Code Monkey home page Code Monkey logo

Comments (5)

ktkaushik avatar ktkaushik commented on June 30, 2024

One of the things is that you will need to give is the Layout

If you don't give layout then it will stick to it's default of 1 column. You see Photos aligning next to each other because of their CSS properties.

Unlike some libraries, this one will not give you a perfect layout unless you specify it to.

from photoset-grid.

dynamick avatar dynamick commented on June 30, 2024

Oh, thanks, but the data-layout="23" is given, but the result isn't so good...

However I'll try some other ways to resolve this issues.
Thanks for your support,
Mick

from photoset-grid.

ktkaushik avatar ktkaushik commented on June 30, 2024

@dynamick - I'm currently using this in my project. The main reason is that the image needs to be 100% loaded for the grid to work.

With that said, it is ideal to have Width and Height attributes added to the img element before you call the photosetGrid function.

from photoset-grid.

ktkaushik avatar ktkaushik commented on June 30, 2024

@dynamick To keep the whole thing dynamic, i am using the Image Element constructor like below to set the Height and Width Attributes

var newImage = new Image();
newImage.src = img.getAttribute('src');  // img is the Image
newImage.onload = function () {
    img.setAttribute('width', this.naturalWidth);
    img.setAttribute('height', this.naturalHeight);
    index += 1
    setWithAndHeight(index, len);
}

from photoset-grid.

jonathanmoore avatar jonathanmoore commented on June 30, 2024

This should be fixed with #72

from photoset-grid.

Related Issues (20)

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.