Skip to content
This repository has been archived by the owner on Jul 22, 2023. It is now read-only.

Commit

Permalink
[snapshot] Preview: Fix overlay top padding (fastlane#13828)
Browse files Browse the repository at this point in the history
Once the padding had been set for one image, it wasn’t reset for images
needing no padding.
  • Loading branch information
claesjacobsson authored and janpio committed Jan 14, 2019
1 parent 1978bf9 commit 8346a84
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions snapshot/lib/snapshot/page.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
tmpImg.src = img.src;
imageDisplay.style.height = 'auto';
imageDisplay.style.width = 'auto';
imageDisplay.style.paddingTop = 0;
if (window.innerHeight < tmpImg.height) {
imageDisplay.style.height = document.documentElement.clientHeight+'px';
} else if (window.innerWidth < tmpImg.width) {
Expand Down

0 comments on commit 8346a84

Please sign in to comment.