ソースを参照

Refactor iScroll manager

@soyjavi 14 年 前
コミット
cba3c4ff87
1 ファイル変更2 行追加7 行削除
  1. 2 7
      src/view/Lungo.View.Scroll.js

+ 2 - 7
src/view/Lungo.View.Scroll.js

@@ -72,7 +72,7 @@ LUNGO.View.Scroll = (function(lng, undefined) {
         container.html(content);
 
         lng.View.Resize.scroll(scroll);
-        _refresh(id);
+        _saveScrollInCache(id);
     };
 
     /**
@@ -126,7 +126,7 @@ LUNGO.View.Scroll = (function(lng, undefined) {
             scroll[id] = new iScroll(id, properties);
         } else {
             scroll[id].refresh();
-            console.error('Refrescamos scroll[id]', id, scroll[id]);
+            scroll[id].scrollTo(0,0,300);
         }
         lng.Data.Cache.set(CACHE_KEY, scroll);
     };
@@ -147,11 +147,6 @@ LUNGO.View.Scroll = (function(lng, undefined) {
         return properties;
     };
 
-    var _refresh = function(id, properties) {
-        !lng.Data.Cache.get(CACHE_KEY, id) && _saveScrollInCache(id);
-        lng.Data.Cache.get(CACHE_KEY, id).refresh();
-    };
-
     return {
         create: create,
         update: update,