Skip to content
This repository has been archived by the owner on Sep 13, 2021. It is now read-only.

Commit

Permalink
notes plugin no longer syncs overview mode hakimel#1446
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimel committed Mar 9, 2016
1 parent 839398c commit 8b21e87
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion plugin/notes/notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ <h4 class="label">Notes</h4>

var data = JSON.parse( event.data );

// The overview mode is only useful to the reveal.js instance
// where navigation occurs so we don't sync it
if( data.state ) delete data.state.overview;

// Messages sent by the notes plugin inside of the main window
if( data && data.namespace === 'reveal-notes' ) {
if( data.type === 'connect' ) {
Expand All @@ -203,8 +207,10 @@ <h4 class="label">Notes</h4>
// Send a message back to notify that the handshake is complete
window.opener.postMessage( JSON.stringify({ namespace: 'reveal-notes', type: 'connected'} ), '*' );
}
else if( /slidechanged|fragmentshown|fragmenthidden|overviewshown|overviewhidden|paused|resumed/.test( data.eventName ) && currentState !== JSON.stringify( data.state ) ) {
else if( /slidechanged|fragmentshown|fragmenthidden|paused|resumed/.test( data.eventName ) && currentState !== JSON.stringify( data.state ) ) {

window.opener.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ]} ), '*' );

}
}

Expand Down

0 comments on commit 8b21e87

Please sign in to comment.