Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.

Commit

Permalink
Fixed issue with optimized pagination which caused fast swipe gesture…
Browse files Browse the repository at this point in the history
…s to not work correctly.
  • Loading branch information
IjzerenHein committed Oct 13, 2015
1 parent 9dca230 commit 14e96cd
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/ScrollController.js
Original file line number Diff line number Diff line change
Expand Up @@ -1741,6 +1741,14 @@ define(function(require, exports, module) {
if (this.options.paginationMode === PaginationMode.PAGE) {
scrollStart = scrollOffset - this.options.extraBoundsSpace[0];
scrollEnd = scrollOffset + size[this._direction] + this.options.extraBoundsSpace[1];
if ((scrollOffset + size[this._direction]) < 0) {
scrollStart += size[this._direction];
scrollEnd += size[this._direction];
}
else if ((scrollOffset - size[this._direction]) > 0) {
scrollStart -= size[this._direction];
scrollEnd -= size[this._direction];
}
}
if (this.options.layoutAll) {
scrollStart = -1000000;
Expand Down Expand Up @@ -1774,7 +1782,7 @@ define(function(require, exports, module) {
this._postLayout(size, scrollOffset);
}

/*if (this.options.paginationMode === PaginationMode.PAGE) {
if (this.options.paginationMode === PaginationMode.PAGE) {
var node = this._nodes._first;
while (node) {
if (!node._invalidated && !node._removing) {
Expand All @@ -1785,7 +1793,7 @@ define(function(require, exports, module) {
if (this._nodes._contextState.addCount) {
console.log('adding nodes: ' + this._nodes._contextState.addCount);
}
}*/
}

// Mark non-invalidated nodes for removal
this._nodes.removeNonInvalidatedNodes(this.options.flowOptions.removeSpec);
Expand Down

0 comments on commit 14e96cd

Please sign in to comment.