aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2017-11-21 15:29:40 +0100
committerHakim El Hattab <hakim.elhattab@gmail.com>2017-11-21 15:29:40 +0100
commit4022cbfe84fc09e2978b5a5b8dc6d3bb693dd178 (patch)
tree7f7c81360170a553628dfce31a29b47a540994ca /js
parent28d6a7775bfa133700e70fc2338ff6483558ecf2 (diff)
downloadperl-software-in-gnu-guix-4022cbfe84fc09e2978b5a5b8dc6d3bb693dd178.tar
perl-software-in-gnu-guix-4022cbfe84fc09e2978b5a5b8dc6d3bb693dd178.tar.gz
simplify logic for finding slide backgrounds
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js21
1 files changed, 4 insertions, 17 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 5de30ff..72c4373 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -3869,25 +3869,12 @@
*/
function getSlideBackground( x, y ) {
- // When printing to PDF the slide backgrounds are nested
- // inside of the slides
- if( isPrintingPDF() ) {
- var slide = getSlide( x, y );
- if( slide ) {
- return slide.slideBackgroundElement;
- }
-
- return undefined;
- }
-
- var horizontalBackground = dom.wrapper.querySelectorAll( '.backgrounds>.slide-background' )[ x ];
- var verticalBackgrounds = horizontalBackground && horizontalBackground.querySelectorAll( '.slide-background' );
-
- if( verticalBackgrounds && verticalBackgrounds.length && typeof y === 'number' ) {
- return verticalBackgrounds ? verticalBackgrounds[ y ] : undefined;
+ var slide = getSlide( x, y );
+ if( slide ) {
+ return slide.slideBackgroundElement;
}
- return horizontalBackground;
+ return undefined;
}