[PhotoFloat] [PATCH] Load image before album

Joachim Tingvold joachim at tingvold.com
Thu Oct 17 13:46:37 CEST 2013


Hi,

When opening links to a specific image, the album still loads first, so 
you have to wait until the entire album is loaded before the image is 
loaded. On small albums on fast connections, this doesn't cause 
noticeable delay. However, having albums with a few hundred images or 
more, or being on a slow connection, this is quite annoying.

The fix was simple; load the image before the album (-:

############
diff --git web/js/011-display.js web/js/011-display.js
index f0ddd77..070b008 100644
--- web/js/011-display.js
+++ web/js/011-display.js
@@ -257,9 +257,9 @@ $(document).ready(function() {
                 currentPhoto = photo;
                 currentPhotoIndex = photoIndex;
                 setTitle();
-               showAlbum(previousAlbum !== currentAlbum);
                 if (photo !== null)
                         showPhoto();
+               showAlbum(previousAlbum !== currentAlbum);
         }

         /* Event listeners */
############


-- 
Joachim


More information about the PhotoFloat mailing list