Merge pull request #1188 from sanand0/master

Display .stretch images in overview mode. Fix #1187
This commit is contained in:
Hakim El Hattab 2019-01-07 14:41:45 +01:00 committed by GitHub
commit 65938f388b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1765,10 +1765,15 @@
// Change the .stretch element height to 0 in order find the height of all // Change the .stretch element height to 0 in order find the height of all
// the other elements // the other elements
element.style.height = '0px'; element.style.height = '0px';
// In Overview mode, the parent (.slide) height is set of 700px.
// Restore it temporarily to its natural height.
element.parentNode.style.height = 'auto';
newHeight = height - element.parentNode.offsetHeight; newHeight = height - element.parentNode.offsetHeight;
// Restore the old height, just in case // Restore the old height, just in case
element.style.height = oldHeight + 'px'; element.style.height = oldHeight + 'px';
// Clear the parent (.slide) height. .removeProperty works in IE9+
element.parentNode.style.removeProperty('height');
return newHeight; return newHeight;
} }