aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2014-04-26 10:22:18 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2014-04-26 10:22:18 +0200
commit704022d948b11fd8a03b09c8c82f15b9073aa2ec (patch)
tree03aa6e08dc1e9b9689b8bf194b57c8978c3136a4 /js
parent2f90e9198d2387ca0e7eeca082e710759c02c57a (diff)
downloadfreenode-live-2017-presentation-704022d948b11fd8a03b09c8c82f15b9073aa2ec.tar
freenode-live-2017-presentation-704022d948b11fd8a03b09c8c82f15b9073aa2ec.tar.gz
simplify pdf layout
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 523709c..0ede8de 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -444,12 +444,8 @@ var Reveal = (function(){
var contentHeight = getAbsoluteHeight( slide );
var numberOfPages = Math.ceil( contentHeight / pageHeight );
- // Top align when we're taller than a single page
- if( numberOfPages > 1 ) {
- top = 0;
- }
- // Center the slide vertically
- else if( config.center || slide.classList.contains( 'center' ) ) {
+ // Center slides vertically
+ if( numberOfPages === 1 && config.center || slide.classList.contains( 'center' ) ) {
top = Math.max( ( pageHeight - contentHeight ) / 2, 0 );
}
@@ -457,7 +453,6 @@ var Reveal = (function(){
slide.style.left = left + 'px';
slide.style.top = top + 'px';
slide.style.width = slideWidth + 'px';
- slide.style.height = ( slideHeight * numberOfPages ) + 'px';
// TODO Backgrounds need to be multiplied when the slide
// stretches over multiple pages