From 2ed1d6fb5dd7aa24918342197554fd7a6fbf6797 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 9 Feb 2015 09:35:05 +0100 Subject: [PATCH] fix looped view distance calculation --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/reveal.js b/js/reveal.js index fdf32044..3c06f8de 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2399,7 +2399,7 @@ // If the presentation is looped, distance should measure // 1 between the first and last slides if( config.loop ) { - distanceX = distanceX % ( horizontalSlidesLength - viewDistance ); + distanceX = Math.abs( ( ( indexh || 0 ) - x ) % ( horizontalSlidesLength - viewDistance ) ) || 0; } // Show the horizontal slide if it's within the view distance