@websy/websy-designs 1.7.20 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6481,8 +6481,8 @@ class WebsyTable3 {
|
|
|
6481
6481
|
}
|
|
6482
6482
|
this.sizes.rowsToRender = Math.ceil(this.sizes.bodyHeight / this.sizes.cellHeight)
|
|
6483
6483
|
this.sizes.rowsToRenderPrecise = this.sizes.bodyHeight / this.sizes.cellHeight
|
|
6484
|
-
this.startRow = 0
|
|
6485
|
-
this.endRow = this.sizes.rowsToRender
|
|
6484
|
+
// this.startRow = 0
|
|
6485
|
+
this.endRow = this.startRow + this.sizes.rowsToRender
|
|
6486
6486
|
this.startCol = 0
|
|
6487
6487
|
this.endCol = this.options.columns[this.options.columns.length - 1].length
|
|
6488
6488
|
if (this.sizes.rowsToRender < this.totalRowCount) {
|
|
@@ -6891,7 +6891,9 @@ class WebsyTable3 {
|
|
|
6891
6891
|
if (this.vScrollRequired === true) {
|
|
6892
6892
|
vScrollEl.style.top = `${this.sizes.header.height + this.sizes.total.height}px`
|
|
6893
6893
|
vScrollEl.style.height = `${this.sizes.bodyHeight}px`
|
|
6894
|
-
vHandleEl.style.height = Math.max(this.options.minHandleSize, this.sizes.bodyHeight * (this.sizes.rowsToRenderPrecise / this.totalRowCount)) + 'px'
|
|
6894
|
+
vHandleEl.style.height = Math.max(this.options.minHandleSize, this.sizes.bodyHeight * (this.sizes.rowsToRenderPrecise / this.totalRowCount)) + 'px'
|
|
6895
|
+
const scrollableSpace = vScrollEl.getBoundingClientRect().height - vHandleEl.getBoundingClientRect().height
|
|
6896
|
+
vHandleEl.style.top = Math.round(this.startRow / (this.totalRowCount - this.sizes.rowsToRender) * (scrollableSpace)) + 'px'
|
|
6895
6897
|
}
|
|
6896
6898
|
else {
|
|
6897
6899
|
vHandleEl.style.height = '0px'
|
|
@@ -7048,7 +7050,7 @@ class WebsyTable3 {
|
|
|
7048
7050
|
if (this.endRow === this.totalRowCount) {
|
|
7049
7051
|
this.startRow += 1
|
|
7050
7052
|
}
|
|
7051
|
-
this.options.onScroll('y', this.startRow, this.endRow, this.startCol - this.pinnedColumns, this.endCol - this.pinnedColumns)
|
|
7053
|
+
this.options.onScroll('y', this.startRow, this.endRow, Math.max(0, this.startCol - this.pinnedColumns), this.endCol - this.pinnedColumns)
|
|
7052
7054
|
}
|
|
7053
7055
|
}
|
|
7054
7056
|
showLoading (options) {
|
|
@@ -7073,9 +7073,9 @@ var WebsyTable3 = /*#__PURE__*/function () {
|
|
|
7073
7073
|
}
|
|
7074
7074
|
|
|
7075
7075
|
this.sizes.rowsToRender = Math.ceil(this.sizes.bodyHeight / this.sizes.cellHeight);
|
|
7076
|
-
this.sizes.rowsToRenderPrecise = this.sizes.bodyHeight / this.sizes.cellHeight;
|
|
7077
|
-
|
|
7078
|
-
this.endRow = this.sizes.rowsToRender;
|
|
7076
|
+
this.sizes.rowsToRenderPrecise = this.sizes.bodyHeight / this.sizes.cellHeight; // this.startRow = 0
|
|
7077
|
+
|
|
7078
|
+
this.endRow = this.startRow + this.sizes.rowsToRender;
|
|
7079
7079
|
this.startCol = 0;
|
|
7080
7080
|
this.endCol = this.options.columns[this.options.columns.length - 1].length;
|
|
7081
7081
|
|
|
@@ -7560,6 +7560,8 @@ var WebsyTable3 = /*#__PURE__*/function () {
|
|
|
7560
7560
|
vScrollEl.style.top = "".concat(this.sizes.header.height + this.sizes.total.height, "px");
|
|
7561
7561
|
vScrollEl.style.height = "".concat(this.sizes.bodyHeight, "px");
|
|
7562
7562
|
vHandleEl.style.height = Math.max(this.options.minHandleSize, this.sizes.bodyHeight * (this.sizes.rowsToRenderPrecise / this.totalRowCount)) + 'px';
|
|
7563
|
+
var scrollableSpace = vScrollEl.getBoundingClientRect().height - vHandleEl.getBoundingClientRect().height;
|
|
7564
|
+
vHandleEl.style.top = Math.round(this.startRow / (this.totalRowCount - this.sizes.rowsToRender) * scrollableSpace) + 'px';
|
|
7563
7565
|
} else {
|
|
7564
7566
|
vHandleEl.style.height = '0px';
|
|
7565
7567
|
}
|
|
@@ -7758,7 +7760,7 @@ var WebsyTable3 = /*#__PURE__*/function () {
|
|
|
7758
7760
|
this.startRow += 1;
|
|
7759
7761
|
}
|
|
7760
7762
|
|
|
7761
|
-
this.options.onScroll('y', this.startRow, this.endRow, this.startCol - this.pinnedColumns, this.endCol - this.pinnedColumns);
|
|
7763
|
+
this.options.onScroll('y', this.startRow, this.endRow, Math.max(0, this.startCol - this.pinnedColumns), this.endCol - this.pinnedColumns);
|
|
7762
7764
|
}
|
|
7763
7765
|
}
|
|
7764
7766
|
}, {
|