Skip to content

Commit

Permalink
fix(InfiniteGrid): change pos
Browse files Browse the repository at this point in the history
  • Loading branch information
Younkue committed Nov 24, 2017
1 parent cfe90b4 commit 2dfdf3b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/InfiniteGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,9 @@ class InfiniteGrid extends Component {
if (!rect) {
return;
}
const targetPos = rect[horizontal ? "left" : "top"] - isForward ? this._renderer.getViewSize() : 0;
const targetPos = isForward ?
rect[horizontal ? "left" : "top"] - this._renderer.getViewSize() :
rect[horizontal ? "right" : "bottom"];

if (isForward) {
if (scrollPos >= targetPos) {
Expand Down

0 comments on commit 2dfdf3b

Please sign in to comment.