|
@@ -3200,8 +3200,7 @@
|
|
|
|
|
|
|
|
|
|
// Show the corresponding background element
|
|
// Show the corresponding background element
|
|
- var indices = getIndices( slide );
|
|
|
|
- var background = getSlideBackground( indices.h, indices.v );
|
|
|
|
|
|
+ var background = getSlideBackground( slide );
|
|
if( background ) {
|
|
if( background ) {
|
|
background.style.display = 'block';
|
|
background.style.display = 'block';
|
|
|
|
|
|
@@ -3288,8 +3287,7 @@
|
|
slide.style.display = 'none';
|
|
slide.style.display = 'none';
|
|
|
|
|
|
// Hide the corresponding background element
|
|
// Hide the corresponding background element
|
|
- var indices = getIndices( slide );
|
|
|
|
- var background = getSlideBackground( indices.h, indices.v );
|
|
|
|
|
|
+ var background = getSlideBackground( slide );
|
|
if( background ) {
|
|
if( background ) {
|
|
background.style.display = 'none';
|
|
background.style.display = 'none';
|
|
}
|
|
}
|
|
@@ -3858,13 +3856,14 @@
|
|
* defined, have a background element so as long as the
|
|
* defined, have a background element so as long as the
|
|
* index is valid an element will be returned.
|
|
* index is valid an element will be returned.
|
|
*
|
|
*
|
|
- * @param {number} x Horizontal background index
|
|
|
|
|
|
+ * @param {mixed} x Horizontal background index OR a slide
|
|
|
|
+ * HTML element
|
|
* @param {number} y Vertical background index
|
|
* @param {number} y Vertical background index
|
|
* @return {(HTMLElement[]|*)}
|
|
* @return {(HTMLElement[]|*)}
|
|
*/
|
|
*/
|
|
function getSlideBackground( x, y ) {
|
|
function getSlideBackground( x, y ) {
|
|
|
|
|
|
- var slide = getSlide( x, y );
|
|
|
|
|
|
+ var slide = typeof x === 'number' ? getSlide( x, y ) : x;
|
|
if( slide ) {
|
|
if( slide ) {
|
|
return slide.slideBackgroundElement;
|
|
return slide.slideBackgroundElement;
|
|
}
|
|
}
|