angular2-virtual-scroll
Advanced tools
Comparing version 0.1.4 to 0.1.5
# v0.1.5 | ||
* Bug fix: the data to "jump" once scrolled to the bottom, because maxStart is assumed to be evenly divisible by the number of items in each row. [#32](https://github.com/rintoj/angular2-virtual-scroll/issues/32) | ||
# v0.1.4 | ||
@@ -3,0 +7,0 @@ |
@@ -109,3 +109,8 @@ "use strict"; | ||
var end = Math.min(d.itemCount, Math.ceil(indexByScrollTop) * d.itemsPerRow + d.itemsPerRow * (d.itemsPerCol + 1)); | ||
var maxStart = Math.max(0, end - d.itemsPerCol * d.itemsPerRow - d.itemsPerRow); | ||
var maxStartEnd = end; | ||
var modEnd = end % d.itemsPerRow; | ||
if (modEnd) { | ||
maxStartEnd = end + d.itemsPerRow - modEnd; | ||
} | ||
var maxStart = Math.max(0, maxStartEnd - d.itemsPerCol * d.itemsPerRow - d.itemsPerRow); | ||
var start = Math.min(maxStart, Math.floor(indexByScrollTop) * d.itemsPerRow); | ||
@@ -112,0 +117,0 @@ this.topPadding = d.childHeight * Math.ceil(start / d.itemsPerRow); |
{ | ||
"name": "angular2-virtual-scroll", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Angular 2 module for virtual -infinite- list. Supports multi-column", | ||
@@ -5,0 +5,0 @@ "main": "dist/virtual-scroll.js", |
@@ -226,2 +226,4 @@ | ||
### Hope this module is helpful to you. Please make sure to checkout my other [projects](https://github.com/rintoj) and [articles](https://medium.com/@rintoj). Enjoy coding! | ||
Follow me: | ||
@@ -228,0 +230,0 @@ [GitHub](https://github.com/rintoj) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38157
241
262