ソースを参照

Delay in Router.back if device is a phone

soyjavi 13 年 前
コミット
c934f910d7
2 ファイル変更1 行追加2 行削除
  1. 1 1
      src/router/Lungo.Router.js
  2. 0 1
      src/view/Lungo.View.Aside.js

+ 1 - 1
src/router/Lungo.Router.js

@@ -88,7 +88,7 @@ Lungo.Router = (function(lng, undefined) {
     var back = function() {
         var current = lng.Element.Cache.section;
 
-        if (lng.Element.Cache.aside) {
+        if (lng.DEVICE == DEVICE.PHONE && lng.Element.Cache.aside && lng.Element.Cache.aside.hasClass(CLASS.SHOW)) {
             lng.View.Aside.hide();
             setTimeout(function() {
                 _back(current);

+ 0 - 1
src/view/Lungo.View.Aside.js

@@ -51,7 +51,6 @@ Lungo.View.Aside = (function(lng, undefined) {
      * @param  {string} Aside id
      */
     var toggle = function() {
-        console.error(lng.Element.Cache.aside);
         if (lng.Element.Cache.aside) {
             var is_visible = lng.Element.Cache.aside.hasClass(CLASS.SHOW);
             if (is_visible) {