aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Mellor <mike.mellor@f-grp.com>2015-11-13 15:13:30 +0000
committerMike Mellor <mike.mellor@f-grp.com>2015-11-13 15:13:30 +0000
commit3e42929f9024acb0e3557c48b3ed5ad6ffcc0072 (patch)
tree39d9a80251768af9657b5df3b278d9fea1dcc44a
parent822a9c937c902807e376713760e1f07845951d5a (diff)
downloadfosdem-2018-presentation-3e42929f9024acb0e3557c48b3ed5ad6ffcc0072.tar
fosdem-2018-presentation-3e42929f9024acb0e3557c48b3ed5ad6ffcc0072.tar.gz
check for 0 division, 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;