forked from campiaperti/infra
simplify logic for finding slide backgrounds
This commit is contained in:
parent
28d6a7775b
commit
4022cbfe84
1 changed files with 4 additions and 17 deletions
21
js/reveal.js
21
js/reveal.js
|
@ -3869,25 +3869,12 @@
|
||||||
*/
|
*/
|
||||||
function getSlideBackground( x, y ) {
|
function getSlideBackground( x, y ) {
|
||||||
|
|
||||||
// When printing to PDF the slide backgrounds are nested
|
var slide = getSlide( x, y );
|
||||||
// inside of the slides
|
if( slide ) {
|
||||||
if( isPrintingPDF() ) {
|
return slide.slideBackgroundElement;
|
||||||
var slide = getSlide( x, y );
|
|
||||||
if( slide ) {
|
|
||||||
return slide.slideBackgroundElement;
|
|
||||||
}
|
|
||||||
|
|
||||||
return undefined;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var horizontalBackground = dom.wrapper.querySelectorAll( '.backgrounds>.slide-background' )[ x ];
|
return undefined;
|
||||||
var verticalBackgrounds = horizontalBackground && horizontalBackground.querySelectorAll( '.slide-background' );
|
|
||||||
|
|
||||||
if( verticalBackgrounds && verticalBackgrounds.length && typeof y === 'number' ) {
|
|
||||||
return verticalBackgrounds ? verticalBackgrounds[ y ] : undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
return horizontalBackground;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue