aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2014-06-25 11:44:10 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2014-06-25 11:44:10 +0200
commit8cb8229aac9ee81e06c8ee52d7ffa291e61795c4 (patch)
tree93249a39089ac3e8f7056f14d27f36c44081566e /js
parent0d9563b59809852c71424ad7f41fbea4a161d47a (diff)
downloadfreenode-live-2017-presentation-8cb8229aac9ee81e06c8ee52d7ffa291e61795c4.tar
freenode-live-2017-presentation-8cb8229aac9ee81e06c8ee52d7ffa291e61795c4.tar.gz
prevent incorrect showSlide calls at startup
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 0cb82cf..ae35bf0 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -2169,7 +2169,7 @@
verticalSlidesLength = verticalSlides.length;
// Loops so that it measures 1 between the first and last slides
- distanceX = Math.abs( ( indexh - x ) % ( horizontalSlidesLength - viewDistance ) ) || 0;
+ distanceX = Math.abs( ( ( indexh || 0 ) - x ) % ( horizontalSlidesLength - viewDistance ) ) || 0;
// Show the horizontal slide if it's within the view distance
if( distanceX < viewDistance ) {
@@ -2186,7 +2186,7 @@
for( var y = 0; y < verticalSlidesLength; y++ ) {
var verticalSlide = verticalSlides[y];
- distanceY = x === indexh ? Math.abs( indexv - y ) : Math.abs( y - oy );
+ distanceY = x === ( indexh || 0 ) ? Math.abs( ( indexv || 0 ) - y ) : Math.abs( y - oy );
if( distanceX + distanceY < viewDistance ) {
showSlide( verticalSlide );