Code Monkey home page Code Monkey logo

Comments (4)

jonathanmoore avatar jonathanmoore commented on July 17, 2024

I can certainly see how a pattern like that would make for an interesting design with larger collections of images. Although if you're going to be using the photoset grid with a high number of images you'll run into a few issues:

  1. The grid renders and layouts after all of the images has been loaded, so that the height and width values are available. Waiting until a large number of images load might not be ideal.
  2. When the grid is in a flexible mode (100% width) you will eventually notice some performance issues if you have to resize a large number of images in the grid.

If you're working with 20-30 images it shouldn't be an issue, but if it's 100s there is a lot that would need to be rethought in the plugin.

For now you can always create a repeating pattern by using a bit of Javascript and math to count the images, divide by the total images in pattern, and duplicate the layout string as needed.

You're suggestion certainly give me some ideas on how to expand the plugin over time!

from photoset-grid.

matthewbuchanan avatar matthewbuchanan commented on July 17, 2024

Jonathan, not sure if this makes a difference but I believe it's now possible to output the width and height for images using Tumblr's theme tags, Jacob added it reasonably recently.

β€”Matt

On 15/03/2013, at 7:05 PM, Jonathan Moore [email protected] wrote:

I can certainly see how a pattern like that would make for an interesting design with larger collections of images. Although if you're going to be using the photoset grid with a high number of images you'll run into a few issues:

The grid renders and layouts after all of the images has been loaded, so that the height and width values are available. Waiting until a large number of images load might not be ideal.
When the grid is in a flexible mode (100% width) you will eventually notice some performance issues if you have to resize a large number of images in the grid.
If you're working with 20-30 images it shouldn't be an issue, but if it's 100s there is a lot that would need to be rethought in the plugin.

For now you can always create a repeating pattern by using a bit of Javascript and math to count the images, divide by the total images in pattern, and duplicate the layout string as needed.

You're suggestion certainly give me some ideas on how to expand the plugin over time!

β€”
Reply to this email directly or view it on GitHub.

from photoset-grid.

jonathanmoore avatar jonathanmoore commented on July 17, 2024

@matthewbuchanan That does make a difference!

For the 1.0 of the plugin I wanted to release something that works for us as a copy and paste replacement across our 21 themes. For new projects we are working with the height and width outputs.

In the next version of the plugin I'll make the imagesLoaded functionality optional if you have heights and widths specified on the images in the markup.

from photoset-grid.

bajalovic avatar bajalovic commented on July 17, 2024

I added this code at line 86:

        var minInOneRow = Math.min.apply(Math, this.rows);
        var allImages = $(elem).attr("data-count");
        var maxPossibleRows = parseInt(allImages / minInOneRow);
        for (var i = 1; i < maxPossibleRows; i++) {
          this.rows = this.rows.concat(this.rows);
        }

I will not have more than 30 thumbs per page, and they are pre-resized so it will not take too long to load page.

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.