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

_getGridHeight() returns truncated height due to rounding down #10

Open
JonRossway opened this issue Aug 31, 2016 · 1 comment
Open

Comments

@JonRossway
Copy link

JonRossway commented Aug 31, 2016

Edit: previous issue was fixed

@JonRossway
Copy link
Author

I think you mean to round the pixel value at the end, otherwise you'll end up with a missing row when Math.floor rounds down. I'd suggest this instead:

Math.floor((this.props.entries.length / this.state.itemDimensions.itemsPerRow) * this.state.itemDimensions.height);

see 330013e

@JonRossway JonRossway reopened this Sep 14, 2016
@JonRossway JonRossway changed the title _getGridHeight() returns 0 if number of items entries is less than number of items in a row _getGridHeight() returns truncated height due to rounding down Sep 14, 2016
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