Selaa lähdekoodia

display .stretch images in overview mode

S Anand 9 vuotta sitten
vanhempi
commit
ee98f13dd9
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 5 0
      js/reveal.js

+ 5 - 0
js/reveal.js

@@ -1195,10 +1195,15 @@
 			// Change the .stretch element height to 0 in order find the height of all
 			// the other elements
 			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;
 
 			// Restore the old height, just in case
 			element.style.height = oldHeight + 'px';
+			// Clear the parent (.slide) height. .removeProperty works in IE9+
+			element.parentNode.style.removeProperty('height');
 
 			return newHeight;
 		}