Browse Source

Remove after load

Tobias Reich 9 years ago
parent
commit
68853a5038
2 changed files with 4 additions and 3 deletions
  1. 4 3
      assets/js/photo.js
  2. 0 0
      assets/min/main.js

+ 4 - 3
assets/js/photo.js

@@ -46,7 +46,7 @@ photo = {
 			lychee.imageview.show();
 			setTimeout(function() {
 				lychee.content.show();
-				if (!mobileBrowser()) photo.preloadNext(photoID,albumID);
+				if (!mobileBrowser()) photo.preloadNext(photoID, albumID);
 			}, 300);
 
 		});
@@ -67,8 +67,9 @@ photo = {
 			nextPhoto	= album.json.content[photoID].nextPhoto;
 			url			= album.json.content[nextPhoto].url;
 
-			photo.cache		= new Image();
-			photo.cache.src	= url;
+			photo.cache			= new Image();
+			photo.cache.src		= url;
+			photo.cache.onload	= function() { photo.cache = null };
 
 		}
 

File diff suppressed because it is too large
+ 0 - 0
assets/min/main.js


Some files were not shown because too many files changed in this diff