diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2017-01-31 16:47:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-31 16:47:29 +0100 |
commit | 1413cbc1a9344a6366c30fb0e83d5b6afc18f6d3 (patch) | |
tree | ce12f42738774efff3d7bf5d2f1a3cde25333f0c | |
parent | 3bcd167ce91c2aaa5ff005ffeeff332428cc03c6 (diff) | |
parent | 86a3f0276bb654fa8fea281ac1a91b2a05b4f092 (diff) | |
download | perl-software-in-gnu-guix-1413cbc1a9344a6366c30fb0e83d5b6afc18f6d3.tar perl-software-in-gnu-guix-1413cbc1a9344a6366c30fb0e83d5b6afc18f6d3.tar.gz |
Merge pull request #1636 from traff/master
For a fragment: allow to show a separate note defined in it
-rw-r--r-- | plugin/notes/notes.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/plugin/notes/notes.js b/plugin/notes/notes.js index 88f98d6..46bf5de 100644 --- a/plugin/notes/notes.js +++ b/plugin/notes/notes.js @@ -50,7 +50,7 @@ var RevealNotes = (function() { /** * Posts the current slide data to the notes window */ - function post() { + function post(event) { var slideElement = Reveal.getCurrentSlide(), notesElement = slideElement.querySelector( 'aside.notes' ); @@ -64,6 +64,15 @@ var RevealNotes = (function() { state: Reveal.getState() }; + // Look for notes defined in a fragment, if it is a fragmentshown event + if (event && event.hasOwnProperty('fragment')) { + var innerNotes = event.fragment.querySelector( 'aside.notes' ); + + if ( innerNotes) { + notesElement = innerNotes; + } + } + // Look for notes defined in a slide attribute if( slideElement.hasAttribute( 'data-notes' ) ) { messageData.notes = slideElement.getAttribute( 'data-notes' ); |