diff options
author | Hakim El Hattab | 2013-02-27 16:41:45 -0500 |
---|---|---|
committer | Hakim El Hattab | 2013-02-27 16:41:45 -0500 |
commit | 4c57ad918bee9741205e1fa9c4dd40955e0df3af (patch) | |
tree | b4d46f75a95010b183602047647bdc986ed494e5 /js/reveal.js | |
parent | 68fa39f083b72239681980614c3eb2de429da992 (diff) |
dispatch event when paused/resumed (closes #336)
Diffstat (limited to 'js/reveal.js')
-rw-r--r-- | js/reveal.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/js/reveal.js b/js/reveal.js index f048b07..a67be11 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -928,9 +928,15 @@ var Reveal = (function(){ */ function pause() { + var wasPaused = dom.wrapper.classList.contains( 'paused' ); + cancelAutoSlide(); dom.wrapper.classList.add( 'paused' ); + if( wasPaused === false ) { + dispatchEvent( 'paused' ); + } + } /** @@ -938,9 +944,15 @@ var Reveal = (function(){ */ function resume() { + var wasPaused = dom.wrapper.classList.contains( 'paused' ); + cueAutoSlide(); dom.wrapper.classList.remove( 'paused' ); + if( wasPaused ) { + dispatchEvent( 'resumed' ); + } + } /** |