1
0
mirror of https://github.com/hakimel/reveal.js.git synced 2025-07-31 03:40:28 +02:00

Merge pull request #1434 from mikemellor11/master

stops parallax failing if only the single horizontal slide and multiple vertical
This commit is contained in:
Hakim El Hattab
2015-11-19 09:51:37 +01:00

View File

@@ -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;