Skip to content

Commit

Permalink
Merge pull request #654 from lokesh/fix-pos-top-image-sizing
Browse files Browse the repository at this point in the history
Fix: incorrect image size when positionFromTop set
  • Loading branch information
lokesh committed Apr 21, 2019
2 parents 4742dd4 + 5a3c03c commit d66ac3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/lightbox.js
Expand Up @@ -299,7 +299,7 @@
// Calculate the max image dimensions for the current viewport.
// Take into account the border around the image and an additional 10px gutter on each side.
maxImageWidth = windowWidth - self.containerPadding.left - self.containerPadding.right - self.imageBorderWidth.left - self.imageBorderWidth.right - 20;
maxImageHeight = windowHeight - self.containerPadding.top - self.containerPadding.bottom - self.imageBorderWidth.top - self.imageBorderWidth.bottom - 120;
maxImageHeight = windowHeight - self.containerPadding.top - self.containerPadding.bottom - self.imageBorderWidth.top - self.imageBorderWidth.bottom - self.options.positionFromTop - 70;

/*
SVGs that don't have width and height attributes specified are reporting width and height
Expand Down

0 comments on commit d66ac3a

Please sign in to comment.