Permalink
Browse files

Adjust the height of preloads based on the relative change in row cou…

…nt so as to preserve adjusted heights
  • Loading branch information...
1 parent 82d9e26 commit 8be923fd9021ba8b8ac9cacb047a9e1fada17187 @kriszyp committed Jul 17, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 OnDemandList.js
View
7 OnDemandList.js
@@ -404,10 +404,15 @@ return declare([List, _StoreMixin], {
// (not uncommon when total counts are estimated for db perf reasons)
Deferred.when(results.total || results.length, function(total){
// recalculate the count
+ var oldCount = below.count;
below.count = total - below.node.rowIndex;
below.node.blocksMove = below.count != 0;
// readjust the height
- adjustHeight(below);
+ if(grid.maxEmptySpace < Infinity){
+ adjustHeight(below);
+ }else{
+ below.node.style.height = (below.node.offsetHeight + (below.count - oldCount) * grid.rowHeight) + "px";
+ }
});
}
grid._throttledProcessScroll();

0 comments on commit 8be923f

Please sign in to comment.