From 271bae6b563ef1a625cf582934d589759cec7db7 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 18 Aug 2013 00:01:28 -0400 Subject: allow hiding of vertical slide stacks --- js/reveal.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'js/reveal.js') diff --git a/js/reveal.js b/js/reveal.js index 4ce8f3b..9c8b4b0 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1688,11 +1688,10 @@ var Reveal = (function(){ // Loops so that it measures 1 between the first and last slides distanceX = Math.abs( ( indexh - x ) % ( horizontalSlidesLength - viewDistance ) ) || 0; - if( verticalSlidesLength ) { + // Show the horizontal slide if it's within the view distance + horizontalSlide.style.display = distanceX > viewDistance ? 'none' : 'block'; - // Always show the vertical stack itself, even if its child - // slides are invisible - horizontalSlide.style.display = 'block'; + if( verticalSlidesLength ) { var oy = getPreviousVerticalIndex( horizontalSlide ); @@ -1705,11 +1704,6 @@ var Reveal = (function(){ } } - else { - - horizontalSlide.style.display = distanceX > viewDistance ? 'none' : 'block'; - - } } } -- cgit v1.2.3