@websy/websy-designs 1.7.20 → 1.8.0
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) {
|
|
@@ -6892,6 +6892,10 @@ class WebsyTable3 {
|
|
|
6892
6892
|
vScrollEl.style.top = `${this.sizes.header.height + this.sizes.total.height}px`
|
|
6893
6893
|
vScrollEl.style.height = `${this.sizes.bodyHeight}px`
|
|
6894
6894
|
vHandleEl.style.height = Math.max(this.options.minHandleSize, this.sizes.bodyHeight * (this.sizes.rowsToRenderPrecise / this.totalRowCount)) + 'px'
|
|
6895
|
+
if (this.startRow !== 0) {
|
|
6896
|
+
const scrollableSpace = vScrollEl.getBoundingClientRect().height - vHandleEl.getBoundingClientRect().height
|
|
6897
|
+
vHandleEl.style.top = Math.round(this.startRow / (this.totalRowCount - this.sizes.rowsToRender) * (scrollableSpace)) + 'px'
|
|
6898
|
+
}
|
|
6895
6899
|
}
|
|
6896
6900
|
else {
|
|
6897
6901
|
vHandleEl.style.height = '0px'
|
|
@@ -7048,7 +7052,7 @@ class WebsyTable3 {
|
|
|
7048
7052
|
if (this.endRow === this.totalRowCount) {
|
|
7049
7053
|
this.startRow += 1
|
|
7050
7054
|
}
|
|
7051
|
-
this.options.onScroll('y', this.startRow, this.endRow, this.startCol - this.pinnedColumns, this.endCol - this.pinnedColumns)
|
|
7055
|
+
this.options.onScroll('y', this.startRow, this.endRow, Math.max(0, this.startCol - this.pinnedColumns), this.endCol - this.pinnedColumns)
|
|
7052
7056
|
}
|
|
7053
7057
|
}
|
|
7054
7058
|
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,11 @@ 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
|
+
|
|
7564
|
+
if (this.startRow !== 0) {
|
|
7565
|
+
var scrollableSpace = vScrollEl.getBoundingClientRect().height - vHandleEl.getBoundingClientRect().height;
|
|
7566
|
+
vHandleEl.style.top = Math.round(this.startRow / (this.totalRowCount - this.sizes.rowsToRender) * scrollableSpace) + 'px';
|
|
7567
|
+
}
|
|
7563
7568
|
} else {
|
|
7564
7569
|
vHandleEl.style.height = '0px';
|
|
7565
7570
|
}
|
|
@@ -7758,7 +7763,7 @@ var WebsyTable3 = /*#__PURE__*/function () {
|
|
|
7758
7763
|
this.startRow += 1;
|
|
7759
7764
|
}
|
|
7760
7765
|
|
|
7761
|
-
this.options.onScroll('y', this.startRow, this.endRow, this.startCol - this.pinnedColumns, this.endCol - this.pinnedColumns);
|
|
7766
|
+
this.options.onScroll('y', this.startRow, this.endRow, Math.max(0, this.startCol - this.pinnedColumns), this.endCol - this.pinnedColumns);
|
|
7762
7767
|
}
|
|
7763
7768
|
}
|
|
7764
7769
|
}, {
|