diff options
author | Hakim El Hattab | 2014-05-04 10:10:21 +0200 |
---|---|---|
committer | Hakim El Hattab | 2014-05-04 10:10:21 +0200 |
commit | 3eb7038a153b12245cffbc840a727a764d82b333 (patch) | |
tree | 9e514ea03995fd2a988f1996f37692dbcf6448f2 /plugin/notes-server/client.js | |
parent | 5e85f02eb1596d0c5a71aa35430c0914e0b6d35a (diff) |
sync server-side speaker notes after notes window opens
Diffstat (limited to 'plugin/notes-server/client.js')
-rw-r--r-- | plugin/notes-server/client.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugin/notes-server/client.js b/plugin/notes-server/client.js index f7ecfa2..628586f 100644 --- a/plugin/notes-server/client.js +++ b/plugin/notes-server/client.js @@ -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 ); |