Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On-Demand loading and some of its side-effects #311

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

nknapp
Copy link

@nknapp nknapp commented Nov 22, 2013

Hello,

we have implemented an on-demand loading scheme for thumbnails, which loads thumbnails visible in the thumbnails-list and one page ahead and back (in case the user intiially clicks on the to-the-left-button). Details are written in the README.

There was one issue with the lazy thumbnails occupying space before being ready (5ed3ca8) that had to be resolved for this to work properly.

I have only tested the 'ondemand'-feature with the classic theme, it should probably be marked as experimental in the documentation. However, for large image collections, it should reduce downloads from the server.

Nils Knappmeier added 9 commits November 21, 2013 17:46
…ot not occupy space in the thumbnails-list.

Otherwise with "thumbnails: lazy" and thumbs loaded at the beginning and the end of the container, the length of the
 "thumbnails"-container will be too short and the last thumbnails get pushed to the next line.
 The option `thumbnails: 'ondemand'` can be set in order to load thumbnails  when needed:
  * Thumbnails that are in the visible range of the thumbnails-view are loaded
  * Thumbnails, that are adjacent to the visible range (one carousel-width before or after) are loaded.
  * As the carousel moves, more thumbnails are loaded.
…rection, even though too few images are displayed.
…e in the desired direction, even if to few images fit into it."
…y thumbnails

This is a fix for commit "5ed3ca89748aa6302cd294f207696e2abb521266".
This commit made sure that lazy loaded images are displayed "position:absolute" until they are loaded, in order to make sure they do not occupy space in the thumbscontainer. The side-effect  was (in IE 10) that images where displayed for a short time in the left corner of the container after loading, until the position was set to "relative" in "_carousel.update()".
This commit also uses the width of not-yet-loaded image containers for computing the total with of the thumbs-container and makes sure that these images get maximal height so that following images really have the expected position.
…" was configured.

Bugfix: In some rare cases, updateCarousel() is called before any thumbs are loaded.
In such a case, the load method lwas loading the previous images and images ahead, but the the current (i.e. the first) image.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant