From 9a60537365b76cf5b2a3f68928e86d0d2f18efcb Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 17 Oct 2015 22:02:53 -0700 Subject: [PATCH] Fix issue with FF41 not updating width when height was changed. With Fit Width on, Fit Height off, Stretch to Fit on. Needs to be investigated more but this fixes it for now. --- src/Images/Gallery.coffee | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Images/Gallery.coffee b/src/Images/Gallery.coffee index cf5f3312d..792174ea2 100644 --- a/src/Images/Gallery.coffee +++ b/src/Images/Gallery.coffee @@ -319,11 +319,14 @@ Gallery = setHeight: -> {current, frame} = Gallery.nodes - current.style.minHeight = if Conf['Stretch to Fit'] and (dim = g.posts[current.dataset.post]?.file.dimensions) + {style} = current + if Conf['Stretch to Fit'] and (dim = g.posts[current.dataset.post]?.file.dimensions) [width, height] = dim.split 'x' - Math.min(doc.clientHeight - 25, height / width * frame.clientWidth) + 'px' + minHeight = Math.min(doc.clientHeight - 25, height / width * frame.clientWidth) + style.minHeight = minHeight + 'px' + style.minWidth = (width / height * minHeight) + 'px' else - null + style.minHeight = style.minWidth = null setDelay: -> Gallery.delay = +@value