remove needless condition

This commit is contained in:
Hakim El Hattab 2014-04-23 21:18:13 +02:00
parent 646203f038
commit a49a78c454

View File

@ -412,10 +412,11 @@ var Reveal = (function(){
*/ */
function setupPDF() { function setupPDF() {
// Dimensions of the content // Dimensions of the PDF pages
var pageWidth = 1122, var pageWidth = 1122,
pageHeight = 867; pageHeight = 867;
// Dimensions of slides within the pages
var slideWidth = 960, var slideWidth = 960,
slideHeight = 700; slideHeight = 700;
@ -428,12 +429,9 @@ var Reveal = (function(){
// Vertical stacks are not centred since their section // Vertical stacks are not centred since their section
// children will be // children will be
if( slide.classList.contains( 'stack' ) ) { if( slide.classList.contains( 'stack' ) === false ) {
slide.style.top = 0; var left = ( pageWidth - slideWidth ) / 2,
} top = ( pageHeight - slideHeight ) / 2;
else {
var left = ( pageWidth - slideWidth ) / 2;
var top = ( pageHeight - slideHeight ) / 2;
if( config.center || slide.classList.contains( 'center' ) ) { if( config.center || slide.classList.contains( 'center' ) ) {
top = Math.max( ( pageHeight - getAbsoluteHeight( slide ) ) / 2, 0 ); top = Math.max( ( pageHeight - getAbsoluteHeight( slide ) ) / 2, 0 );