add override flag to overview toggle, code cleanup
This commit is contained in:
parent
b0cc9fee45
commit
7d5c8b550d
126
js/reveal.js
126
js/reveal.js
|
@ -1,5 +1,5 @@
|
||||||
/*!
|
/*!
|
||||||
* reveal.js 2.1 r26
|
* reveal.js 2.1 r27
|
||||||
* http://lab.hakim.se/reveal-js
|
* http://lab.hakim.se/reveal-js
|
||||||
* MIT licensed
|
* MIT licensed
|
||||||
*
|
*
|
||||||
|
@ -171,7 +171,7 @@ var Reveal = (function(){
|
||||||
|
|
||||||
// Extension may contain callback functions
|
// Extension may contain callback functions
|
||||||
if( typeof s.callback === 'function' ) {
|
if( typeof s.callback === 'function' ) {
|
||||||
head.ready( s.src.match( /([\w\d_-]*)\.?[^\\\/]*$/i )[0], s.callback );
|
head.ready( s.src.match( /([\w\d_\-]*)\.?[^\\\/]*$/i )[0], s.callback );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -232,8 +232,9 @@ var Reveal = (function(){
|
||||||
// Load the theme in the config, if it's not already loaded
|
// Load the theme in the config, if it's not already loaded
|
||||||
if( config.theme && dom.theme ) {
|
if( config.theme && dom.theme ) {
|
||||||
var themeURL = dom.theme.getAttribute( 'href' );
|
var themeURL = dom.theme.getAttribute( 'href' );
|
||||||
var themeFinder = /[^/]*?(?=\.css)/;
|
var themeFinder = /[^\/]*?(?=\.css)/;
|
||||||
var themeName = themeURL.match(themeFinder)[0];
|
var themeName = themeURL.match(themeFinder)[0];
|
||||||
|
|
||||||
if( config.theme !== themeName ) {
|
if( config.theme !== themeName ) {
|
||||||
themeURL = themeURL.replace(themeFinder, config.theme);
|
themeURL = themeURL.replace(themeFinder, config.theme);
|
||||||
dom.theme.setAttribute( 'href', themeURL );
|
dom.theme.setAttribute( 'href', themeURL );
|
||||||
|
@ -335,6 +336,17 @@ var Reveal = (function(){
|
||||||
window.scrollTo( 0, 1 );
|
window.scrollTo( 0, 1 );
|
||||||
}, 0 );
|
}, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dispatches an event of the specified type from the
|
||||||
|
* reveal DOM element.
|
||||||
|
*/
|
||||||
|
function dispatchEvent( type, properties ) {
|
||||||
|
var event = document.createEvent( "HTMLEvents", 1, 2 );
|
||||||
|
event.initEvent( type, true, true );
|
||||||
|
extend( event, properties );
|
||||||
|
dom.wrapper.dispatchEvent( event );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler for the document level 'keydown' event.
|
* Handler for the document level 'keydown' event.
|
||||||
|
@ -345,30 +357,32 @@ var Reveal = (function(){
|
||||||
// Disregard the event if the target is editable or a
|
// Disregard the event if the target is editable or a
|
||||||
// modifier is present
|
// modifier is present
|
||||||
if ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return;
|
if ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return;
|
||||||
|
|
||||||
var triggered = false;
|
var triggered = true;
|
||||||
|
|
||||||
switch( event.keyCode ) {
|
switch( event.keyCode ) {
|
||||||
// p, page up
|
// p, page up
|
||||||
case 80: case 33: navigatePrev(); triggered = true; break;
|
case 80: case 33: navigatePrev(); break;
|
||||||
// n, page down
|
// n, page down
|
||||||
case 78: case 34: navigateNext(); triggered = true; break;
|
case 78: case 34: navigateNext(); break;
|
||||||
// h, left
|
// h, left
|
||||||
case 72: case 37: navigateLeft(); triggered = true; break;
|
case 72: case 37: navigateLeft(); break;
|
||||||
// l, right
|
// l, right
|
||||||
case 76: case 39: navigateRight(); triggered = true; break;
|
case 76: case 39: navigateRight(); break;
|
||||||
// k, up
|
// k, up
|
||||||
case 75: case 38: navigateUp(); triggered = true; break;
|
case 75: case 38: navigateUp(); break;
|
||||||
// j, down
|
// j, down
|
||||||
case 74: case 40: navigateDown(); triggered = true; break;
|
case 74: case 40: navigateDown(); break;
|
||||||
// home
|
// home
|
||||||
case 36: navigateTo( 0 ); triggered = true; break;
|
case 36: navigateTo( 0 ); break;
|
||||||
// end
|
// end
|
||||||
case 35: navigateTo( Number.MAX_VALUE ); triggered = true; break;
|
case 35: navigateTo( Number.MAX_VALUE ); break;
|
||||||
// space
|
// space
|
||||||
case 32: overviewIsActive() ? deactivateOverview() : navigateNext(); triggered = true; break;
|
case 32: overviewIsActive() ? deactivateOverview() : navigateNext(); break;
|
||||||
// return
|
// return
|
||||||
case 13: if( overviewIsActive() ) { deactivateOverview(); triggered = true; } break;
|
case 13: overviewIsActive() ? deactivateOverview() : triggered = false; break;
|
||||||
|
default:
|
||||||
|
triggered = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the input resulted in a triggered action we should prevent
|
// If the input resulted in a triggered action we should prevent
|
||||||
|
@ -507,6 +521,24 @@ var Reveal = (function(){
|
||||||
readURL();
|
readURL();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invoked when a slide is and we're in the overview.
|
||||||
|
*/
|
||||||
|
function onOverviewSlideClicked( event ) {
|
||||||
|
// TODO There's a bug here where the event listeners are not
|
||||||
|
// removed after deactivating the overview.
|
||||||
|
if( overviewIsActive() ) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
deactivateOverview();
|
||||||
|
|
||||||
|
indexh = this.getAttribute( 'data-index-h' );
|
||||||
|
indexv = this.getAttribute( 'data-index-v' );
|
||||||
|
|
||||||
|
slide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrap all links in 3D goodness.
|
* Wrap all links in 3D goodness.
|
||||||
*/
|
*/
|
||||||
|
@ -625,24 +657,6 @@ var Reveal = (function(){
|
||||||
return dom.wrapper.classList.contains( 'overview' );
|
return dom.wrapper.classList.contains( 'overview' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Invoked when a slide is and we're in the overview.
|
|
||||||
*/
|
|
||||||
function onOverviewSlideClicked( event ) {
|
|
||||||
// TODO There's a bug here where the event listeners are not
|
|
||||||
// removed after deactivating the overview.
|
|
||||||
if( overviewIsActive() ) {
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
deactivateOverview();
|
|
||||||
|
|
||||||
indexh = this.getAttribute( 'data-index-h' );
|
|
||||||
indexv = this.getAttribute( 'data-index-v' );
|
|
||||||
|
|
||||||
slide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates one dimension of slides by showing the slide
|
* Updates one dimension of slides by showing the slide
|
||||||
* with the specified index.
|
* with the specified index.
|
||||||
|
@ -730,8 +744,12 @@ var Reveal = (function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the visual slides to represent the currently
|
* Steps from the current point in the presentation to the
|
||||||
* set indices.
|
* slide which matches the specified horizontal and vertical
|
||||||
|
* indices.
|
||||||
|
*
|
||||||
|
* @param {int} h Horizontal index of the target slide
|
||||||
|
* @param {int} v Vertical index of the target slide
|
||||||
*/
|
*/
|
||||||
function slide( h, v ) {
|
function slide( h, v ) {
|
||||||
// Remember where we were at before
|
// Remember where we were at before
|
||||||
|
@ -777,7 +795,7 @@ var Reveal = (function(){
|
||||||
dom.progressbar.style.width = ( indexh / ( document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ).length - 1 ) ) * window.innerWidth + 'px';
|
dom.progressbar.style.width = ( indexh / ( document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ).length - 1 ) ) * window.innerWidth + 'px';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close the overview if it's active
|
// If the overview is active, re-activate it to update positions
|
||||||
if( overviewIsActive() ) {
|
if( overviewIsActive() ) {
|
||||||
activateOverview();
|
activateOverview();
|
||||||
}
|
}
|
||||||
|
@ -848,8 +866,8 @@ var Reveal = (function(){
|
||||||
* @return {Object} containing four booleans: left/right/up/down
|
* @return {Object} containing four booleans: left/right/up/down
|
||||||
*/
|
*/
|
||||||
function availableRoutes() {
|
function availableRoutes() {
|
||||||
var horizontalSlides = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR );
|
var horizontalSlides = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ),
|
||||||
var verticalSlides = document.querySelectorAll( VERTICAL_SLIDES_SELECTOR );
|
verticalSlides = document.querySelectorAll( VERTICAL_SLIDES_SELECTOR );
|
||||||
|
|
||||||
return {
|
return {
|
||||||
left: indexh > 0,
|
left: indexh > 0,
|
||||||
|
@ -871,7 +889,7 @@ var Reveal = (function(){
|
||||||
|
|
||||||
// If the first bit is invalid and there is a name we can
|
// If the first bit is invalid and there is a name we can
|
||||||
// assume that this is a named link
|
// assume that this is a named link
|
||||||
if( isNaN( parseInt( bits[0] ) ) && name.length ) {
|
if( isNaN( parseInt( bits[0], 10 ) ) && name.length ) {
|
||||||
// Find the slide with the specified name
|
// Find the slide with the specified name
|
||||||
var slide = document.querySelector( '#' + name );
|
var slide = document.querySelector( '#' + name );
|
||||||
|
|
||||||
|
@ -887,8 +905,8 @@ var Reveal = (function(){
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Read the index components of the hash
|
// Read the index components of the hash
|
||||||
var h = parseInt( bits[0] ) || 0,
|
var h = parseInt( bits[0], 10 ) || 0,
|
||||||
v = parseInt( bits[1] ) || 0;
|
v = parseInt( bits[1], 10 ) || 0;
|
||||||
|
|
||||||
navigateTo( h, v );
|
navigateTo( h, v );
|
||||||
}
|
}
|
||||||
|
@ -911,17 +929,6 @@ var Reveal = (function(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Dispatches an event of the specified type from the
|
|
||||||
* reveal DOM element.
|
|
||||||
*/
|
|
||||||
function dispatchEvent( type, properties ) {
|
|
||||||
var event = document.createEvent( "HTMLEvents", 1, 2 );
|
|
||||||
event.initEvent( type, true, true );
|
|
||||||
extend( event, properties );
|
|
||||||
dom.wrapper.dispatchEvent( event );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Navigate to the next slide fragment.
|
* Navigate to the next slide fragment.
|
||||||
*
|
*
|
||||||
|
@ -1016,18 +1023,21 @@ var Reveal = (function(){
|
||||||
slide( indexh - 1, 0 );
|
slide( indexh - 1, 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function navigateRight() {
|
function navigateRight() {
|
||||||
// Prioritize revealing fragments
|
// Prioritize revealing fragments
|
||||||
if( overviewIsActive() || nextFragment() === false ) {
|
if( overviewIsActive() || nextFragment() === false ) {
|
||||||
slide( indexh + 1, 0 );
|
slide( indexh + 1, 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function navigateUp() {
|
function navigateUp() {
|
||||||
// Prioritize hiding fragments
|
// Prioritize hiding fragments
|
||||||
if( overviewIsActive() || previousFragment() === false ) {
|
if( overviewIsActive() || previousFragment() === false ) {
|
||||||
slide( indexh, indexv - 1 );
|
slide( indexh, indexv - 1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function navigateDown() {
|
function navigateDown() {
|
||||||
// Prioritize revealing fragments
|
// Prioritize revealing fragments
|
||||||
if( overviewIsActive() || nextFragment() === false ) {
|
if( overviewIsActive() || nextFragment() === false ) {
|
||||||
|
@ -1076,13 +1086,17 @@ var Reveal = (function(){
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggles the slide overview mode on and off.
|
* Toggles the slide overview mode on and off.
|
||||||
|
*
|
||||||
|
* @param {Boolean} override Optional flag which overrides the
|
||||||
|
* toggle logic and forcibly sets the desired state. True means
|
||||||
|
* overview is open, false means it's closed.
|
||||||
*/
|
*/
|
||||||
function toggleOverview() {
|
function toggleOverview( override ) {
|
||||||
if( overviewIsActive() ) {
|
if( typeof override === 'boolean' ) {
|
||||||
deactivateOverview();
|
override ? activateOverview() : deactivateOverview();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
activateOverview();
|
overviewIsActive() ? deactivateOverview() : activateOverview();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/*!
|
/*!
|
||||||
* reveal.js 2.1 r26
|
* reveal.js 2.1 r27
|
||||||
* http://lab.hakim.se/reveal-js
|
* http://lab.hakim.se/reveal-js
|
||||||
* MIT licensed
|
* MIT licensed
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
|
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
|
||||||
*/
|
*/
|
||||||
var Reveal=(function(){var j=".reveal .slides>section",b=".reveal .slides>section.present>section",M={controls:true,progress:true,history:false,keyboard:true,overview:true,loop:false,autoSlide:0,mouseWheel:true,rollingLinks:true,theme:"default",transition:"default",dependencies:[]},k=0,c=0,v,D,ab=[],d={},O="WebkitPerspective" in document.body.style||"MozPerspective" in document.body.style||"msPerspective" in document.body.style||"OPerspective" in document.body.style||"perspective" in document.body.style,l="WebkitTransform" in document.body.style||"MozTransform" in document.body.style||"msTransform" in document.body.style||"OTransform" in document.body.style||"transform" in document.body.style,w=0,i=0,A=0,V={startX:0,startY:0,startSpan:0,startCount:0,handled:false,threshold:40};
|
var Reveal=(function(){var j=".reveal .slides>section",b=".reveal .slides>section.present>section",M={controls:true,progress:true,history:false,keyboard:true,overview:true,loop:false,autoSlide:0,mouseWheel:true,rollingLinks:true,theme:"default",transition:"default",dependencies:[]},k=0,c=0,v,D,ab=[],d={},O="WebkitPerspective" in document.body.style||"MozPerspective" in document.body.style||"msPerspective" in document.body.style||"OPerspective" in document.body.style||"perspective" in document.body.style,l="WebkitTransform" in document.body.style||"MozTransform" in document.body.style||"msTransform" in document.body.style||"OTransform" in document.body.style||"transform" in document.body.style,w=0,i=0,z=0,V={startX:0,startY:0,startSpan:0,startCount:0,handled:false,threshold:40};
|
||||||
function g(ac){if((!l&&!O)){document.body.setAttribute("class","no-transforms");return;}q(M,ac);d.theme=document.querySelector("#theme");d.wrapper=document.querySelector(".reveal");
|
function g(ac){if((!l&&!O)){document.body.setAttribute("class","no-transforms");return;}q(M,ac);d.theme=document.querySelector("#theme");d.wrapper=document.querySelector(".reveal");
|
||||||
d.progress=document.querySelector(".reveal .progress");d.progressbar=document.querySelector(".reveal .progress span");if(M.controls){d.controls=document.querySelector(".reveal .controls");
|
d.progress=document.querySelector(".reveal .progress");d.progressbar=document.querySelector(".reveal .progress span");if(M.controls){d.controls=document.querySelector(".reveal .controls");
|
||||||
d.controlsLeft=document.querySelector(".reveal .controls .left");d.controlsRight=document.querySelector(".reveal .controls .right");d.controlsUp=document.querySelector(".reveal .controls .up");
|
d.controlsLeft=document.querySelector(".reveal .controls .left");d.controlsRight=document.querySelector(".reveal .controls .right");d.controlsUp=document.querySelector(".reveal .controls .up");
|
||||||
d.controlsDown=document.querySelector(".reveal .controls .down");}Q();if(navigator.userAgent.match(/(iphone|ipod|android)/i)){document.documentElement.style.overflow="scroll";
|
d.controlsDown=document.querySelector(".reveal .controls .down");}Q();if(navigator.userAgent.match(/(iphone|ipod|android)/i)){document.documentElement.style.overflow="scroll";
|
||||||
document.body.style.height="120%";window.addEventListener("load",W,false);window.addEventListener("orientationchange",W,false);}}function Q(){var ad=[],ah=[];
|
document.body.style.height="120%";window.addEventListener("load",W,false);window.addEventListener("orientationchange",W,false);}}function Q(){var ad=[],ah=[];
|
||||||
for(var ae=0,ac=M.dependencies.length;ae<ac;ae++){var af=M.dependencies[ae];if(!af.condition||af.condition()){if(af.async){ah.push(af.src);}else{ad.push(af.src);
|
for(var ae=0,ac=M.dependencies.length;ae<ac;ae++){var af=M.dependencies[ae];if(!af.condition||af.condition()){if(af.async){ah.push(af.src);}else{ad.push(af.src);
|
||||||
}if(typeof af.callback==="function"){head.ready(af.src.match(/([\w\d_-]*)\.?[^\\\/]*$/i)[0],af.callback);}}}function ag(){head.js.apply(null,ah);E();}if(ad.length){head.ready(ag);
|
}if(typeof af.callback==="function"){head.ready(af.src.match(/([\w\d_\-]*)\.?[^\\\/]*$/i)[0],af.callback);}}}function ag(){head.js.apply(null,ah);E();}if(ad.length){head.ready(ag);
|
||||||
head.js.apply(null,ad);}else{ag();}}function E(){B();H();G();J();}function H(){if(O===false){M.transition="linear";}if(M.controls&&d.controls){d.controls.style.display="block";
|
head.js.apply(null,ad);}else{ag();}}function E(){B();H();G();J();}function H(){if(O===false){M.transition="linear";}if(M.controls&&d.controls){d.controls.style.display="block";
|
||||||
}if(M.progress&&d.progress){d.progress.style.display="block";}if(M.theme&&d.theme){var ae=d.theme.getAttribute("href");var ac=/[^/]*?(?=\.css)/;var ad=ae.match(ac)[0];
|
}if(M.progress&&d.progress){d.progress.style.display="block";}if(M.theme&&d.theme){var ae=d.theme.getAttribute("href");var ac=/[^\/]*?(?=\.css)/;var ad=ae.match(ac)[0];
|
||||||
if(M.theme!==ad){ae=ae.replace(ac,M.theme);d.theme.setAttribute("href",ae);}}if(M.transition!=="default"){d.wrapper.classList.add(M.transition);}if(M.mouseWheel){document.addEventListener("DOMMouseScroll",m,false);
|
if(M.theme!==ad){ae=ae.replace(ac,M.theme);d.theme.setAttribute("href",ae);}}if(M.transition!=="default"){d.wrapper.classList.add(M.transition);}if(M.mouseWheel){document.addEventListener("DOMMouseScroll",m,false);
|
||||||
document.addEventListener("mousewheel",m,false);}if(M.rollingLinks){I();}}function B(){document.addEventListener("touchstart",x,false);document.addEventListener("touchmove",Y,false);
|
document.addEventListener("mousewheel",m,false);}if(M.rollingLinks){I();}}function B(){document.addEventListener("touchstart",x,false);document.addEventListener("touchmove",Y,false);
|
||||||
document.addEventListener("touchend",R,false);window.addEventListener("hashchange",t,false);if(M.keyboard){document.addEventListener("keydown",Z,false);
|
document.addEventListener("touchend",R,false);window.addEventListener("hashchange",t,false);if(M.keyboard){document.addEventListener("keydown",Z,false);
|
||||||
|
@ -23,48 +23,48 @@ d.controlsDown.addEventListener("click",n(C),false);}}function P(){document.remo
|
||||||
document.removeEventListener("touchmove",Y,false);document.removeEventListener("touchend",R,false);window.removeEventListener("hashchange",t,false);if(M.controls&&d.controls){d.controlsLeft.removeEventListener("click",n(y),false);
|
document.removeEventListener("touchmove",Y,false);document.removeEventListener("touchend",R,false);window.removeEventListener("hashchange",t,false);if(M.controls&&d.controls){d.controlsLeft.removeEventListener("click",n(y),false);
|
||||||
d.controlsRight.removeEventListener("click",n(h),false);d.controlsUp.removeEventListener("click",n(r),false);d.controlsDown.removeEventListener("click",n(C),false);
|
d.controlsRight.removeEventListener("click",n(h),false);d.controlsUp.removeEventListener("click",n(r),false);d.controlsDown.removeEventListener("click",n(C),false);
|
||||||
}}function q(ad,ac){for(var ae in ac){ad[ae]=ac[ae];}}function N(ae,ac){var af=ae.x-ac.x,ad=ae.y-ac.y;return Math.sqrt(af*af+ad*ad);}function n(ac){return function(ad){ad.preventDefault();
|
}}function q(ad,ac){for(var ae in ac){ad[ae]=ac[ae];}}function N(ae,ac){var af=ae.x-ac.x,ad=ae.y-ac.y;return Math.sqrt(af*af+ad*ad);}function n(ac){return function(ad){ad.preventDefault();
|
||||||
ac.call();};}function W(){setTimeout(function(){window.scrollTo(0,1);},0);}function Z(ad){if(document.querySelector(":focus")!==null||ad.shiftKey||ad.altKey||ad.ctrlKey||ad.metaKey){return;
|
ac.call();};}function W(){setTimeout(function(){window.scrollTo(0,1);},0);}function o(ad,ac){var ae=document.createEvent("HTMLEvents",1,2);ae.initEvent(ad,true,true);
|
||||||
}var ac=false;switch(ad.keyCode){case 80:case 33:T();ac=true;break;case 78:case 34:u();ac=true;break;case 72:case 37:y();ac=true;break;case 76:case 39:h();
|
q(ae,ac);d.wrapper.dispatchEvent(ae);}function Z(ad){if(document.querySelector(":focus")!==null||ad.shiftKey||ad.altKey||ad.ctrlKey||ad.metaKey){return;
|
||||||
ac=true;break;case 75:case 38:r();ac=true;break;case 74:case 40:C();ac=true;break;case 36:K(0);ac=true;break;case 35:K(Number.MAX_VALUE);ac=true;break;
|
}var ac=true;switch(ad.keyCode){case 80:case 33:T();break;case 78:case 34:u();break;case 72:case 37:y();break;case 76:case 39:h();break;case 75:case 38:r();
|
||||||
case 32:U()?X():u();ac=true;break;case 13:if(U()){X();ac=true;}break;}if(ac){ad.preventDefault();}else{if(ad.keyCode===27&&O){S();ad.preventDefault();}}J();
|
break;case 74:case 40:C();break;case 36:K(0);break;case 35:K(Number.MAX_VALUE);break;case 32:U()?X():u();break;case 13:U()?X():ac=false;break;default:ac=false;
|
||||||
}function x(ac){V.startX=ac.touches[0].clientX;V.startY=ac.touches[0].clientY;V.startCount=ac.touches.length;if(ac.touches.length===2){V.startSpan=N({x:ac.touches[1].clientX,y:ac.touches[1].clientY},{x:V.startX,y:V.startY});
|
}if(ac){ad.preventDefault();}else{if(ad.keyCode===27&&O){S();ad.preventDefault();}}J();}function x(ac){V.startX=ac.touches[0].clientX;V.startY=ac.touches[0].clientY;
|
||||||
}}function Y(ah){if(!V.handled){var af=ah.touches[0].clientX;var ae=ah.touches[0].clientY;if(ah.touches.length===2&&V.startCount===2){var ag=N({x:ah.touches[1].clientX,y:ah.touches[1].clientY},{x:V.startX,y:V.startY});
|
V.startCount=ac.touches.length;if(ac.touches.length===2){V.startSpan=N({x:ac.touches[1].clientX,y:ac.touches[1].clientY},{x:V.startX,y:V.startY});}}function Y(ah){if(!V.handled){var af=ah.touches[0].clientX;
|
||||||
|
var ae=ah.touches[0].clientY;if(ah.touches.length===2&&V.startCount===2){var ag=N({x:ah.touches[1].clientX,y:ah.touches[1].clientY},{x:V.startX,y:V.startY});
|
||||||
if(Math.abs(V.startSpan-ag)>V.threshold){V.handled=true;if(ag<V.startSpan){F();}else{X();}}}else{if(ah.touches.length===1){var ad=af-V.startX,ac=ae-V.startY;
|
if(Math.abs(V.startSpan-ag)>V.threshold){V.handled=true;if(ag<V.startSpan){F();}else{X();}}}else{if(ah.touches.length===1){var ad=af-V.startX,ac=ae-V.startY;
|
||||||
if(ad>V.threshold&&Math.abs(ad)>Math.abs(ac)){V.handled=true;y();}else{if(ad<-V.threshold&&Math.abs(ad)>Math.abs(ac)){V.handled=true;h();}else{if(ac>V.threshold){V.handled=true;
|
if(ad>V.threshold&&Math.abs(ad)>Math.abs(ac)){V.handled=true;y();}else{if(ad<-V.threshold&&Math.abs(ad)>Math.abs(ac)){V.handled=true;h();}else{if(ac>V.threshold){V.handled=true;
|
||||||
r();}else{if(ac<-V.threshold){V.handled=true;C();}}}}}}ah.preventDefault();}}function R(ac){V.handled=false;}function m(ac){clearTimeout(w);w=setTimeout(function(){var ad=ac.detail||-ac.wheelDelta;
|
r();}else{if(ac<-V.threshold){V.handled=true;C();}}}}}}ah.preventDefault();}}function R(ac){V.handled=false;}function m(ac){clearTimeout(w);w=setTimeout(function(){var ad=ac.detail||-ac.wheelDelta;
|
||||||
if(ad>0){u();}else{T();}},100);}function t(ac){G();}function I(){if(O&&!("msPerspective" in document.body.style)){var ad=document.querySelectorAll(".reveal .slides section a:not(.image)");
|
if(ad>0){u();}else{T();}},100);}function t(ac){G();}function A(ac){if(U()){ac.preventDefault();X();k=this.getAttribute("data-index-h");c=this.getAttribute("data-index-v");
|
||||||
for(var ae=0,ac=ad.length;ae<ac;ae++){var af=ad[ae];if(af.textContent&&!af.querySelector("img")&&(!af.className||!af.classList.contains(af,"roll"))){af.classList.add("roll");
|
a();}}function I(){if(O&&!("msPerspective" in document.body.style)){var ad=document.querySelectorAll(".reveal .slides section a:not(.image)");for(var ae=0,ac=ad.length;
|
||||||
af.innerHTML='<span data-title="'+af.text+'">'+af.innerHTML+"</span>";}}}}function F(){if(M.overview){d.wrapper.classList.add("overview");var ac=document.querySelectorAll(j);
|
ae<ac;ae++){var af=ad[ae];if(af.textContent&&!af.querySelector("img")&&(!af.className||!af.classList.contains(af,"roll"))){af.classList.add("roll");af.innerHTML='<span data-title="'+af.text+'">'+af.innerHTML+"</span>";
|
||||||
for(var ah=0,af=ac.length;ah<af;ah++){var ae=ac[ah],al="translateZ(-2500px) translate("+((ah-k)*105)+"%, 0%)";ae.setAttribute("data-index-h",ah);ae.style.display="block";
|
}}}}function F(){if(M.overview){d.wrapper.classList.add("overview");var ac=document.querySelectorAll(j);for(var ah=0,af=ac.length;ah<af;ah++){var ae=ac[ah],al="translateZ(-2500px) translate("+((ah-k)*105)+"%, 0%)";
|
||||||
ae.style.WebkitTransform=al;ae.style.MozTransform=al;ae.style.msTransform=al;ae.style.OTransform=al;ae.style.transform=al;if(!ae.classList.contains("stack")){ae.addEventListener("click",z,true);
|
ae.setAttribute("data-index-h",ah);ae.style.display="block";ae.style.WebkitTransform=al;ae.style.MozTransform=al;ae.style.msTransform=al;ae.style.OTransform=al;
|
||||||
}var ak=ae.querySelectorAll("section");for(var ag=0,ad=ak.length;ag<ad;ag++){var aj=ak[ag],ai="translate(0%, "+((ag-(ah===k?c:0))*105)+"%)";aj.setAttribute("data-index-h",ah);
|
ae.style.transform=al;if(!ae.classList.contains("stack")){ae.addEventListener("click",A,true);}var ak=ae.querySelectorAll("section");for(var ag=0,ad=ak.length;
|
||||||
aj.setAttribute("data-index-v",ag);aj.style.display="block";aj.style.WebkitTransform=ai;aj.style.MozTransform=ai;aj.style.msTransform=ai;aj.style.OTransform=ai;
|
ag<ad;ag++){var aj=ak[ag],ai="translate(0%, "+((ag-(ah===k?c:0))*105)+"%)";aj.setAttribute("data-index-h",ah);aj.setAttribute("data-index-v",ag);aj.style.display="block";
|
||||||
aj.style.transform=ai;aj.addEventListener("click",z,true);}}}}function X(){if(M.overview){d.wrapper.classList.remove("overview");var af=Array.prototype.slice.call(document.querySelectorAll(".reveal .slides section"));
|
aj.style.WebkitTransform=ai;aj.style.MozTransform=ai;aj.style.msTransform=ai;aj.style.OTransform=ai;aj.style.transform=ai;aj.addEventListener("click",A,true);
|
||||||
|
}}}}function X(){if(M.overview){d.wrapper.classList.remove("overview");var af=Array.prototype.slice.call(document.querySelectorAll(".reveal .slides section"));
|
||||||
for(var ae=0,ac=af.length;ae<ac;ae++){var ad=af[ae];ad.style.WebkitTransform="";ad.style.MozTransform="";ad.style.msTransform="";ad.style.OTransform="";
|
for(var ae=0,ac=af.length;ae<ac;ae++){var ad=af[ae];ad.style.WebkitTransform="";ad.style.MozTransform="";ad.style.msTransform="";ad.style.OTransform="";
|
||||||
ad.style.transform="";ad.removeEventListener("click",z);}a();}}function U(){return d.wrapper.classList.contains("overview");}function z(ac){if(U()){ac.preventDefault();
|
ad.style.transform="";ad.removeEventListener("click",A);}a();}}function U(){return d.wrapper.classList.contains("overview");}function aa(ad,af){var ah=Array.prototype.slice.call(document.querySelectorAll(ad)),ai=ah.length;
|
||||||
X();k=this.getAttribute("data-index-h");c=this.getAttribute("data-index-v");a();}}function aa(ad,af){var ah=Array.prototype.slice.call(document.querySelectorAll(ad)),ai=ah.length;
|
|
||||||
if(ai){if(M.loop){af%=ai;if(af<0){af=ai+af;}}af=Math.max(Math.min(af,ai-1),0);for(var ag=0;ag<ai;ag++){var ac=ah[ag];if(U()===false){var aj=Math.abs((af-ag)%(ai-3))||0;
|
if(ai){if(M.loop){af%=ai;if(af<0){af=ai+af;}}af=Math.max(Math.min(af,ai-1),0);for(var ag=0;ag<ai;ag++){var ac=ah[ag];if(U()===false){var aj=Math.abs((af-ag)%(ai-3))||0;
|
||||||
ac.style.display=aj>3?"none":"block";}ah[ag].classList.remove("past");ah[ag].classList.remove("present");ah[ag].classList.remove("future");if(ag<af){ah[ag].classList.add("past");
|
ac.style.display=aj>3?"none":"block";}ah[ag].classList.remove("past");ah[ag].classList.remove("present");ah[ag].classList.remove("future");if(ag<af){ah[ag].classList.add("past");
|
||||||
}else{if(ag>af){ah[ag].classList.add("future");}}if(ac.querySelector("section")){ah[ag].classList.add("stack");}}ah[af].classList.add("present");var ae=ah[af].getAttribute("data-state");
|
}else{if(ag>af){ah[ag].classList.add("future");}}if(ac.querySelector("section")){ah[ag].classList.add("stack");}}ah[af].classList.add("present");var ae=ah[af].getAttribute("data-state");
|
||||||
if(ae){ab=ab.concat(ae.split(" "));}}else{af=0;}return af;}function a(ai,am){v=D;var af=ab.concat();ab.length=0;var al=k,ad=c;k=aa(j,ai===undefined?k:ai);
|
if(ae){ab=ab.concat(ae.split(" "));}}else{af=0;}return af;}function a(ai,am){v=D;var af=ab.concat();ab.length=0;var al=k,ad=c;k=aa(j,ai===undefined?k:ai);
|
||||||
c=aa(b,am===undefined?c:am);stateLoop:for(var ag=0,aj=ab.length;ag<aj;ag++){for(var ae=0;ae<af.length;ae++){if(af[ae]===ab[ag]){af.splice(ae,1);continue stateLoop;
|
c=aa(b,am===undefined?c:am);stateLoop:for(var ag=0,aj=ab.length;ag<aj;ag++){for(var ae=0;ae<af.length;ae++){if(af[ae]===ab[ag]){af.splice(ae,1);continue stateLoop;
|
||||||
}}document.documentElement.classList.add(ab[ag]);o(ab[ag]);}while(af.length){document.documentElement.classList.remove(af.pop());}if(M.progress&&d.progress){d.progressbar.style.width=(k/(document.querySelectorAll(j).length-1))*window.innerWidth+"px";
|
}}document.documentElement.classList.add(ab[ag]);o(ab[ag]);}while(af.length){document.documentElement.classList.remove(af.pop());}if(M.progress&&d.progress){d.progressbar.style.width=(k/(document.querySelectorAll(j).length-1))*window.innerWidth+"px";
|
||||||
}if(U()){F();}p();clearTimeout(A);A=setTimeout(f,1500);var ac=document.querySelectorAll(j);var ak=ac[k],ah=ak.querySelectorAll("section");D=ah[c]||ak;if(k!==al||c!==ad){o("slidechanged",{indexh:k,indexv:c,previousSlide:v,currentSlide:D});
|
}if(U()){F();}p();clearTimeout(z);z=setTimeout(f,1500);var ac=document.querySelectorAll(j);var ak=ac[k],ah=ak.querySelectorAll("section");D=ah[c]||ak;if(k!==al||c!==ad){o("slidechanged",{indexh:k,indexv:c,previousSlide:v,currentSlide:D});
|
||||||
}else{v=null;}if(v){v.classList.remove("present");}}function p(){if(!M.controls||!d.controls){return;}var ac=e();[d.controlsLeft,d.controlsRight,d.controlsUp,d.controlsDown].forEach(function(ad){ad.classList.remove("enabled");
|
}else{v=null;}if(v){v.classList.remove("present");}}function p(){if(!M.controls||!d.controls){return;}var ac=e();[d.controlsLeft,d.controlsRight,d.controlsUp,d.controlsDown].forEach(function(ad){ad.classList.remove("enabled");
|
||||||
});if(ac.left){d.controlsLeft.classList.add("enabled");}if(ac.right){d.controlsRight.classList.add("enabled");}if(ac.up){d.controlsUp.classList.add("enabled");
|
});if(ac.left){d.controlsLeft.classList.add("enabled");}if(ac.right){d.controlsRight.classList.add("enabled");}if(ac.up){d.controlsUp.classList.add("enabled");
|
||||||
}if(ac.down){d.controlsDown.classList.add("enabled");}}function e(){var ac=document.querySelectorAll(j);var ad=document.querySelectorAll(b);return{left:k>0,right:k<ac.length-1,up:c>0,down:c<ad.length-1};
|
}if(ac.down){d.controlsDown.classList.add("enabled");}}function e(){var ac=document.querySelectorAll(j),ad=document.querySelectorAll(b);return{left:k>0,right:k<ac.length-1,up:c>0,down:c<ad.length-1};
|
||||||
}function G(){var ah=window.location.hash;var ag=ah.slice(2).split("/"),ae=ah.replace(/#|\//gi,"");if(isNaN(parseInt(ag[0]))&&ae.length){var ac=document.querySelector("#"+ae);
|
}function G(){var ah=window.location.hash;var ag=ah.slice(2).split("/"),ae=ah.replace(/#|\//gi,"");if(isNaN(parseInt(ag[0],10))&&ae.length){var ac=document.querySelector("#"+ae);
|
||||||
if(ac){var ai=Reveal.getIndices(ac);K(ai.h,ai.v);}else{K(k,c);}}else{var af=parseInt(ag[0])||0,ad=parseInt(ag[1])||0;K(af,ad);}}function f(){if(M.history){var ac="/";
|
if(ac){var ai=Reveal.getIndices(ac);K(ai.h,ai.v);}else{K(k,c);}}else{var af=parseInt(ag[0],10)||0,ad=parseInt(ag[1],10)||0;K(af,ad);}}function f(){if(M.history){var ac="/";
|
||||||
if(k>0||c>0){ac+=k;}if(c>0){ac+="/"+c;}window.location.hash=ac;}}function o(ad,ac){var ae=document.createEvent("HTMLEvents",1,2);ae.initEvent(ad,true,true);
|
if(k>0||c>0){ac+=k;}if(c>0){ac+="/"+c;}window.location.hash=ac;}}function s(){if(document.querySelector(b+".present")){var ad=document.querySelectorAll(b+".present .fragment:not(.visible)");
|
||||||
q(ae,ac);d.wrapper.dispatchEvent(ae);}function s(){if(document.querySelector(b+".present")){var ad=document.querySelectorAll(b+".present .fragment:not(.visible)");
|
|
||||||
if(ad.length){ad[0].classList.add("visible");o("fragmentshown",{fragment:ad[0]});return true;}}else{var ac=document.querySelectorAll(j+".present .fragment:not(.visible)");
|
if(ad.length){ad[0].classList.add("visible");o("fragmentshown",{fragment:ad[0]});return true;}}else{var ac=document.querySelectorAll(j+".present .fragment:not(.visible)");
|
||||||
if(ac.length){ac[0].classList.add("visible");o("fragmentshown",{fragment:ac[0]});return true;}}return false;}function L(){if(document.querySelector(b+".present")){var ad=document.querySelectorAll(b+".present .fragment.visible");
|
if(ac.length){ac[0].classList.add("visible");o("fragmentshown",{fragment:ac[0]});return true;}}return false;}function L(){if(document.querySelector(b+".present")){var ad=document.querySelectorAll(b+".present .fragment.visible");
|
||||||
if(ad.length){ad[ad.length-1].classList.remove("visible");o("fragmenthidden",{fragment:ad[ad.length-1]});return true;}}else{var ac=document.querySelectorAll(j+".present .fragment.visible");
|
if(ad.length){ad[ad.length-1].classList.remove("visible");o("fragmenthidden",{fragment:ad[ad.length-1]});return true;}}else{var ac=document.querySelectorAll(j+".present .fragment.visible");
|
||||||
if(ac.length){ac[ac.length-1].classList.remove("visible");o("fragmenthidden",{fragment:ac[ac.length-1]});return true;}}return false;}function J(){clearTimeout(i);
|
if(ac.length){ac[ac.length-1].classList.remove("visible");o("fragmenthidden",{fragment:ac[ac.length-1]});return true;}}return false;}function J(){clearTimeout(i);
|
||||||
if(M.autoSlide){i=setTimeout(u,M.autoSlide);}}function K(ad,ac){a(ad,ac);}function y(){if(U()||L()===false){a(k-1,0);}}function h(){if(U()||s()===false){a(k+1,0);
|
if(M.autoSlide){i=setTimeout(u,M.autoSlide);}}function K(ad,ac){a(ad,ac);}function y(){if(U()||L()===false){a(k-1,0);}}function h(){if(U()||s()===false){a(k+1,0);
|
||||||
}}function r(){if(U()||L()===false){a(k,c-1);}}function C(){if(U()||s()===false){a(k,c+1);}}function T(){if(L()===false){if(e().up){r();}else{var ac=document.querySelector(".reveal .slides>section.past:nth-child("+k+")");
|
}}function r(){if(U()||L()===false){a(k,c-1);}}function C(){if(U()||s()===false){a(k,c+1);}}function T(){if(L()===false){if(e().up){r();}else{var ac=document.querySelector(".reveal .slides>section.past:nth-child("+k+")");
|
||||||
if(ac){c=(ac.querySelectorAll("section").length+1)||0;k--;a();}}}}function u(){if(s()===false){e().down?C():h();}J();}function S(){if(U()){X();}else{F();
|
if(ac){c=(ac.querySelectorAll("section").length+1)||0;k--;a();}}}}function u(){if(s()===false){e().down?C():h();}J();}function S(ac){if(typeof ac==="boolean"){ac?F():X();
|
||||||
}}return{initialize:g,navigateTo:K,navigateLeft:y,navigateRight:h,navigateUp:r,navigateDown:C,navigatePrev:T,navigateNext:u,toggleOverview:S,addEventListeners:B,removeEventListeners:P,getIndices:function(ac){var ag=k,ae=c;
|
}else{U()?X():F();}}return{initialize:g,navigateTo:K,navigateLeft:y,navigateRight:h,navigateUp:r,navigateDown:C,navigatePrev:T,navigateNext:u,toggleOverview:S,addEventListeners:B,removeEventListeners:P,getIndices:function(ac){var ag=k,ae=c;
|
||||||
if(ac){var ah=!!ac.parentNode.nodeName.match(/section/gi);var af=ah?ac.parentNode:ac;var ad=Array.prototype.slice.call(document.querySelectorAll(j));ag=Math.max(ad.indexOf(af),0);
|
if(ac){var ah=!!ac.parentNode.nodeName.match(/section/gi);var af=ah?ac.parentNode:ac;var ad=Array.prototype.slice.call(document.querySelectorAll(j));ag=Math.max(ad.indexOf(af),0);
|
||||||
if(ah){ae=Math.max(Array.prototype.slice.call(ac.parentNode.children).indexOf(ac),0);}}return{h:ag,v:ae};},getPreviousSlide:function(){return v;},getCurrentSlide:function(){return D;
|
if(ah){ae=Math.max(Array.prototype.slice.call(ac.parentNode.children).indexOf(ac),0);}}return{h:ag,v:ae};},getPreviousSlide:function(){return v;},getCurrentSlide:function(){return D;
|
||||||
},getQueryHash:function(){var ac={};location.search.replace(/[A-Z0-9]+?=(\w*)/gi,function(ad){ac[ad.split("=").shift()]=ad.split("=").pop();});return ac;
|
},getQueryHash:function(){var ac={};location.search.replace(/[A-Z0-9]+?=(\w*)/gi,function(ad){ac[ad.split("=").shift()]=ad.split("=").pop();});return ac;
|
||||||
|
|
Loading…
Reference in New Issue