Explorar o código

Merge pull request #1434 from mikemellor11/master

stops parallax failing if only the single horizontal slide and multiple vertical
Hakim El Hattab %!s(int64=9) %!d(string=hai) anos
pai
achega
31550d09e4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      js/reveal.js

+ 1 - 1
js/reveal.js

@@ -2798,7 +2798,7 @@
 				horizontalOffsetMultiplier = config.parallaxBackgroundHorizontal;
 			}
 			else {
-				horizontalOffsetMultiplier = ( backgroundWidth - slideWidth ) / ( horizontalSlideCount-1 );
+				horizontalOffsetMultiplier = ( horizontalSlideCount-1  > 0) ? ( backgroundWidth - slideWidth ) / ( horizontalSlideCount-1 ) : 0;
 			}
 
 			horizontalOffset = horizontalOffsetMultiplier * indexh * -1;