Skip to content
Snippets Groups Projects
Commit c46486b3 authored by Michael Kühnel's avatar Michael Kühnel
Browse files

Add event listener 'fragmentshown' and 'fragmenthidden'

And emit 'fragmentchanged' with the appropriate fragmentData to show or hide fragments.
parent 46e270e5
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,25 @@
console.log('View slide notes at ' + window.location.origin + '/notes/' + socketId);
window.open(window.location.origin + '/notes/' + socketId, 'notes-' + socketId);
// Fires when a fragment is shown
Reveal.addEventListener( 'fragmentshown', function( event ) {
var fragmentData = {
showFragment : true,
socketId : socketId
};
socket.emit('fragmentchanged', fragmentData);
} );
// Fires when a fragment is hidden
Reveal.addEventListener( 'fragmenthidden', function( event ) {
var fragmentData = {
hideFragment : true,
socketId : socketId
};
socket.emit('fragmentchanged', fragmentData);
} );
// Fires when slide is changed
Reveal.addEventListener( 'slidechanged', function( event ) {
var nextindexh;
var nextindexv;
......
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