ensure pdf pages are never zero-height

This commit is contained in:
Hakim El Hattab 2014-04-29 13:30:56 +02:00
parent eec14b9c92
commit 2ac0a55ccf
2 changed files with 2 additions and 1 deletions

View file

@ -119,6 +119,7 @@ ul, ol, div, p {
margin: 0 !important; margin: 0 !important;
padding: 0 !important; padding: 0 !important;
box-sizing: border-box !important; box-sizing: border-box !important;
min-height: 1px;
opacity: 1 !important; opacity: 1 !important;

View file

@ -468,7 +468,7 @@
top = ( pageHeight - slideHeight ) / 2; top = ( pageHeight - slideHeight ) / 2;
var contentHeight = getAbsoluteHeight( slide ); var contentHeight = getAbsoluteHeight( slide );
var numberOfPages = Math.ceil( contentHeight / pageHeight ); var numberOfPages = Math.max( Math.ceil( contentHeight / pageHeight ), 1 );
// Center slides vertically // Center slides vertically
if( numberOfPages === 1 && config.center || slide.classList.contains( 'center' ) ) { if( numberOfPages === 1 && config.center || slide.classList.contains( 'center' ) ) {