dispatch event when paused/resumed (closes #336)

This commit is contained in:
Hakim El Hattab 2013-02-27 16:41:45 -05:00
parent 68fa39f083
commit 4c57ad918b
2 changed files with 14 additions and 2 deletions

View File

@ -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' );
}
}
/**

4
js/reveal.min.js vendored

File diff suppressed because one or more lines are too long