aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorManuel Riezebosch <mriezebosch@gmail.com>2017-03-14 14:39:31 +0100
committerManuel Riezebosch <mriezebosch@gmail.com>2017-03-14 19:16:08 +0100
commit34f3773bf0e09e0300a5fcdf6926b3d4699aa71f (patch)
tree9bdf401521110e9bd6cb966b0952918ebcf1bc52 /js
parent7e6fb9ec87f10f4cc379240fc5824925ebf2bff3 (diff)
downloadfosdem-2018-presentation-34f3773bf0e09e0300a5fcdf6926b3d4699aa71f.tar
fosdem-2018-presentation-34f3773bf0e09e0300a5fcdf6926b3d4699aa71f.tar.gz
print-pdf layout slide contents to fit stretch elements
layout() and thereby layoutSlideContents() is never invoked when isPrintingPdf() is true so stretch elements are not sized correctly. This is ensured now by invoking the layoutSlideContents from SetupPDF(). There seems no need to scale down like in other PR's is suggested.
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 3267465..452c6bf 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -620,6 +620,9 @@
document.body.style.width = pageWidth + 'px';
document.body.style.height = pageHeight + 'px';
+ // Make sure stretch elements fit on slide
+ layoutSlideContents(slideWidth, slideHeight);
+
// Add each slide's index as attributes on itself, we need these
// indices to generate slide numbers below
toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ).forEach( function( hslide, h ) {