summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHakim El Hattab2018-01-25 09:59:04 +0100
committerHakim El Hattab2018-01-25 09:59:04 +0100
commite704b3ffc8eb55913ed6c8f80db0615b9a692b91 (patch)
tree5770250f98ae3cf54e56a88b765057d3caad1105
parentde746bb64242820dc688b17f47935911ba7bfa86 (diff)
fix bug where left/right arrows appeared when there were no horizontal slides
-rw-r--r--js/reveal.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/js/reveal.js b/js/reveal.js
index c9fa9f1..df63b89 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -3364,9 +3364,11 @@
var horizontalSlides = dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ),
verticalSlides = dom.wrapper.querySelectorAll( VERTICAL_SLIDES_SELECTOR );
+ var hasHorizontalSlides = horizontalSlides.length > 1;
+
var routes = {
- left: indexh > 0 || config.loop,
- right: indexh < horizontalSlides.length - 1 || config.loop,
+ left: indexh > 0 || ( config.loop && hasHorizontalSlides ),
+ right: indexh < horizontalSlides.length - 1 || ( config.loop && hasHorizontalSlides ),
up: indexv > 0,
down: indexv < verticalSlides.length - 1
};