From 7383b74685a6c21b6ca8f8e63095dff7ca116a8d Mon Sep 17 00:00:00 2001 From: David Hellsing Date: Wed, 20 Nov 2013 22:35:31 +0100 Subject: [PATCH] cleanup 63565e1 --- README.rst | 15 --------------- src/galleria.js | 8 ++++---- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/README.rst b/README.rst index 90bb0137..f1cbdffc 100644 --- a/README.rst +++ b/README.rst @@ -22,18 +22,3 @@ Documentation is currently available in `reST You can build local HTML using Sphinx: http://sphinx.pocoo.org/ -Changes compared to original (aino) version of galleria -======================================================= - -* Fix for "No theme CSS loaded", when galleria is loaded dynamically through JS and AJAX Galleria may be inserted into - the dom dynamically (e.g. via JavaScript loaded from an AJAX-Request). In such a case, the theme's script-tag seems - not to be immediately present in the DOM when the addTheme-function looks for it. We therefore try multiple times - before raising an error. - -* Sometimes, the dummy image was not scaled and centered properly when using lazyLoadChunked(). - This was due to the dimensions of the dummy image not being computed in time (with lazyLoadChunked(...)). - We changed the retry method from "retry once after 2ms" to "Utils.wait{ ..., timeout: 100 }" to retry multiple times - for 100ms. - - - diff --git a/src/galleria.js b/src/galleria.js index e5cba486..4893a251 100644 --- a/src/galleria.js +++ b/src/galleria.js @@ -6210,15 +6210,15 @@ Galleria.Picture.prototype = { // Delay the callback to "fix" the Adblock Bug // http://code.google.com/p/adblockforchrome/issues/detail?id=3701 if ( ( !this.width || !this.height ) ) { - (function( img) { + (function( img ) { Utils.wait({ - until : function() { + until: function() { return img.width && img.height; }, - success : function() { + success: function() { complete.call( img ); }, - error : function() { + error: function() { if ( !resort ) { $(new Image()).load( onload ).attr( 'src', img.src ); resort = true;