From 82bd8e4fb07c789d54aca58198963e977ffbd589 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michael=20Ku=CC=88hnel?= Date: Fri, 19 Oct 2012 00:12:53 +0200 Subject: [PATCH] Renaming key within fragmentData Might be better to use one variable with different values. --- plugin/speakernotes/client.js | 4 ++-- plugin/speakernotes/notes.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin/speakernotes/client.js b/plugin/speakernotes/client.js index 757e6cd..156cb9a 100644 --- a/plugin/speakernotes/client.js +++ b/plugin/speakernotes/client.js @@ -11,7 +11,7 @@ // Fires when a fragment is shown Reveal.addEventListener( 'fragmentshown', function( event ) { var fragmentData = { - showFragment : true, + fragment : 'next', socketId : socketId }; socket.emit('fragmentchanged', fragmentData); @@ -20,7 +20,7 @@ // Fires when a fragment is hidden Reveal.addEventListener( 'fragmenthidden', function( event ) { var fragmentData = { - hideFragment : true, + fragment : 'previous', socketId : socketId }; socket.emit('fragmentchanged', fragmentData); diff --git a/plugin/speakernotes/notes.html b/plugin/speakernotes/notes.html index af42480..f3b610d 100644 --- a/plugin/speakernotes/notes.html +++ b/plugin/speakernotes/notes.html @@ -128,10 +128,10 @@ console.dir(data); if (data.socketId !== socketId) { return; } - if (data.showFragment === true) { + if (data.fragment === 'next') { currentSlide.contentWindow.Reveal.nextFragment(); } - else if (data.hideFragment === true) { + else if (data.fragment === 'previous') { currentSlide.contentWindow.Reveal.previousFragment(); } }); -- 2.26.2