fix padding and duplicate background on vertical slides in overview
authorHakim El Hattab <hakim.elhattab@gmail.com>
Sat, 24 Dec 2011 05:52:35 +0000 (21:52 -0800)
committerHakim El Hattab <hakim.elhattab@gmail.com>
Sat, 24 Dec 2011 05:52:35 +0000 (21:52 -0800)
css/main.css
js/reveal.js

index 339889a573f1d8c8d1141418609351b68da93a77..75b113586b17e6340e90dd6ed8982b1fe1ec35f5 100644 (file)
@@ -261,12 +261,19 @@ h1 {
 }
 
 
+/*********************************************
+ * OVERVIEW
+ *********************************************/
+
 .overview #main section {
-       padding: 20px;
+       padding: 20px 0;
        opacity: 1;
        cursor: pointer;
        background: rgba(0,0,0,0.1);
 }
+.overview #main section.present>section.present {
+       background: none;
+}
 .overview #main section>section {
        opacity: 1;
        cursor: pointer;
index 9d14cbde304bbcc0a03119f9e6addeb896c60452..d751a03364183c653339b283d1141f32aba18a14 100644 (file)
@@ -118,8 +118,6 @@ var Reveal = (function(){
                dom.controlsUp.addEventListener('click', preventAndForward( navigateUp ), false);
                dom.controlsDown.addEventListener('click', preventAndForward( navigateDown ), false);
 
-
-
                // Fall back on default options
                config.rollingLinks = options.rollingLinks === undefined ? true : options.rollingLinks;
                config.controls = options.controls === undefined ? false : options.controls;
@@ -172,7 +170,6 @@ var Reveal = (function(){
         * @param {Object} event
         */
        function onDocumentKeyDown( event ) {
-               
                // FFT: Use document.querySelector( ':focus' ) === null 
                // instead of checking contentEditable?
 
@@ -247,11 +244,9 @@ var Reveal = (function(){
                        }
                        
                        slide();
-                       
                }
        }
        
-       
        /**
         * Handler for the window level 'hashchange' event.
         * 
@@ -410,7 +405,9 @@ var Reveal = (function(){
 
                                // Optimization; hide all slides that are three or more steps 
                                // away from the present slide
-                               // slide.style.display = Math.abs( index - i ) > 3 ? 'none' : 'block';
+                               if( overviewIsActive() === false ) {
+                                       slide.style.display = Math.abs( index - i ) > 3 ? 'none' : 'block';
+                               }
 
                                if( i < index ) {
                                        // Any element previous to index is given the 'past' class