simplify pdf layout
This commit is contained in:
parent
2f90e9198d
commit
704022d948
1 changed files with 2 additions and 7 deletions
|
@ -444,12 +444,8 @@ var Reveal = (function(){
|
||||||
var contentHeight = getAbsoluteHeight( slide );
|
var contentHeight = getAbsoluteHeight( slide );
|
||||||
var numberOfPages = Math.ceil( contentHeight / pageHeight );
|
var numberOfPages = Math.ceil( contentHeight / pageHeight );
|
||||||
|
|
||||||
// Top align when we're taller than a single page
|
// Center slides vertically
|
||||||
if( numberOfPages > 1 ) {
|
if( numberOfPages === 1 && config.center || slide.classList.contains( 'center' ) ) {
|
||||||
top = 0;
|
|
||||||
}
|
|
||||||
// Center the slide vertically
|
|
||||||
else if( config.center || slide.classList.contains( 'center' ) ) {
|
|
||||||
top = Math.max( ( pageHeight - contentHeight ) / 2, 0 );
|
top = Math.max( ( pageHeight - contentHeight ) / 2, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -457,7 +453,6 @@ var Reveal = (function(){
|
||||||
slide.style.left = left + 'px';
|
slide.style.left = left + 'px';
|
||||||
slide.style.top = top + 'px';
|
slide.style.top = top + 'px';
|
||||||
slide.style.width = slideWidth + 'px';
|
slide.style.width = slideWidth + 'px';
|
||||||
slide.style.height = ( slideHeight * numberOfPages ) + 'px';
|
|
||||||
|
|
||||||
// TODO Backgrounds need to be multiplied when the slide
|
// TODO Backgrounds need to be multiplied when the slide
|
||||||
// stretches over multiple pages
|
// stretches over multiple pages
|
||||||
|
|
Loading…
Reference in a new issue