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/reveal.js | |
parent | 747c4c4b3d7862d5c6889438b96bd7ad408b24bc (diff) | |
download | fosdem-2018-presentation-4777afe0c562c40b388c304d00bcd07b42836901.tar fosdem-2018-presentation-4777afe0c562c40b388c304d00bcd07b42836901.tar.gz |
force 'ready' to fire one cycle later (#208)
Diffstat (limited to 'js/reveal.js')
-rw-r--r-- | js/reveal.js | 17 |
1 files changed, 10 insertions, 7 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 ); } /** |