Fix Gallery 'Stretch to Fit' on sites with multifile posting.

This commit is contained in:
ccd0 2020-04-30 10:10:27 -07:00
parent 8434f13232
commit 1f2e25b3a2

View File

@ -341,7 +341,7 @@ Gallery =
{current, frame} = Gallery.nodes
{style} = current
if Conf['Stretch to Fit'] and (dim = g.posts.get(current.dataset.post)?.file.dimensions)
if Conf['Stretch to Fit'] and (dim = g.posts.get(current.dataset.post)?.files[+current.dataset.file].dimensions)
[width, height] = dim.split 'x'
containerWidth = frame.clientWidth
containerHeight = doc.clientHeight - 25