@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.
|
@@ -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) {
|
|
@@ -7307,7 +7307,9 @@ class WebsyTable3 {
|
|
|
7307
7307
|
if (this.vScrollRequired === true) {
|
|
7308
7308
|
vScrollEl.style.top = `${this.sizes.header.height + this.sizes.total.height}px`
|
|
7309
7309
|
vScrollEl.style.height = `${this.sizes.bodyHeight}px`
|
|
7310
|
-
vHandleEl.style.height = Math.max(this.options.minHandleSize, this.sizes.bodyHeight * (this.sizes.rowsToRenderPrecise / this.totalRowCount)) + 'px'
|
|
7310
|
+
vHandleEl.style.height = Math.max(this.options.minHandleSize, this.sizes.bodyHeight * (this.sizes.rowsToRenderPrecise / this.totalRowCount)) + 'px'
|
|
7311
|
+
const scrollableSpace = vScrollEl.getBoundingClientRect().height - vHandleEl.getBoundingClientRect().height
|
|
7312
|
+
vHandleEl.style.top = Math.round(this.startRow / (this.totalRowCount - this.sizes.rowsToRender) * (scrollableSpace)) + 'px'
|
|
7311
7313
|
}
|
|
7312
7314
|
else {
|
|
7313
7315
|
vHandleEl.style.height = '0px'
|
|
@@ -7464,7 +7466,7 @@ class WebsyTable3 {
|
|
|
7464
7466
|
if (this.endRow === this.totalRowCount) {
|
|
7465
7467
|
this.startRow += 1
|
|
7466
7468
|
}
|
|
7467
|
-
this.options.onScroll('y', this.startRow, this.endRow, this.startCol - this.pinnedColumns, this.endCol - this.pinnedColumns)
|
|
7469
|
+
this.options.onScroll('y', this.startRow, this.endRow, Math.max(0, this.startCol - this.pinnedColumns), this.endCol - this.pinnedColumns)
|
|
7468
7470
|
}
|
|
7469
7471
|
}
|
|
7470
7472
|
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,8 @@ 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
|
+
var scrollableSpace = vScrollEl.getBoundingClientRect().height - vHandleEl.getBoundingClientRect().height;
|
|
8046
|
+
vHandleEl.style.top = Math.round(this.startRow / (this.totalRowCount - this.sizes.rowsToRender) * scrollableSpace) + 'px';
|
|
8045
8047
|
} else {
|
|
8046
8048
|
vHandleEl.style.height = '0px';
|
|
8047
8049
|
}
|
|
@@ -8240,7 +8242,7 @@ var WebsyTable3 = /*#__PURE__*/function () {
|
|
|
8240
8242
|
this.startRow += 1;
|
|
8241
8243
|
}
|
|
8242
8244
|
|
|
8243
|
-
this.options.onScroll('y', this.startRow, this.endRow, this.startCol - this.pinnedColumns, this.endCol - this.pinnedColumns);
|
|
8245
|
+
this.options.onScroll('y', this.startRow, this.endRow, Math.max(0, this.startCol - this.pinnedColumns), this.endCol - this.pinnedColumns);
|
|
8244
8246
|
}
|
|
8245
8247
|
}
|
|
8246
8248
|
}, {
|