diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2012-10-24 21:42:10 -0400 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2012-10-24 21:42:10 -0400 |
commit | 4777afe0c562c40b388c304d00bcd07b42836901 (patch) | |
tree | fa1c7f7615a71c41b6ee58d7036e79ab10ccb105 /js | |
parent | 747c4c4b3d7862d5c6889438b96bd7ad408b24bc (diff) | |
download | perl-software-in-gnu-guix-4777afe0c562c40b388c304d00bcd07b42836901.tar perl-software-in-gnu-guix-4777afe0c562c40b388c304d00bcd07b42836901.tar.gz |
force 'ready' to fire one cycle later (#208)
Diffstat (limited to 'js')
-rw-r--r-- | js/reveal.js | 17 | ||||
-rw-r--r-- | js/reveal.min.js | 4 |
2 files changed, 12 insertions, 9 deletions
diff --git a/js/reveal.js b/js/reveal.js index fcc064d..1194657 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1,5 +1,5 @@ /*! - * reveal.js 2.1 r35 + * reveal.js 2.1 r36 * http://lab.hakim.se/reveal-js * MIT licensed * @@ -268,12 +268,15 @@ var Reveal = (function(){ // Start auto-sliding if it's enabled cueAutoSlide(); - // Notify listeners that the presentation is ready - dispatchEvent( 'ready', { - 'indexh': indexh, - 'indexv': indexv, - 'currentSlide': currentSlide - } ); + // Notify listeners that the presentation is ready but use a 1ms + // timeout to ensure it's not fired synchronously after #initialize() + setTimeout( function() { + dispatchEvent( 'ready', { + 'indexh': indexh, + 'indexv': indexv, + 'currentSlide': currentSlide + } ); + }, 1 ); } /** diff --git a/js/reveal.min.js b/js/reveal.min.js index 958d271..f82e040 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,5 +1,5 @@ /*! - * reveal.js 2.1 r35 + * reveal.js 2.1 r36 * http://lab.hakim.se/reveal-js * MIT licensed * @@ -17,7 +17,7 @@ f.controlsDown=document.querySelector(".reveal .controls .down");}}function d(){ document.body.style.height="120%";window.addEventListener("load",ad,false);window.addEventListener("orientationchange",ad,false);}}function V(){var am=[],aq=[]; for(var an=0,al=R.dependencies.length;an<al;an++){var ao=R.dependencies[an];if(!ao.condition||ao.condition()){if(ao.async){aq.push(ao.src);}else{am.push(ao.src); }if(typeof ao.callback==="function"){head.ready(ao.src.match(/([\w\d_\-]*)\.?[^\\\/]*$/i)[0],ao.callback);}}}function ap(){head.js.apply(null,aq);H();}if(am.length){head.ready(ap); -head.js.apply(null,am);}else{ap();}}function H(){P();E();K();J();O();r("ready",{indexh:m,indexv:e,currentSlide:G});}function K(){if(T===false){R.transition="linear"; +head.js.apply(null,am);}else{ap();}}function H(){P();E();K();J();O();setTimeout(function(){r("ready",{indexh:m,indexv:e,currentSlide:G});},1);}function K(){if(T===false){R.transition="linear"; }if(R.controls&&f.controls){f.controls.style.display="block";}if(R.progress&&f.progress){f.progress.style.display="block";}if(R.transition!=="default"){f.wrapper.classList.add(R.transition); }if(R.mouseWheel){document.addEventListener("DOMMouseScroll",o,false);document.addEventListener("mousewheel",o,false);}if(R.rollingLinks){N();}if(R.theme&&f.theme){var an=f.theme.getAttribute("href"); var al=/[^\/]*?(?=\.css)/;var am=an.match(al)[0];if(R.theme!==am){an=an.replace(al,R.theme);f.theme.setAttribute("href",an);}}}function E(){document.addEventListener("touchstart",A,false); |