Kaynağa Gözat

Fix error with router back

soyjavi 13 yıl önce
ebeveyn
işleme
88737e2372
3 değiştirilmiş dosya ile 4 ekleme ve 6 silme
  1. 0 2
      example/index.html
  2. 3 3
      packages/lungo/lungo.js
  3. 1 1
      src/router/Lungo.Router.js

+ 0 - 2
example/index.html

@@ -97,7 +97,6 @@
 
                 <li>
                     <a href="https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Flungo.tapquo.com%2F&text=@lungojs a framework for developers who want to design, build and share cross device apps" data-icon="brand twitter" target="_blank" class="button anchor theme" data-label="Tweet me"></a>
-
                 </li>
             </ul>
         </article>
@@ -169,7 +168,6 @@
 
     <!-- LungoJS - Sandbox App -->
     <script>
-        console.error(Lungo);
         Lungo.init({
             name: 'Kitchen Sink',
             version: '2.1',

Dosya farkı çok büyük olduğundan ihmal edildi
+ 3 - 3
packages/lungo/lungo.js


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

@@ -61,7 +61,6 @@ Lungo.Router = (function(lng, undefined) {
         article_id = lng.Core.parseUrl(article_id);
 
         var current =  lng.Element.Cache.article;
-
         if (_notCurrentTarget(article_id, current)) {
             section(section_id);
             var target = lng.Element.Cache.section.find(ELEMENT.ARTICLE + article_id);
@@ -117,6 +116,7 @@ Lungo.Router = (function(lng, undefined) {
         _assignTransition(target, target.data('transition-origin'));
         target.removeClass(CLASS.HIDE).addClass(CLASS.SHOW);
         lng.Element.Cache.section = target;
+        lng.Element.Cache.article = target.find(ELEMENT.ARTICLE + "." + CLASS.ACTIVE);
 
         _sectionTriggers(current, target);
     };