@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.
|
@@ -6897,8 +6897,8 @@ class WebsyTable3 {
|
|
|
6897
6897
|
}
|
|
6898
6898
|
this.sizes.rowsToRender = Math.ceil(this.sizes.bodyHeight / this.sizes.cellHeight)
|
|
6899
6899
|
this.sizes.rowsToRenderPrecise = this.sizes.bodyHeight / this.sizes.cellHeight
|
|
6900
|
-
this.startRow = 0
|
|
6901
|
-
this.endRow = this.sizes.rowsToRender
|
|
6900
|
+
// this.startRow = 0
|
|
6901
|
+
this.endRow = this.startRow + this.sizes.rowsToRender
|
|
6902
6902
|
this.startCol = 0
|
|
6903
6903
|
this.endCol = this.options.columns[this.options.columns.length - 1].length
|
|
6904
6904
|
if (this.sizes.rowsToRender < this.totalRowCount) {
|
|
@@ -7308,6 +7308,10 @@ class WebsyTable3 {
|
|
|
7308
7308
|
vScrollEl.style.top = `${this.sizes.header.height + this.sizes.total.height}px`
|
|
7309
7309
|
vScrollEl.style.height = `${this.sizes.bodyHeight}px`
|
|
7310
7310
|
vHandleEl.style.height = Math.max(this.options.minHandleSize, this.sizes.bodyHeight * (this.sizes.rowsToRenderPrecise / this.totalRowCount)) + 'px'
|
|
7311
|
+
if (this.startRow !== 0) {
|
|
7312
|
+
const scrollableSpace = vScrollEl.getBoundingClientRect().height - vHandleEl.getBoundingClientRect().height
|
|
7313
|
+
vHandleEl.style.top = Math.round(this.startRow / (this.totalRowCount - this.sizes.rowsToRender) * (scrollableSpace)) + 'px'
|
|
7314
|
+
}
|
|
7311
7315
|
}
|
|
7312
7316
|
else {
|
|
7313
7317
|
vHandleEl.style.height = '0px'
|
|
@@ -7464,7 +7468,7 @@ class WebsyTable3 {
|
|
|
7464
7468
|
if (this.endRow === this.totalRowCount) {
|
|
7465
7469
|
this.startRow += 1
|
|
7466
7470
|
}
|
|
7467
|
-
this.options.onScroll('y', this.startRow, this.endRow, this.startCol - this.pinnedColumns, this.endCol - this.pinnedColumns)
|
|
7471
|
+
this.options.onScroll('y', this.startRow, this.endRow, Math.max(0, this.startCol - this.pinnedColumns), this.endCol - this.pinnedColumns)
|
|
7468
7472
|
}
|
|
7469
7473
|
}
|
|
7470
7474
|
showLoading (options) {
|
package/dist/websy-designs.js
CHANGED
|
@@ -7555,9 +7555,9 @@ var WebsyTable3 = /*#__PURE__*/function () {
|
|
|
7555
7555
|
}
|
|
7556
7556
|
|
|
7557
7557
|
this.sizes.rowsToRender = Math.ceil(this.sizes.bodyHeight / this.sizes.cellHeight);
|
|
7558
|
-
this.sizes.rowsToRenderPrecise = this.sizes.bodyHeight / this.sizes.cellHeight;
|
|
7559
|
-
|
|
7560
|
-
this.endRow = this.sizes.rowsToRender;
|
|
7558
|
+
this.sizes.rowsToRenderPrecise = this.sizes.bodyHeight / this.sizes.cellHeight; // this.startRow = 0
|
|
7559
|
+
|
|
7560
|
+
this.endRow = this.startRow + this.sizes.rowsToRender;
|
|
7561
7561
|
this.startCol = 0;
|
|
7562
7562
|
this.endCol = this.options.columns[this.options.columns.length - 1].length;
|
|
7563
7563
|
|
|
@@ -8042,6 +8042,11 @@ var WebsyTable3 = /*#__PURE__*/function () {
|
|
|
8042
8042
|
vScrollEl.style.top = "".concat(this.sizes.header.height + this.sizes.total.height, "px");
|
|
8043
8043
|
vScrollEl.style.height = "".concat(this.sizes.bodyHeight, "px");
|
|
8044
8044
|
vHandleEl.style.height = Math.max(this.options.minHandleSize, this.sizes.bodyHeight * (this.sizes.rowsToRenderPrecise / this.totalRowCount)) + 'px';
|
|
8045
|
+
|
|
8046
|
+
if (this.startRow !== 0) {
|
|
8047
|
+
var scrollableSpace = vScrollEl.getBoundingClientRect().height - vHandleEl.getBoundingClientRect().height;
|
|
8048
|
+
vHandleEl.style.top = Math.round(this.startRow / (this.totalRowCount - this.sizes.rowsToRender) * scrollableSpace) + 'px';
|
|
8049
|
+
}
|
|
8045
8050
|
} else {
|
|
8046
8051
|
vHandleEl.style.height = '0px';
|
|
8047
8052
|
}
|
|
@@ -8240,7 +8245,7 @@ var WebsyTable3 = /*#__PURE__*/function () {
|
|
|
8240
8245
|
this.startRow += 1;
|
|
8241
8246
|
}
|
|
8242
8247
|
|
|
8243
|
-
this.options.onScroll('y', this.startRow, this.endRow, this.startCol - this.pinnedColumns, this.endCol - this.pinnedColumns);
|
|
8248
|
+
this.options.onScroll('y', this.startRow, this.endRow, Math.max(0, this.startCol - this.pinnedColumns), this.endCol - this.pinnedColumns);
|
|
8244
8249
|
}
|
|
8245
8250
|
}
|
|
8246
8251
|
}, {
|