'Fit Height' for expanded images should account for header bar. #432

This commit is contained in:
ccd0 2015-06-30 23:03:33 -07:00
parent 5ffb3a589d
commit a1e2a35746
2 changed files with 4 additions and 1 deletions

View File

@ -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%;
}

View File

@ -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)