Skip to content

Commit

Permalink
cleanup 63565e1
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhellsing committed Nov 20, 2013
1 parent 63565e1 commit 7383b74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
15 changes: 0 additions & 15 deletions README.rst
Expand Up @@ -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.



8 changes: 4 additions & 4 deletions src/galleria.js
Expand Up @@ -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;
Expand Down

0 comments on commit 7383b74

Please sign in to comment.