aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2016-04-28 11:31:11 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2016-04-28 11:31:11 +0200
commit55581035228aba9a0d061a6969797327c626b0bf (patch)
tree520f888eedea5809f99fde020d33aa009c0b54c9 /js
parentfcb6ea8385487194f257b9d556f9c98d0ec73301 (diff)
downloadfreenode-live-2017-presentation-55581035228aba9a0d061a6969797327c626b0bf.tar
freenode-live-2017-presentation-55581035228aba9a0d061a6969797327c626b0bf.tar.gz
make max pages per slide limit configurable
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/js/reveal.js b/js/reveal.js
index bbe2ca4..628c0b9 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -153,6 +153,10 @@
parallaxBackgroundHorizontal: null,
parallaxBackgroundVertical: null,
+ // The maximum number of pages a single slide can expand onto when printing
+ // to PDF, unlimited by default
+ pdfMaxPagesPerSlide: Number.POSITIVE_INFINITY,
+
// Number of slides away from the current that are visible
viewDistance: 3,
@@ -592,6 +596,9 @@
var contentHeight = slide.scrollHeight;
var numberOfPages = Math.max( Math.ceil( contentHeight / pageHeight ), 1 );
+ // Adhere to configured pages per slide limit
+ numberOfPages = Math.min( numberOfPages, config.pdfMaxPagesPerSlide );
+
// Center slides vertically
if( numberOfPages === 1 && config.center || slide.classList.contains( 'center' ) ) {
top = Math.max( ( pageHeight - contentHeight ) / 2, 0 );