dispatch event when paused/resumed (closes #336)
This commit is contained in:
parent
68fa39f083
commit
4c57ad918b
12
js/reveal.js
12
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' );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
4
js/reveal.min.js
vendored
4
js/reveal.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user