]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
windowWidth variable added; indentation 6869/head
authorKristofer Krause <kris.krause@gmail.com>
Wed, 2 Sep 2015 17:24:10 +0000 (13:24 -0400)
committerKristofer Krause <kris.krause@gmail.com>
Wed, 2 Sep 2015 17:24:10 +0000 (13:24 -0400)
js/foundation/foundation.dropdown.js

index 87b119bb97955a718471ba5e49fdb533c99517a0..771a100e69dbfe0e44fbd6220432c430ea133f0f 100644 (file)
         //lets see if the panel will be off the screen
         //get the actual width of the page and store it
         var actualBodyWidth;
+        var windowWidth = window.innerWidth;
+        
         if (document.getElementsByClassName('row')[0]) {
           actualBodyWidth = document.getElementsByClassName('row')[0].clientWidth;
         } else {
-          actualBodyWidth = window.innerWidth;
+          actualBodyWidth = windowWidth;
         }
 
-        var actualMarginWidth = (window.innerWidth - actualBodyWidth) / 2;
+        var actualMarginWidth = (windowWidth - actualBodyWidth) / 2;
         var actualBoundary = actualBodyWidth;
 
         if (!this.hasClass('mega') && !s.ignore_repositioning) {
-                 var outerWidth = this.outerWidth();
-                 var o_left = t.offset().left;
+          var outerWidth = this.outerWidth();
+          var o_left = t.offset().left;
                  
           //miss top
           if (t.offset().top <= this.outerHeight()) {
             p.missTop = true;
-            actualBoundary = window.innerWidth - actualMarginWidth;
+            actualBoundary = windowWidth - actualMarginWidth;
             p.leftRightFlag = true;
           }