Prechádzať zdrojové kódy

Delay (250ms) section.show when a aside is visible

soyjavi 13 rokov pred
rodič
commit
a61ec7edef
1 zmenil súbory, kde vykonal 8 pridanie a 1 odobranie
  1. 8 1
      src/boot/Lungo.Boot.Events.js

+ 8 - 1
src/boot/Lungo.Boot.Events.js

@@ -69,11 +69,18 @@ Lungo.Boot.Events = (function(lng, undefined) {
 
     var _goSection = function(id) {
         _hideAsideIfNecesary();
+
         id = lng.Core.parseUrl(id);
         if (id === '#back') {
             lng.Router.back();
         } else {
-            lng.Router.section(id);
+            if (lng.Element.Current.aside.hasClass(CLASS.SHOW)) {
+                setTimeout(function(){
+                    lng.Router.section(id);
+                }, 250);
+            } else {
+                lng.Router.section(id);
+            }
         }
     };