aboutsummaryrefslogtreecommitdiff
path: root/js/reveal.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/reveal.js')
-rw-r--r--js/reveal.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/reveal.js b/js/reveal.js
index d0c8272..9b03d5a 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -528,6 +528,8 @@ var Reveal = (function(){
createBackground( slidev, backgroundStack );
}
+ backgroundStack.classList.add( 'stack' );
+
} );
} );
@@ -2279,8 +2281,14 @@ var Reveal = (function(){
*/
function showSlide( slide ) {
+ // Show the slide element
slide.style.display = 'block';
+ // Show the corresponding background element
+ var indices = getIndices( slide );
+ var background = getSlideBackground( indices.h, indices.v );
+ background.style.display = 'block';
+
// Media elements with data-src attributes
toArray( slide.querySelectorAll( 'img[data-src], video[data-src], audio[data-src], iframe[data-src]' ) ).forEach( function( element ) {
element.setAttribute( 'src', element.getAttribute( 'data-src' ) );
@@ -2312,8 +2320,14 @@ var Reveal = (function(){
*/
function hideSlide( slide ) {
+ // Hide the slide element
slide.style.display = 'none';
+ // Hide the corresponding background element
+ var indices = getIndices( slide );
+ var background = getSlideBackground( indices.h, indices.v );
+ background.style.display = 'none';
+
}
/**
@@ -2618,6 +2632,9 @@ var Reveal = (function(){
// Now that we know which the horizontal slide is, get its index
h = Math.max( horizontalSlides.indexOf( slideh ), 0 );
+ // Assume we're not vertical
+ v = 0;
+
// If this is a vertical slide, grab the vertical index
if( isVertical ) {
v = Math.max( toArray( slide.parentNode.querySelectorAll( 'section' ) ).indexOf( slide ), 0 );