diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2013-07-26 09:48:21 -0400 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2013-07-26 09:48:21 -0400 |
commit | 03385d7245f8c0428b5f8d8578022fb3a60fdd12 (patch) | |
tree | b4fc77ce729d8228b47da5bdb775d980e68d80d7 /plugin/notes/notes.html | |
parent | 8bf19ab61f8eb0e527348110f3923a33ea937eaa (diff) | |
download | fosdem-2018-presentation-03385d7245f8c0428b5f8d8578022fb3a60fdd12.tar fosdem-2018-presentation-03385d7245f8c0428b5f8d8578022fb3a60fdd12.tar.gz |
simplify client side notes plugin
Diffstat (limited to 'plugin/notes/notes.html')
-rw-r--r-- | plugin/notes/notes.html | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/plugin/notes/notes.html b/plugin/notes/notes.html index 8af43fb..9151663 100644 --- a/plugin/notes/notes.html +++ b/plugin/notes/notes.html @@ -173,6 +173,7 @@ window.addEventListener( 'message', function( event ) { var data = JSON.parse( event.data ); + // No need for updating the notes in case of fragment changes if ( data.notes !== undefined) { if( data.markdown ) { @@ -183,18 +184,9 @@ } } - // Showing and hiding fragments - if( data.fragment === 'next' ) { - currentSlide.contentWindow.Reveal.nextFragment(); - } - else if( data.fragment === 'prev' ) { - currentSlide.contentWindow.Reveal.prevFragment(); - } - else { - // Update the note slides - currentSlide.contentWindow.Reveal.slide( data.indexh, data.indexv ); - nextSlide.contentWindow.Reveal.slide( data.nextindexh, data.nextindexv ); - } + // Update the note slides + currentSlide.contentWindow.Reveal.slide( data.indexh, data.indexv, data.indexf ); + nextSlide.contentWindow.Reveal.slide( data.nextindexh, data.nextindexv ); }, false ); |