fix vertical transition for vertically centered slides, vertical centering is now on by default (#70)

This commit is contained in:
Hakim El Hattab 2012-11-10 15:43:22 -05:00
parent 891a66b5c4
commit dce2d35a63
4 changed files with 18 additions and 18 deletions

View File

@ -72,7 +72,7 @@ Reveal.initialize({
overview: true, overview: true,
// Vertical centering of slides // Vertical centering of slides
center: false, center: true,
// Loop the presentation // Loop the presentation
loop: false, loop: false,

View File

@ -564,6 +564,11 @@ body {
opacity 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985); opacity 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
} }
.reveal .slides>section {
left: -50%;
top: -50%;
}
.reveal .slides>section.present, .reveal .slides>section.present,
.reveal .slides>section>section.present { .reveal .slides>section>section.present {
display: block; display: block;
@ -571,11 +576,6 @@ body {
opacity: 1; opacity: 1;
} }
.reveal .slides>section {
left: -50%;
top: -50%;
}
.reveal.center, .reveal.center,
.reveal.center .slides { .reveal.center .slides {
min-height: auto; min-height: auto;
@ -610,19 +610,19 @@ body {
display: block; display: block;
opacity: 0; opacity: 0;
-webkit-transform: translate3d(0, -50%, 0) rotateX(70deg) translate3d(0, -50%, 0); -webkit-transform: translate3d(0, -300px, 0) rotateX(70deg) translate3d(0, -300px, 0);
-moz-transform: translate3d(0, -50%, 0) rotateX(70deg) translate3d(0, -50%, 0); -moz-transform: translate3d(0, -300px, 0) rotateX(70deg) translate3d(0, -300px, 0);
-ms-transform: translate3d(0, -50%, 0) rotateX(70deg) translate3d(0, -50%, 0); -ms-transform: translate3d(0, -300px, 0) rotateX(70deg) translate3d(0, -300px, 0);
transform: translate3d(0, -50%, 0) rotateX(70deg) translate3d(0, -50%, 0); transform: translate3d(0, -300px, 0) rotateX(70deg) translate3d(0, -300px, 0);
} }
.reveal .slides>section>section.future { .reveal .slides>section>section.future {
display: block; display: block;
opacity: 0; opacity: 0;
-webkit-transform: translate3d(0, 50%, 0) rotateX(-70deg) translate3d(0, 50%, 0); -webkit-transform: translate3d(0, 300px, 0) rotateX(-70deg) translate3d(0, 300px, 0);
-moz-transform: translate3d(0, 50%, 0) rotateX(-70deg) translate3d(0, 50%, 0); -moz-transform: translate3d(0, 300px, 0) rotateX(-70deg) translate3d(0, 300px, 0);
-ms-transform: translate3d(0, 50%, 0) rotateX(-70deg) translate3d(0, 50%, 0); -ms-transform: translate3d(0, 300px, 0) rotateX(-70deg) translate3d(0, 300px, 0);
transform: translate3d(0, 50%, 0) rotateX(-70deg) translate3d(0, 50%, 0); transform: translate3d(0, 300px, 0) rotateX(-70deg) translate3d(0, 300px, 0);
} }

View File

@ -1,5 +1,5 @@
/*! /*!
* reveal.js 2.2 r43 * reveal.js 2.2 r44
* http://lab.hakim.se/reveal-js * http://lab.hakim.se/reveal-js
* MIT licensed * MIT licensed
* *
@ -31,7 +31,7 @@ var Reveal = (function(){
overview: true, overview: true,
// Vertical centering of slides // Vertical centering of slides
center: false, center: true,
// Loop the presentation // Loop the presentation
loop: false, loop: false,

4
js/reveal.min.js vendored
View File

@ -1,11 +1,11 @@
/*! /*!
* reveal.js 2.2 r43 * reveal.js 2.2 r44
* http://lab.hakim.se/reveal-js * http://lab.hakim.se/reveal-js
* MIT licensed * MIT licensed
* *
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
*/ */
var Reveal=(function(){var ar=".reveal .slides section",m=".reveal .slides>section",b=".reveal .slides>section.present>section",W={controls:true,progress:true,history:false,keyboard:true,overview:true,center:false,loop:false,autoSlide:0,mouseWheel:true,rollingLinks:true,theme:null,transition:"default",dependencies:[]},ae=W.autoSlide,n=0,e=0,A,J,at=[],f={},Z="WebkitPerspective" in document.body.style||"MozPerspective" in document.body.style||"msPerspective" in document.body.style||"OPerspective" in document.body.style||"perspective" in document.body.style,p="WebkitTransform" in document.body.style||"MozTransform" in document.body.style||"msTransform" in document.body.style||"OTransform" in document.body.style||"transform" in document.body.style,B=0,l=0,F=0,aj={startX:0,startY:0,startSpan:0,startCount:0,handled:false,threshold:80}; var Reveal=(function(){var ar=".reveal .slides section",m=".reveal .slides>section",b=".reveal .slides>section.present>section",W={controls:true,progress:true,history:false,keyboard:true,overview:true,center:true,loop:false,autoSlide:0,mouseWheel:true,rollingLinks:true,theme:null,transition:"default",dependencies:[]},ae=W.autoSlide,n=0,e=0,A,J,at=[],f={},Z="WebkitPerspective" in document.body.style||"MozPerspective" in document.body.style||"msPerspective" in document.body.style||"OPerspective" in document.body.style||"perspective" in document.body.style,p="WebkitTransform" in document.body.style||"MozTransform" in document.body.style||"msTransform" in document.body.style||"OTransform" in document.body.style||"transform" in document.body.style,B=0,l=0,F=0,aj={startX:0,startY:0,startSpan:0,startCount:0,handled:false,threshold:80};
function j(au){if((!p&&!Z)){document.body.setAttribute("class","no-transforms");return;}v(W,au);d();ab();}function S(){f.theme=document.querySelector("#theme"); function j(au){if((!p&&!Z)){document.body.setAttribute("class","no-transforms");return;}v(W,au);d();ab();}function S(){f.theme=document.querySelector("#theme");
f.wrapper=document.querySelector(".reveal");if(!f.wrapper.querySelector(".progress")&&W.progress){var ax=document.createElement("div");ax.classList.add("progress"); f.wrapper=document.querySelector(".reveal");if(!f.wrapper.querySelector(".progress")&&W.progress){var ax=document.createElement("div");ax.classList.add("progress");
ax.innerHTML="<span></span>";f.wrapper.appendChild(ax);}if(!f.wrapper.querySelector(".controls")&&W.controls){var aw=document.createElement("aside");aw.classList.add("controls"); ax.innerHTML="<span></span>";f.wrapper.appendChild(ax);}if(!f.wrapper.querySelector(".controls")&&W.controls){var aw=document.createElement("aside");aw.classList.add("controls");