Преглед на файлове

fix looped view distance calculation

Hakim El Hattab преди 10 години
родител
ревизия
2ed1d6fb5d
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      js/reveal.js

+ 1 - 1
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