From cc4bca8004872944170765b079cae711d1dc7792 Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 14 Sep 2016 16:03:52 +0200 Subject: [PATCH] execute callbacks on presentation events --- www/slide/slide.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/www/slide/slide.js b/www/slide/slide.js index 6c473f5d6..1e2391483 100644 --- a/www/slide/slide.js +++ b/www/slide/slide.js @@ -28,15 +28,11 @@ define([ }; var change = function (oldIndex, newIndex) { - if (oldIndex === newIndex) { - return false; - } if (Slide.changeHandlers.length) { Slide.changeHandlers.some(function (f, i) { // HERE f(oldIndex, newIndex, Slide.content.length); }); - return true; } }; @@ -132,7 +128,9 @@ define([ Slide.content = content.split(/\n\s*\-\-\-\s*\n/).filter(truthy); if (old !== Slide.content[Slide.index]) { draw(Slide.index); + return; } + change(Slide.lastIndex, Slide.index); }; var left = Slide.left = function () {