فهرست منبع

修改adapter

smallqiang 5 سال پیش
والد
کامیت
1aabbda986
1فایلهای تغییر یافته به همراه44 افزوده شده و 0 حذف شده
  1. 44 0
      assets/scripts/utils/ListScrollViewAdapter.js

+ 44 - 0
assets/scripts/utils/ListScrollViewAdapter.js

@@ -1,5 +1,49 @@
 class ListScrollViewAdapter {
 
+    // private scrollview:cc.ScrollView;
+    // private mask:cc.Node;
+    // private content:cc.Node;
+    // private item_templates:Map<string, cc.Node>;
+    // private node_pools:Map<string, cc.Node[]>;
+    //
+    // private dir:number;
+    // private width:number;
+    // private height:number;
+    // private gap_x:number;
+    // private gap_y:number;
+    // private cb_host:any;
+    // private item_setter:(item:cc.Node, key:string, data:any, index:number)=>[number, number];
+    // private recycle_cb:(item:cc.Node, key:string)=>void;
+    // private scroll_to_end_cb:()=>void;
+    // private auto_scrolling:boolean;
+    // private items:ScrollItem[];
+    // private start_index:number;
+    // private stop_index:number;
+
+    scrollview = cc.ScrollView;
+    mask = cc.Node;
+    content = cc.Node;
+    item_templates = {};
+    node_pools = {};
+
+    dir = 0;
+    width = 0;
+    height = 0;
+    gap_x = 0;
+    gap_y = 0;
+    cb_host = 0;
+
+    item_setter = function(item, key, data, index) {};
+    recycle_cb = function (item, key) {};
+    scroll_to_end_cb = function() {};
+    auto_scrolling = false;
+    items = [];
+    start_index = 0;
+    stop_index = 0;
+
+    constructor(params) {
+
+    }
 }
 
 module.exports = ListScrollViewAdapter;