Skip to content
Snippets Groups Projects
Commit 4c57ad91 authored by Hakim El Hattab's avatar Hakim El Hattab
Browse files

dispatch event when paused/resumed (closes #336)

parent 68fa39f0
No related branches found
No related tags found
No related merge requests found
......@@ -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' );
}
}
/**
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment