diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2014-05-10 11:18:13 +0200 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2014-05-10 11:18:13 +0200 |
commit | 54c3c23e363e99772be4f0db30b177c2bffc1b39 (patch) | |
tree | 4ad8acd9b82309efc126d497eb181445387b63d0 /js | |
parent | 06ca536ae1b0f65b58411aab947d70951862c2a1 (diff) | |
download | perl-software-in-gnu-guix-54c3c23e363e99772be4f0db30b177c2bffc1b39.tar perl-software-in-gnu-guix-54c3c23e363e99772be4f0db30b177c2bffc1b39.tar.gz |
fix bug in retrieval or background images while in pdf mode
Diffstat (limited to 'js')
-rw-r--r-- | js/reveal.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/js/reveal.js b/js/reveal.js index da43738..8c0889b 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -451,8 +451,8 @@ var slideSize = getComputedSlideSize( window.innerWidth, window.innerHeight ); // Dimensions of the PDF pages - var pageWidth = Math.ceil( slideSize.width * ( 1 + config.margin ) ), - pageHeight = Math.ceil( slideSize.height * ( 1 + config.margin ) ); + var pageWidth = Math.floor( slideSize.width * ( 1 + config.margin ) ), + pageHeight = Math.floor( slideSize.height * ( 1 + config.margin ) ); // Dimensions of slides within the pages var slideWidth = slideSize.width, @@ -2756,7 +2756,14 @@ // inside of the slides if( isPrintingPDF() ) { var slide = getSlide( x, y ); - return slide ? slide.querySelector( '.slide-background' ) : undefined; + if( slide ) { + var background = slide.querySelector( '.slide-background' ); + if( background && background.parentNode === slide ) { + return background; + } + } + + return undefined; } var horizontalBackground = document.querySelectorAll( '.backgrounds>.slide-background' )[ x ]; |