We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1040c66 commit 8b0ee6bCopy full SHA for 8b0ee6b
src/js/lightbox.js
@@ -304,7 +304,8 @@
304
maxImageHeight = self.options.maxHeight;
305
}
306
307
- // Is there a fitting issue?
+ // Is the current image's width or height is greater than the maxImageWidth or maxImageHeight
308
+ // option than we need to size down while maintaining the aspect ratio.
309
if ((preloader.width > maxImageWidth) || (preloader.height > maxImageHeight)) {
310
if ((preloader.width / maxImageWidth) > (preloader.height / maxImageHeight)) {
311
imageWidth = maxImageWidth;
0 commit comments