sync server-side speaker notes after notes window opens

This commit is contained in:
Hakim El Hattab 2014-05-04 10:10:21 +02:00
parent 5e85f02eb1
commit 3eb7038a15
3 changed files with 26 additions and 5 deletions

View file

@ -36,10 +36,15 @@
messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string';
}
socket.emit( 'state', messageData );
socket.emit( 'statechanged', messageData );
}
// When a new notes window connects, post our current state
socket.on( 'connect', function( data ) {
post();
} );
// Monitor events that trigger a change in state
Reveal.addEventListener( 'slidechanged', post );
Reveal.addEventListener( 'fragmentshown', post );