ngx-virtual-scroller
Advanced tools
Comparing version 1.0.14 to 1.0.15
@@ -0,4 +1,8 @@ | ||
# v1.0.15 | ||
* Minor bug fix to stripedTable & table headers. | ||
# v1.0.14 | ||
* New properties stripedTable and modifyOverflowStyleOfParentScroll. Mnior bug fix to fixed table headers. | ||
* New properties stripedTable and modifyOverflowStyleOfParentScroll. Minor bug fix to fixed table headers. | ||
@@ -5,0 +9,0 @@ # v1.0.13 |
@@ -803,3 +803,3 @@ "use strict"; | ||
if (this.headerElementRef) { | ||
scrollLength += parseInt(window.getComputedStyle(this.headerElementRef.nativeElement).height, 10); | ||
scrollLength += this.headerElementRef.nativeElement.clientHeight; | ||
} | ||
@@ -871,2 +871,8 @@ var viewportLength = this.horizontal ? viewportWidth : viewportHeight; | ||
arrayStartIndex -= arrayStartIndex % dimensions.itemsPerWrapGroup; // round down to start of wrapGroup | ||
if (this.stripedTable) { | ||
var bufferBoundary = 2 * dimensions.itemsPerWrapGroup; | ||
if (arrayStartIndex % bufferBoundary !== 0) { | ||
arrayStartIndex = Math.max(arrayStartIndex - arrayStartIndex % bufferBoundary, 0); | ||
} | ||
} | ||
var arrayEndIndex = Math.ceil(startingArrayIndex_fractional) + dimensions.itemsPerPage - 1; | ||
@@ -888,5 +894,2 @@ var endIndexWithinWrapGroup = (arrayEndIndex + 1) % dimensions.itemsPerWrapGroup; | ||
var endIndexWithBuffer = Math.min(Math.max(arrayEndIndex + bufferSize, 0), dimensions.itemCount - 1); | ||
if (this.stripedTable && startIndexWithBuffer % 2 == 1 && startIndexWithBuffer != 0) { | ||
startIndexWithBuffer--; | ||
} | ||
return { | ||
@@ -893,0 +896,0 @@ startIndex: arrayStartIndex, |
{ | ||
"name": "ngx-virtual-scroller", | ||
"version": "1.0.14", | ||
"version": "1.0.15", | ||
"description": "Angular 4+ module for virtual -infinite- list. Supports horizontal/vertical, variable heights, & multi-column", | ||
@@ -5,0 +5,0 @@ "main": "dist/virtual-scroller.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
17087
13248548
177