documentation cleanup inspired by 23597
authorSteve Hackbarth <stephenhackbarth@gmail.com>
Fri, 9 May 2014 18:50:43 +0000 (14:50 -0400)
committerSteve Hackbarth <stephenhackbarth@gmail.com>
Fri, 9 May 2014 18:50:43 +0000 (14:50 -0400)
lib/enyo-x/source/views/list.js

index a55b59f..8592f98 100644 (file)
@@ -5,8 +5,9 @@ trailing:true, white:true, strict:false*/
 
 (function () {
 
+  var PAD_UNTIL = 50;
   var ROWS_PER_FETCH = 50;
-  var FETCH_TRIGGER = 100;
+  var FETCH_TRIGGER = ROWS_PER_FETCH * 2; // we get two chunks for free, then we have to fetch
 
   /**
     @name XV.List
@@ -382,7 +383,7 @@ trailing:true, white:true, strict:false*/
 
       // Hack: Solves scroll problem for small number of rows
       // but doesn't seem quite right
-      rowsPerPage = count && 50 > count ? count : 50;
+      rowsPerPage = count && PAD_UNTIL > count ? count : PAD_UNTIL;
       if (rowsPerPage !== this.rowsPerPage) {
         this.setRowsPerPage(rowsPerPage);
       }