Skip to content

Commit

Permalink
Merge pull request #89 from Vigrond/patch-1
Browse files Browse the repository at this point in the history
Fixed endless recursion loop bug that caused browser to freeze
  • Loading branch information
scaron committed Aug 28, 2012
2 parents 091ec65 + 987d7db commit b0db83a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/jquery.prettyPhoto.js
Original file line number Diff line number Diff line change
Expand Up @@ -595,11 +595,13 @@
pp_containerHeight = imageHeight, pp_containerWidth = imageWidth;
};

_getDimensions(imageWidth,imageHeight);


if((pp_containerWidth > windowWidth) || (pp_containerHeight > windowHeight)){
_fitToViewport(pp_containerWidth,pp_containerHeight)
};

_getDimensions(imageWidth,imageHeight);
};

return {
Expand Down Expand Up @@ -912,4 +914,4 @@

})(jQuery);

var pp_alreadyInitialized = false; // Used for the deep linking to make sure not to call the same function several times.
var pp_alreadyInitialized = false; // Used for the deep linking to make sure not to call the same function several times.

0 comments on commit b0db83a

Please sign in to comment.