Permalink
Browse files

Don't apply maxEmptySpace to preload nodes above so we don't mess up …

…scrolling
  • Loading branch information...
1 parent b503981 commit be68efc67b790f3150e215dd14941b44f1412c4e @kriszyp committed Apr 10, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 OnDemandList.js
View
@@ -246,8 +246,8 @@ return declare([List, _StoreMixin], {
}
}
- function adjustHeight(preload){
- preload.node.style.height = Math.min(preload.count * grid.rowHeight, grid.maxEmptySpace) + "px";
+ function adjustHeight(preload, noMax){
+ preload.node.style.height = Math.min(preload.count * grid.rowHeight, noMax ? Infinity : grid.maxEmptySpace) + "px";
}
// there can be multiple preloadNodes (if they split, or multiple queries are created),
// so we can traverse them until we find whatever is in the current viewport, making
@@ -307,7 +307,7 @@ return declare([List, _StoreMixin], {
// all of the nodes above were removed
offset = Math.min(preload.count, offset);
preload.previous.count += offset;
- adjustHeight(preload.previous);
+ adjustHeight(preload.previous, true);
preload.count -= offset;
preloadNode.rowIndex += offset;
queryRowsOverlap = 0;

0 comments on commit be68efc

Please sign in to comment.