1
0
Fork 0

fix bug where left/right arrows appeared when there were no horizontal slides

This commit is contained in:
Hakim El Hattab 2018-01-25 09:59:04 +01:00
parent de746bb642
commit e704b3ffc8
1 changed files with 4 additions and 2 deletions

View File

@ -3364,9 +3364,11 @@
var horizontalSlides = dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ), var horizontalSlides = dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ),
verticalSlides = dom.wrapper.querySelectorAll( VERTICAL_SLIDES_SELECTOR ); verticalSlides = dom.wrapper.querySelectorAll( VERTICAL_SLIDES_SELECTOR );
var hasHorizontalSlides = horizontalSlides.length > 1;
var routes = { var routes = {
left: indexh > 0 || config.loop, left: indexh > 0 || ( config.loop && hasHorizontalSlides ),
right: indexh < horizontalSlides.length - 1 || config.loop, right: indexh < horizontalSlides.length - 1 || ( config.loop && hasHorizontalSlides ),
up: indexv > 0, up: indexv > 0,
down: indexv < verticalSlides.length - 1 down: indexv < verticalSlides.length - 1
}; };