From 3a2036e2b20fa13bc92f4fdecc0b17342c4f8204 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 17 Oct 2012 00:20:42 -0400 Subject: add 'ready' event (#182) --- js/reveal.js | 9 ++++++++- js/reveal.min.js | 10 +++++----- 2 files changed, 13 insertions(+), 6 deletions(-) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index c1ffb8f..e53195f 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1,5 +1,5 @@ /*! - * reveal.js 2.1 r33 + * reveal.js 2.1 r34 * http://lab.hakim.se/reveal-js * MIT licensed * @@ -267,6 +267,13 @@ 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 + } ); } /** diff --git a/js/reveal.min.js b/js/reveal.min.js index 8f25320..e844a75 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,5 +1,5 @@ /*! - * reveal.js 2.1 r33 + * reveal.js 2.1 r34 * http://lab.hakim.se/reveal-js * MIT licensed * @@ -18,10 +18,10 @@ 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 al=[],ap=[]; for(var am=0,ak=R.dependencies.length;am