Skip to content

Commit

Permalink
Comment update
Browse files Browse the repository at this point in the history
  • Loading branch information
lokesh committed Oct 30, 2016
1 parent 1040c66 commit 8b0ee6b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/lightbox.js
Expand Up @@ -304,7 +304,8 @@
maxImageHeight = self.options.maxHeight;
}

// Is there a fitting issue?
// Is the current image's width or height is greater than the maxImageWidth or maxImageHeight
// option than we need to size down while maintaining the aspect ratio.
if ((preloader.width > maxImageWidth) || (preloader.height > maxImageHeight)) {
if ((preloader.width / maxImageWidth) > (preloader.height / maxImageHeight)) {
imageWidth = maxImageWidth;
Expand Down

0 comments on commit 8b0ee6b

Please sign in to comment.