From: Hakim El Hattab Date: Sat, 10 Nov 2012 20:43:22 +0000 (-0500) Subject: fix vertical transition for vertically centered slides, vertical centering is now... X-Git-Tag: 2.2.0~69 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=dce2d35a633ad8f7fd3390f03293acc7e10e7c47;p=reveal.js.git fix vertical transition for vertically centered slides, vertical centering is now on by default (#70) --- diff --git a/README.md b/README.md index ef3e406..91bc452 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ Reveal.initialize({ overview: true, // Vertical centering of slides - center: false, + center: true, // Loop the presentation loop: false, diff --git a/css/reveal.css b/css/reveal.css index c08fb1b..7192a2d 100644 --- a/css/reveal.css +++ b/css/reveal.css @@ -564,6 +564,11 @@ body { 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>section.present { display: block; @@ -571,11 +576,6 @@ body { opacity: 1; } -.reveal .slides>section { - left: -50%; - top: -50%; -} - .reveal.center, .reveal.center .slides { min-height: auto; @@ -610,19 +610,19 @@ body { display: block; opacity: 0; - -webkit-transform: translate3d(0, -50%, 0) rotateX(70deg) translate3d(0, -50%, 0); - -moz-transform: translate3d(0, -50%, 0) rotateX(70deg) translate3d(0, -50%, 0); - -ms-transform: translate3d(0, -50%, 0) rotateX(70deg) translate3d(0, -50%, 0); - 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, -300px, 0) rotateX(70deg) translate3d(0, -300px, 0); + -ms-transform: translate3d(0, -300px, 0) rotateX(70deg) translate3d(0, -300px, 0); + transform: translate3d(0, -300px, 0) rotateX(70deg) translate3d(0, -300px, 0); } .reveal .slides>section>section.future { display: block; opacity: 0; - -webkit-transform: translate3d(0, 50%, 0) rotateX(-70deg) translate3d(0, 50%, 0); - -moz-transform: translate3d(0, 50%, 0) rotateX(-70deg) translate3d(0, 50%, 0); - -ms-transform: translate3d(0, 50%, 0) rotateX(-70deg) translate3d(0, 50%, 0); - 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, 300px, 0) rotateX(-70deg) translate3d(0, 300px, 0); + -ms-transform: translate3d(0, 300px, 0) rotateX(-70deg) translate3d(0, 300px, 0); + transform: translate3d(0, 300px, 0) rotateX(-70deg) translate3d(0, 300px, 0); } diff --git a/js/reveal.js b/js/reveal.js index 2f81235..0bfeef5 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1,5 +1,5 @@ /*! - * reveal.js 2.2 r43 + * reveal.js 2.2 r44 * http://lab.hakim.se/reveal-js * MIT licensed * @@ -31,7 +31,7 @@ var Reveal = (function(){ overview: true, // Vertical centering of slides - center: false, + center: true, // Loop the presentation loop: false, diff --git a/js/reveal.min.js b/js/reveal.min.js index 4b8b8d6..cb7b18a 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -1,11 +1,11 @@ /*! - * reveal.js 2.2 r43 + * reveal.js 2.2 r44 * http://lab.hakim.se/reveal-js * MIT licensed * * 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"); f.wrapper=document.querySelector(".reveal");if(!f.wrapper.querySelector(".progress")&&W.progress){var ax=document.createElement("div");ax.classList.add("progress"); ax.innerHTML="";f.wrapper.appendChild(ax);}if(!f.wrapper.querySelector(".controls")&&W.controls){var aw=document.createElement("aside");aw.classList.add("controls");