Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scrolling multi column jumps if ending item is n+1 % columnCount > 0 #32

Closed
DaveMBush opened this issue Apr 4, 2017 · 0 comments
Closed

Comments

@DaveMBush
Copy link
Contributor

At line 187 you check for maxStart in a way that assumes your items[] will always be evenly divisible by the number of items in each row. This causes the data to "jump" once you scroll to the bottom.

The fix for this is to adjust maxStart so that this doesn't happen.

        let maxStartEnd = end;
        let modEnd = end % d.itemsPerRow;
        if(modEnd) {
            maxStartEnd = end + d.itemsPerRow - modEnd;
        }
        var maxStart = Math.max(0, maxStartEnd - d.itemsPerCol * d.itemsPerRow - d.itemsPerRow);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant