diff options
author | Hakim El Hattab | 2014-04-03 11:58:15 +0200 |
---|---|---|
committer | Hakim El Hattab | 2014-04-03 11:58:15 +0200 |
commit | 43bf882d0800c30f024b2c3e097d98dde65bc7c9 (patch) | |
tree | 5611d21e4ae8222d97dc9629c4ea013d4b9b1a87 /js/reveal.js | |
parent | f0f48bd9b06ffdd22f264ca5f644666347944ceb (diff) |
revamped and greatly simplified the layout of .slides
Diffstat (limited to 'js/reveal.js')
-rw-r--r-- | js/reveal.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/js/reveal.js b/js/reveal.js index 41be56b..b229453 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1118,7 +1118,11 @@ var Reveal = (function(){ } // Apply scale transform as a fallback else { - transformElement( dom.slides, 'translate(-50%, -50%) scale('+ scale +') translate(50%, 50%)' ); + dom.slides.style.left = '50%'; + dom.slides.style.top = '50%'; + dom.slides.style.bottom = 'auto'; + dom.slides.style.right = 'auto'; + transformElement( dom.slides, 'translate(-50%, -50%) scale('+ scale +')' ); } // Select all slides, vertical and horizontal @@ -1139,7 +1143,7 @@ var Reveal = (function(){ slide.style.top = 0; } else { - slide.style.top = Math.max( - ( getAbsoluteHeight( slide ) / 2 ) - slidePadding, -slideHeight / 2 ) + 'px'; + slide.style.top = Math.max( ( ( slideHeight - getAbsoluteHeight( slide ) ) / 2 ) - slidePadding, 0 ) + 'px'; } } else { |