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

Commit

Permalink
Fixed layout-issue with scrolling when margins are used
Browse files Browse the repository at this point in the history
  • Loading branch information
IjzerenHein committed Jan 22, 2015
1 parent 6aa25f9 commit c85bf52
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/layouts/CollectionLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ define(function(require, exports, module) {
//
// Process all next nodes
//
offset = context.scrollOffset + margin[alignment];
bound = context.scrollEnd + margin[alignment];
offset = context.scrollOffset + (alignment ? 0 : margin[alignment]);
bound = context.scrollEnd + (alignment ? 0 : margin[alignment]);
lineOffset = 0;
lineNodes = [];
while (offset < bound) {
Expand All @@ -235,8 +235,8 @@ define(function(require, exports, module) {
//
// Process previous nodes
//
offset = context.scrollOffset + margin[alignment];
bound = context.scrollStart + margin[alignment];
offset = context.scrollOffset + (alignment ? margin[alignment] : 0);
bound = context.scrollStart + (alignment ? margin[alignment] : 0);
lineOffset = 0;
lineNodes = [];
while (offset > bound) {
Expand Down

0 comments on commit c85bf52

Please sign in to comment.