docs/slides/20190327_rosseattlemeetup/export/libs/reveal.js/3.7.0/plugin/zoom-js/zoom.js
function magnify( rect, scale ) {

		var scrollOffset = getScrollOffset();

		// Ensure a width/height is set
		rect.width = rect.width || 1;
		rect.height = rect.height || 1;

		// Center the rect within the zoomed viewport
		rect.x -= ( window.innerWidth - ( rect.width * scale ) ) / 2;
		rect.y -= ( window.innerHeight - ( rect.height * scale ) ) / 2;

		if( supportsTransforms ) {
			// Reset
			if( scale === 1 ) {
				document.body.style.transform = '';
				document.body.style.OTransform = '';
				document.body.style.msTransform = '';
				document.body.style.MozTransform = '';
				document.body.style.WebkitTransform = '';
			}
			// Scale
			else {
				var origin = scrollOffset.x +'px '+ scrollOffset.y +'px',
					transform = 'translate('+ -rect.x +'px,'+ -rect.y +'px) scale('+ scale +')';

				document.body.style.transformOrigin = origin;
				document.body.style.OTransformOrigin = origin;
				document.body.style.msTransformOrigin = origin;
				document.body.style.MozTransformOrigin = origin;
				document.body.style.WebkitTransformOrigin = origin;

				document.body.style.transform = transform;
				document.body.style.OTransform = transform;
				document.body.style.msTransform = transform;
				document.body.style.MozTransform = transform;
				document.body.style.WebkitTransform = transform;
			}
		}
		else {
			// Reset
			if( scale === 1 ) {
				document.body.style.position = '';
				document.body.style.left = '';
				document.body.style.top = '';
				document.body.style.width = '';
				document.body.style.height = '';
				document.body.style.zoom = '';
			}
			// Scale
			else {
				document.body.style.position = 'relative';
				document.body.style.left = ( - ( scrollOffset.x + rect.x ) / scale ) + 'px';
				document.body.style.top = ( - ( scrollOffset.y + rect.y ) / scale ) + 'px';
				document.body.style.width = ( scale * 100 ) + '%';
				document.body.style.height = ( scale * 100 ) + '%';
				document.body.style.zoom = scale;
			}
		}

		level = scale;

		if( document.documentElement.classList ) {
			if( level !== 1 ) {
				document.documentElement.classList.add( 'zoomed' );
			}
			else {
				document.documentElement.classList.remove( 'zoomed' );
			}
		}
	}
function magnify( rect, scale ) {

		var scrollOffset = getScrollOffset();

		// Ensure a width/height is set
		rect.width = rect.width || 1;
		rect.height = rect.height || 1;

		// Center the rect within the zoomed viewport
		rect.x -= ( window.innerWidth - ( rect.width * scale ) ) / 2;
		rect.y -= ( window.innerHeight - ( rect.height * scale ) ) / 2;

		if( supportsTransforms ) {
			// Reset
			if( scale === 1 ) {
				document.body.style.transform = '';
				document.body.style.OTransform = '';
				document.body.style.msTransform = '';
				document.body.style.MozTransform = '';
				document.body.style.WebkitTransform = '';
			}
			// Scale
			else {
				var origin = scrollOffset.x +'px '+ scrollOffset.y +'px',
					transform = 'translate('+ -rect.x +'px,'+ -rect.y +'px) scale('+ scale +')';

				document.body.style.transformOrigin = origin;
				document.body.style.OTransformOrigin = origin;
				document.body.style.msTransformOrigin = origin;
				document.body.style.MozTransformOrigin = origin;
				document.body.style.WebkitTransformOrigin = origin;

				document.body.style.transform = transform;
				document.body.style.OTransform = transform;
				document.body.style.msTransform = transform;
				document.body.style.MozTransform = transform;
				document.body.style.WebkitTransform = transform;
			}
		}
		else {
			// Reset
			if( scale === 1 ) {
				document.body.style.position = '';
				document.body.style.left = '';
				document.body.style.top = '';
				document.body.style.width = '';
				document.body.style.height = '';
				document.body.style.zoom = '';
			}
			// Scale
			else {
				document.body.style.position = 'relative';
				document.body.style.left = ( - ( scrollOffset.x + rect.x ) / scale ) + 'px';
				document.body.style.top = ( - ( scrollOffset.y + rect.y ) / scale ) + 'px';
				document.body.style.width = ( scale * 100 ) + '%';
				document.body.style.height = ( scale * 100 ) + '%';
				document.body.style.zoom = scale;
			}
		}

		level = scale;

		if( document.documentElement.classList ) {
			if( level !== 1 ) {
				document.documentElement.classList.add( 'zoomed' );
			}
			else {
				document.documentElement.classList.remove( 'zoomed' );
			}
		}
	}
function magnify ( rect , scale ) { var scrollOffset = getScrollOffset ( ) ; // Ensure a width/height is set rect . width = rect . width || 1 ; rect . height = rect . height || 1 ; // Center the rect within the zoomed viewport rect . x -= ( window . innerWidth - ( rect . width * scale ) ) / 2 ; rect . y -= ( window . innerHeight - ( rect . height * scale ) ) / 2 ; if ( supportsTransforms ) { // Reset if ( scale === 1 ) { document . body . style . transform = '' ; document . body . style . OTransform = '' ; document . body . style . msTransform = '' ; document . body . style . MozTransform = '' ; document . body . style . WebkitTransform = '' ; } // Scale else { var origin = scrollOffset . x + 'px ' + scrollOffset . y + 'px' , transform = 'translate(' + - rect . x + 'px,' + - rect . y + 'px) scale(' + scale + ')' ; document . body . style . transformOrigin = origin ; document . body . style . OTransformOrigin = origin ; document . body . style . msTransformOrigin = origin ; document . body . style . MozTransformOrigin = origin ; document . body . style . WebkitTransformOrigin = origin ; document . body . style . transform = transform ; document . body . style . OTransform = transform ; document . body . style . msTransform = transform ; document . body . style . MozTransform = transform ; document . body . style . WebkitTransform = transform ; } } else { // Reset if ( scale === 1 ) { document . body . style . position = '' ; document . body . style . left = '' ; document . body . style . top = '' ; document . body . style . width = '' ; document . body . style . height = '' ; document . body . style . zoom = '' ; } // Scale else { document . body . style . position = 'relative' ; document . body . style . left = ( - ( scrollOffset . x + rect . x ) / scale ) + 'px' ; document . body . style . top = ( - ( scrollOffset . y + rect . y ) / scale ) + 'px' ; document . body . style . width = ( scale * 100 ) + '%' ; document . body . style . height = ( scale * 100 ) + '%' ; document . body . style . zoom = scale ; } } level = scale ; if ( document . documentElement . classList ) { if ( level !== 1 ) { document . documentElement . classList . add ( 'zoomed' ) ; } else { document . documentElement . classList . remove ( 'zoomed' ) ; } } }
Applies the CSS required to zoom in, prefers the use of CSS3
transforms but falls back on zoom for IE.

@param {Object} rect
@param {Number} scale
Applies the CSS required to zoom in prefers the use of CSS3 transforms but falls back on zoom for IE .