fixed showing speaker's view with timings/pacing while serving the presentation from the file system
This commit is contained in:
parent
325162692e
commit
8468d82433
3 changed files with 141 additions and 77 deletions
|
@ -21,8 +21,6 @@ var RevealNotes = (function() {
|
|||
|
||||
var notesPopup = window.open( notesFilePath, 'reveal.js - Notes', 'width=1100,height=700' );
|
||||
|
||||
// Allow popup window access to Reveal API
|
||||
notesPopup.Reveal = this.Reveal;
|
||||
|
||||
/**
|
||||
* Connect to the notes window through a postmessage handshake.
|
||||
|
@ -47,9 +45,22 @@ var RevealNotes = (function() {
|
|||
clearInterval( connectInterval );
|
||||
onConnected();
|
||||
}
|
||||
if( data && data.namespace === 'reveal-notes' && data.type === 'call' ) {
|
||||
callRevealApi( data.methodName, data.arguments, data.callId );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
function callRevealApi( methodName, methodArguments, callId ) {
|
||||
var result = Reveal[methodName].call(Reveal, methodArguments);
|
||||
notesPopup.postMessage( JSON.stringify( {
|
||||
namespace: 'reveal-notes',
|
||||
type: 'return',
|
||||
result: result,
|
||||
callId: callId
|
||||
} ), '*' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Posts the current slide data to the notes window
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue