docs/source/_static/presentations/js/reveal.js
/**
	 * Applies layout logic to the contents of all slides in
	 * the presentation.
	 */
Applies layout logic to the contents of all slides in
the presentation.
Applies layout logic to the contents of all slides in the presentation .
function layoutSlideContents( width, height, padding ) {
		toArray( dom.slides.querySelectorAll( 'section > .stretch' ) ).forEach( function( element ) {
			var remainingHeight = getRemainingHeight( element, ( height - ( padding * 2 ) ) );
			if( /(img|video)/gi.test( element.nodeName ) ) {
				var nw = element.naturalWidth || element.videoWidth,
					nh = element.naturalHeight || element.videoHeight;
				var es = Math.min( width / nw, remainingHeight / nh );
				element.style.width = ( nw * es ) + 'px';
				element.style.height = ( nh * es ) + 'px';
			}
			else {
				element.style.width = width + 'px';
				element.style.height = remainingHeight + 'px';
			}
		} );
	}
function layoutSlideContents ( width , height , padding ) { toArray ( dom . slides . querySelectorAll ( 'section > .stretch' ) ) . forEach ( function ( element ) { var remainingHeight = getRemainingHeight ( element , ( height - ( padding * 2 ) ) ) ; if ( / (img|video) / gi . test ( element . nodeName ) ) { var nw = element . naturalWidth || element . videoWidth , nh = element . naturalHeight || element . videoHeight ; var es = Math . min ( width / nw , remainingHeight / nh ) ; element . style . width = ( nw * es ) + 'px' ; element . style . height = ( nh * es ) + 'px' ; } else { element . style . width = width + 'px' ; element . style . height = remainingHeight + 'px' ; } } ) ; }
Applies layout logic to the contents of all slides in
 the presentation.
Applies layout logic to the contents of all slides in the presentation .
// Handle sizing of elements with the 'stretch' class // Determine how much vertical space we can use // Consider the aspect ratio of media elements