From a1e2a35746932e6b1e08bf59427793a1be5180da Mon Sep 17 00:00:00 2001 From: ccd0 Date: Tue, 30 Jun 2015 23:03:33 -0700 Subject: [PATCH] 'Fit Height' for expanded images should account for header bar. #432 --- src/General/css/style.css | 3 +++ src/Images/ImageExpand.coffee | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/General/css/style.css b/src/General/css/style.css index a5506e0fb..70907373b 100755 --- a/src/General/css/style.css +++ b/src/General/css/style.css @@ -987,6 +987,9 @@ span.hide-announcement { :root.fit-height .full-image { max-height: 100vh; } +:root.fit-height.fixed .full-image { + max-height: calc(100vh - 25px); +} :root.fit-width .full-image { max-width: 100%; } diff --git a/src/Images/ImageExpand.coffee b/src/Images/ImageExpand.coffee index a2698ab01..2b78e2c93 100755 --- a/src/Images/ImageExpand.coffee +++ b/src/Images/ImageExpand.coffee @@ -221,7 +221,7 @@ ImageExpand = # Scroll to display full image. if file.scrollIntoView delete file.scrollIntoView - imageBottom = Header.getBottomOf(file.fullImage) - 25 + imageBottom = Header.getBottomOf file.fullImage if imageBottom < 0 window.scrollBy 0, Math.min(-imageBottom, Header.getTopOf file.fullImage)