From: Michael Kühnel Date: Thu, 18 Oct 2012 22:07:26 +0000 (+0200) Subject: get 'fragmentdata' and react by showing/hiding the corresponding fragments X-Git-Tag: 2.1.0~10^2~1^2~7 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=d02e64adbd986d44dd02a70aec54aac606cdf7ab;p=reveal.js.git get 'fragmentdata' and react by showing/hiding the corresponding fragments --- diff --git a/plugin/speakernotes/notes.html b/plugin/speakernotes/notes.html index c051879..af42480 100644 --- a/plugin/speakernotes/notes.html +++ b/plugin/speakernotes/notes.html @@ -110,6 +110,7 @@ socket.on('slidedata', function(data) { // ignore data from sockets that aren't ours + console.dir(data); if (data.socketId !== socketId) { return; } if (data.markdown) { @@ -122,6 +123,18 @@ currentSlide.contentWindow.Reveal.slide(data.indexh, data.indexv); nextSlide.contentWindow.Reveal.slide(data.nextindexh, data.nextindexv); }); + socket.on('fragmentdata', function(data) { + // ignore data from sockets that aren't ours + console.dir(data); + if (data.socketId !== socketId) { return; } + + if (data.showFragment === true) { + currentSlide.contentWindow.Reveal.nextFragment(); + } + else if (data.hideFragment === true) { + currentSlide.contentWindow.Reveal.previousFragment(); + } + });