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.
This commit is contained in:
ccd0 2015-10-17 22:02:53 -07:00
parent 43d5aa39ef
commit 9a60537365

View File

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