aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2015-11-19 09:51:37 +0100
committerHakim El Hattab <hakim.elhattab@gmail.com>2015-11-19 09:51:37 +0100
commit31550d09e428092dd6fa91702d584d8e7b74bbeb (patch)
tree6e85408b365de16043bb8a48b10012e1b74629ce
parent833622edcd45a7721f7a76d93cc12a1284f60a0d (diff)
parent3e42929f9024acb0e3557c48b3ed5ad6ffcc0072 (diff)
downloadperl-software-in-gnu-guix-31550d09e428092dd6fa91702d584d8e7b74bbeb.tar
perl-software-in-gnu-guix-31550d09e428092dd6fa91702d584d8e7b74bbeb.tar.gz
Merge pull request #1434 from mikemellor11/master
stops parallax failing if only the single horizontal slide and multiple vertical
-rw-r--r--js/reveal.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/reveal.js b/js/reveal.js
index d2b2970..266df2c 100644
--- a/js/reveal.js
+++ b/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;