fix bug in opening gallery to current image when image was expanded

This commit is contained in:
ccd0 2014-08-16 13:16:00 -07:00
parent 432f1c4b36
commit 0fa82353f4

View File

@ -75,9 +75,9 @@ Gallery =
Gallery.generateThumb post
# If no image to open is given, pick image we have scrolled to.
if !image and Gallery.fullIDs[post.fullID]
{thumb} = post.file
if Header.getTopOf(thumb) + thumb.getBoundingClientRect().height >= 0
image = thumb.parentNode
candidate = post.file.thumb.parentNode
if Header.getTopOf(candidate) + candidate.getBoundingClientRect().height >= 0
image = candidate
$.add d.body, dialog
nodes.thumbs.scrollTop = 0