fix bug in scrolling for full image

This commit is contained in:
ccd0 2014-07-27 00:09:02 -07:00
parent 8e2f9167fb
commit 10859fed95

View File

@ -182,7 +182,8 @@ ImageExpand =
# Scroll to display full image.
imageBottom = Header.getBottomOf file.fullImage
if imageBottom < 0
{height} = file.fullImage.getBoundingClientRect()
if imageBottom + height >= 0 and imageBottom < 0
window.scrollBy 0, Math.min(-imageBottom, Header.getTopOf file.fullImage)
play: (post) ->