@visactor/vtable 1.24.0-alpha.0 → 1.25.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.
- package/cjs/core/BaseTable.d.ts +7 -0
- package/cjs/core/BaseTable.js +55 -17
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/animation.js +3 -5
- package/cjs/core/animation.js.map +1 -1
- package/cjs/core/tableHelper.js +5 -3
- package/cjs/core/tableHelper.js.map +1 -1
- package/cjs/core/utils/get-cell-position.js +23 -12
- package/cjs/core/utils/get-cell-position.js.map +1 -1
- package/cjs/dataset/DataStatistics.js +2 -1
- package/cjs/edit/edit-manager.js +0 -1
- package/cjs/event/listener/container-dom.js +7 -5
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/scroll-bar.js +77 -6
- package/cjs/event/listener/scroll-bar.js.map +1 -1
- package/cjs/event/listener/table-group.js +29 -20
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/scroll.js +34 -11
- package/cjs/event/scroll.js.map +1 -1
- package/cjs/event/util.d.ts +2 -0
- package/cjs/event/util.js +28 -3
- package/cjs/event/util.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/scenegraph/component/table-component.d.ts +6 -1
- package/cjs/scenegraph/component/table-component.js +143 -16
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/component/util.js +5 -2
- package/cjs/scenegraph/component/util.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +29 -10
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/init-scenegraph.js +36 -6
- package/cjs/scenegraph/group-creater/init-scenegraph.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +4 -2
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +13 -0
- package/cjs/scenegraph/scenegraph.js +194 -23
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/select/create-select-border.js +9 -10
- package/cjs/scenegraph/select/create-select-border.js.map +1 -1
- package/cjs/scenegraph/select/delete-select-border.js.map +1 -1
- package/cjs/scenegraph/select/move-select-border.js.map +1 -1
- package/cjs/scenegraph/select/update-custom-select-border.js +9 -9
- package/cjs/scenegraph/select/update-custom-select-border.js.map +1 -1
- package/cjs/scenegraph/select/update-select-border.js +14 -73
- package/cjs/scenegraph/select/update-select-border.js.map +1 -1
- package/cjs/scenegraph/select/update-select-style.js.map +1 -1
- package/cjs/state/state.d.ts +7 -1
- package/cjs/state/state.js +61 -28
- package/cjs/state/state.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +10 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +1087 -337
- package/dist/vtable.min.js +2 -2
- package/es/core/BaseTable.d.ts +7 -0
- package/es/core/BaseTable.js +55 -17
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/animation.js +3 -5
- package/es/core/animation.js.map +1 -1
- package/es/core/tableHelper.js +5 -3
- package/es/core/tableHelper.js.map +1 -1
- package/es/core/utils/get-cell-position.js +23 -12
- package/es/core/utils/get-cell-position.js.map +1 -1
- package/es/dataset/DataStatistics.js +2 -1
- package/es/edit/edit-manager.js +1 -2
- package/es/event/listener/container-dom.js +7 -5
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/scroll-bar.js +75 -6
- package/es/event/listener/scroll-bar.js.map +1 -1
- package/es/event/listener/table-group.js +29 -21
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/scroll.js +34 -11
- package/es/event/scroll.js.map +1 -1
- package/es/event/util.d.ts +2 -0
- package/es/event/util.js +24 -0
- package/es/event/util.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/scenegraph/component/table-component.d.ts +6 -1
- package/es/scenegraph/component/table-component.js +141 -16
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/component/util.js +5 -2
- package/es/scenegraph/component/util.js.map +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.js +29 -10
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/group-creater/init-scenegraph.js +36 -6
- package/es/scenegraph/group-creater/init-scenegraph.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +4 -2
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +13 -0
- package/es/scenegraph/scenegraph.js +185 -18
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/select/create-select-border.js +9 -10
- package/es/scenegraph/select/create-select-border.js.map +1 -1
- package/es/scenegraph/select/delete-select-border.js.map +1 -1
- package/es/scenegraph/select/move-select-border.js.map +1 -1
- package/es/scenegraph/select/update-custom-select-border.js +9 -9
- package/es/scenegraph/select/update-custom-select-border.js.map +1 -1
- package/es/scenegraph/select/update-select-border.js +14 -73
- package/es/scenegraph/select/update-select-border.js.map +1 -1
- package/es/scenegraph/select/update-select-style.js.map +1 -1
- package/es/state/state.d.ts +7 -1
- package/es/state/state.js +61 -28
- package/es/state/state.js.map +1 -1
- package/es/ts-types/base-table.d.ts +10 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
package/cjs/core/BaseTable.d.ts
CHANGED
|
@@ -164,6 +164,7 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
|
|
|
164
164
|
set heightAdaptiveMode(heightAdaptiveMode: HeightAdaptiveModeDef);
|
|
165
165
|
_colWidthDefineToPxWidth(width: string | number): number;
|
|
166
166
|
_getMaxFrozenWidth(): number;
|
|
167
|
+
_getMaxRightFrozenWidth(): number;
|
|
167
168
|
_getComputedFrozenColCount(frozenColCount: number): number;
|
|
168
169
|
private _getColWidthLimits;
|
|
169
170
|
_adjustColWidth(col: number, orgWidth: number): number;
|
|
@@ -275,8 +276,14 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
|
|
|
275
276
|
renderWithRecreateCells(): void;
|
|
276
277
|
getFrozenRowsHeight(): number;
|
|
277
278
|
getFrozenColsWidth(): number;
|
|
279
|
+
getFrozenColsContentWidth(): number;
|
|
280
|
+
getFrozenColsOffset(): number;
|
|
281
|
+
getFrozenColsScrollLeft(): number;
|
|
278
282
|
getBottomFrozenRowsHeight(): number;
|
|
279
283
|
getRightFrozenColsWidth(): number;
|
|
284
|
+
getRightFrozenColsContentWidth(): number;
|
|
285
|
+
getRightFrozenColsOffset(): number;
|
|
286
|
+
getRightFrozenColsScrollLeft(): number;
|
|
280
287
|
getDrawRange(): Rect;
|
|
281
288
|
_getMouseAbstractPoint(evt: TouchEvent | MouseEvent | undefined): {
|
|
282
289
|
x: number;
|
package/cjs/core/BaseTable.js
CHANGED
|
@@ -45,7 +45,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
45
45
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
46
46
|
if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0,
|
|
47
47
|
this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0,
|
|
48
|
-
this.version = "1.
|
|
48
|
+
this.version = "1.25.0", this.id = `VTable${Date.now()}`, this.isReleased = !1,
|
|
49
49
|
this._chartEventMap = {}, this.throttleInvalidate = (0, util_1.throttle2)(this.render.bind(this), 200),
|
|
50
50
|
"node" === env_1.Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container,
|
|
51
51
|
container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
@@ -255,7 +255,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
255
255
|
frozenColCount >= this.colCount && (frozenColCount = 0), this.internalProps.frozenColCount = frozenColCount,
|
|
256
256
|
this.options.frozenColCount = frozenColCount;
|
|
257
257
|
const maxFrozenWidth = this._getMaxFrozenWidth();
|
|
258
|
-
if (this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) if (this.internalProps.unfreezeAllOnExceedsMaxWidth) this.internalProps.frozenColCount = 0; else {
|
|
258
|
+
if (!this.options.scrollFrozenCols && this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) if (this.internalProps.unfreezeAllOnExceedsMaxWidth) this.internalProps.frozenColCount = 0; else {
|
|
259
259
|
const computedFrozenColCount = this._getComputedFrozenColCount(frozenColCount);
|
|
260
260
|
this.internalProps.frozenColCount = computedFrozenColCount;
|
|
261
261
|
}
|
|
@@ -265,7 +265,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
265
265
|
frozenColCount >= this.colCount && (frozenColCount = 0), this.internalProps.frozenColCount = frozenColCount,
|
|
266
266
|
this.options.frozenColCount = frozenColCount;
|
|
267
267
|
const maxFrozenWidth = this._getMaxFrozenWidth();
|
|
268
|
-
if (this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) if (this.internalProps.unfreezeAllOnExceedsMaxWidth) this.internalProps.frozenColCount = 0; else {
|
|
268
|
+
if (!this.options.scrollFrozenCols && this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) if (this.internalProps.unfreezeAllOnExceedsMaxWidth) this.internalProps.frozenColCount = 0; else {
|
|
269
269
|
const computedFrozenColCount = this._getComputedFrozenColCount(frozenColCount);
|
|
270
270
|
this.internalProps.frozenColCount = computedFrozenColCount;
|
|
271
271
|
}
|
|
@@ -420,6 +420,11 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
420
420
|
const maxFrozenWidth = null !== (_a = this.options.maxFrozenWidth) && void 0 !== _a ? _a : "80%";
|
|
421
421
|
return (0, tableHelper_1._toPxWidth)(this, maxFrozenWidth);
|
|
422
422
|
}
|
|
423
|
+
_getMaxRightFrozenWidth() {
|
|
424
|
+
var _a, _b;
|
|
425
|
+
const maxRightFrozenWidth = null !== (_b = null !== (_a = this.options.maxRightFrozenWidth) && void 0 !== _a ? _a : this.options.maxFrozenWidth) && void 0 !== _b ? _b : "80%";
|
|
426
|
+
return (0, tableHelper_1._toPxWidth)(this, maxRightFrozenWidth);
|
|
427
|
+
}
|
|
423
428
|
_getComputedFrozenColCount(frozenColCount) {
|
|
424
429
|
const maxFrozenWidth = this._getMaxFrozenWidth();
|
|
425
430
|
let computedfrozenColCount = frozenColCount;
|
|
@@ -744,22 +749,27 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
744
749
|
let relativeX = !0, relativeY = !0;
|
|
745
750
|
(null == isFrozenCell ? void 0 : isFrozenCell.col) && (null == isFrozenCell ? void 0 : isFrozenCell.row) ? (relativeX = !1,
|
|
746
751
|
relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1);
|
|
747
|
-
const cellRect = this.getCellRect(col, row);
|
|
748
|
-
return this.
|
|
752
|
+
const cellRect = this.getCellRect(col, row), rect = this._toRelativeRect(cellRect, relativeX, relativeY);
|
|
753
|
+
return (null == isFrozenCell ? void 0 : isFrozenCell.col) && !this.isRightFrozenColumn(col, row) && rect.offsetLeft(-this.getFrozenColsScrollLeft()),
|
|
754
|
+
rect;
|
|
749
755
|
}
|
|
750
756
|
getCellRangeRelativeRect(range) {
|
|
751
757
|
if (range.start) {
|
|
752
758
|
const isFrozenCell = this.isFrozenCell(range.start.col, range.start.row);
|
|
753
759
|
let relativeX = !0, relativeY = !0;
|
|
754
|
-
|
|
755
|
-
relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1)
|
|
756
|
-
this._toRelativeRect(this.getCellsRect(range.start.col, range.start.row, range.end.col, range.end.row), relativeX, relativeY);
|
|
760
|
+
(null == isFrozenCell ? void 0 : isFrozenCell.col) && (null == isFrozenCell ? void 0 : isFrozenCell.row) ? (relativeX = !1,
|
|
761
|
+
relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1);
|
|
762
|
+
const rect = this._toRelativeRect(this.getCellsRect(range.start.col, range.start.row, range.end.col, range.end.row), relativeX, relativeY);
|
|
763
|
+
return (null == isFrozenCell ? void 0 : isFrozenCell.col) && !this.isRightFrozenColumn(range.start.col, range.start.row) && rect.offsetLeft(-this.getFrozenColsScrollLeft()),
|
|
764
|
+
rect;
|
|
757
765
|
}
|
|
758
766
|
const cellRange = this.getCellRange(range.col, range.row), isFrozenCell = this.isFrozenCell(range.col, range.row);
|
|
759
767
|
let relativeX = !0, relativeY = !0;
|
|
760
|
-
|
|
761
|
-
relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1)
|
|
762
|
-
this._toRelativeRect(this.getCellsRect(cellRange.start.col, cellRange.start.row, cellRange.end.col, cellRange.end.row), relativeX, relativeY);
|
|
768
|
+
(null == isFrozenCell ? void 0 : isFrozenCell.col) && (null == isFrozenCell ? void 0 : isFrozenCell.row) ? (relativeX = !1,
|
|
769
|
+
relativeY = !1) : (null == isFrozenCell ? void 0 : isFrozenCell.col) ? relativeX = !1 : (null == isFrozenCell ? void 0 : isFrozenCell.row) && (relativeY = !1);
|
|
770
|
+
const rect = this._toRelativeRect(this.getCellsRect(cellRange.start.col, cellRange.start.row, cellRange.end.col, cellRange.end.row), relativeX, relativeY);
|
|
771
|
+
return (null == isFrozenCell ? void 0 : isFrozenCell.col) && !this.isRightFrozenColumn(range.col, range.row) && rect.offsetLeft(-this.getFrozenColsScrollLeft()),
|
|
772
|
+
rect;
|
|
763
773
|
}
|
|
764
774
|
getVisibleCellRangeRelativeRect(range) {
|
|
765
775
|
let cellRange;
|
|
@@ -861,7 +871,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
861
871
|
}
|
|
862
872
|
getVisibleRect() {
|
|
863
873
|
const {scrollTop: scrollTop, scrollLeft: scrollLeft} = this, width = this.tableNoFrameWidth, height = this.tableNoFrameHeight;
|
|
864
|
-
return new Rect_1.Rect(scrollLeft, scrollTop, width, height);
|
|
874
|
+
return new Rect_1.Rect(scrollLeft + this.getFrozenColsOffset(), scrollTop, width, height);
|
|
865
875
|
}
|
|
866
876
|
get visibleRowCount() {
|
|
867
877
|
const {frozenRowCount: frozenRowCount} = this, visibleRect = this.getVisibleRect(), visibleTop = frozenRowCount > 0 ? visibleRect.top + this.getRowsHeight(0, frozenRowCount - 1) : visibleRect.top, initRow = this.getTargetRowAt(visibleTop);
|
|
@@ -877,7 +887,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
877
887
|
return count;
|
|
878
888
|
}
|
|
879
889
|
getBodyVisibleCellRange() {
|
|
880
|
-
const {scrollTop: scrollTop, scrollLeft: scrollLeft} = this, frozenRowsHeight = this.getFrozenRowsHeight(),
|
|
890
|
+
const {scrollTop: scrollTop, scrollLeft: scrollLeft} = this, frozenRowsHeight = this.getFrozenRowsHeight(), frozenColsContentWidth = this.getFrozenColsContentWidth(), frozenColsOffset = this.getFrozenColsOffset(), bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight(), rightFrozenColsWidth = this.getRightFrozenColsWidth(), {row: rowStart} = this.getRowAt(scrollTop + frozenRowsHeight + 1), {col: colStart} = this.getColAt(scrollLeft + frozenColsContentWidth + 1), rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight).row : this.rowCount - 1, colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + frozenColsOffset + this.tableNoFrameWidth - 1 - rightFrozenColsWidth).col : this.colCount - 1;
|
|
881
891
|
return colEnd < 0 || rowEnd < 0 ? null : {
|
|
882
892
|
rowStart: rowStart,
|
|
883
893
|
colStart: colStart,
|
|
@@ -893,14 +903,14 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
893
903
|
};
|
|
894
904
|
}
|
|
895
905
|
getBodyVisibleColRange(start_deltaX = 0, end_deltaX = 0) {
|
|
896
|
-
const {scrollLeft: scrollLeft} = this,
|
|
906
|
+
const {scrollLeft: scrollLeft} = this, frozenColsContentWidth = this.getFrozenColsContentWidth(), frozenColsOffset = this.getFrozenColsOffset(), rightFrozenColsWidth = this.getRightFrozenColsWidth(), {col: colStart} = this.getColAt(scrollLeft + frozenColsContentWidth + 1 + start_deltaX), colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + frozenColsOffset + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + end_deltaX).col : this.colCount - 1;
|
|
897
907
|
return colEnd < 0 ? null : {
|
|
898
908
|
colStart: colStart,
|
|
899
909
|
colEnd: colEnd
|
|
900
910
|
};
|
|
901
911
|
}
|
|
902
912
|
get visibleColCount() {
|
|
903
|
-
const {frozenColCount: frozenColCount} = this, visibleRect = this.getVisibleRect(), visibleLeft = frozenColCount > 0 ? visibleRect.left + this.
|
|
913
|
+
const {frozenColCount: frozenColCount} = this, visibleRect = this.getVisibleRect(), visibleLeft = frozenColCount > 0 ? visibleRect.left + this.getFrozenColsWidth() : visibleRect.left, initCol = this.getTargetColAt(visibleLeft);
|
|
904
914
|
if (!initCol) return 0;
|
|
905
915
|
const startCol = Math.max(initCol.left >= visibleLeft ? initCol.col : initCol.col + 1, frozenColCount);
|
|
906
916
|
let absoluteLeft = this.getColsWidth(0, startCol - 1), count = 0;
|
|
@@ -1102,8 +1112,22 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1102
1112
|
return this.getRowsHeight(0, this.frozenRowCount - 1);
|
|
1103
1113
|
}
|
|
1104
1114
|
getFrozenColsWidth() {
|
|
1115
|
+
const contentWidth = this.getFrozenColsContentWidth();
|
|
1116
|
+
if (!this.options.scrollFrozenCols) return contentWidth;
|
|
1117
|
+
const maxFrozenWidth = this._getMaxFrozenWidth();
|
|
1118
|
+
return Math.min(contentWidth, maxFrozenWidth);
|
|
1119
|
+
}
|
|
1120
|
+
getFrozenColsContentWidth() {
|
|
1105
1121
|
return this.getColsWidth(0, this.frozenColCount - 1);
|
|
1106
1122
|
}
|
|
1123
|
+
getFrozenColsOffset() {
|
|
1124
|
+
const contentWidth = this.getFrozenColsContentWidth(), viewportWidth = this.getFrozenColsWidth();
|
|
1125
|
+
return Math.max(0, contentWidth - viewportWidth);
|
|
1126
|
+
}
|
|
1127
|
+
getFrozenColsScrollLeft() {
|
|
1128
|
+
var _a;
|
|
1129
|
+
return null !== (_a = this.stateManager.scroll.frozenHorizontalBarPos) && void 0 !== _a ? _a : 0;
|
|
1130
|
+
}
|
|
1107
1131
|
getBottomFrozenRowsHeight() {
|
|
1108
1132
|
if (this.bottomFrozenRowCount > 0) {
|
|
1109
1133
|
let height = 0;
|
|
@@ -1113,6 +1137,12 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1113
1137
|
return 0;
|
|
1114
1138
|
}
|
|
1115
1139
|
getRightFrozenColsWidth() {
|
|
1140
|
+
const contentWidth = this.getRightFrozenColsContentWidth();
|
|
1141
|
+
if (!this.options.scrollRightFrozenCols) return contentWidth;
|
|
1142
|
+
const maxRightFrozenWidth = this._getMaxRightFrozenWidth();
|
|
1143
|
+
return Math.min(contentWidth, maxRightFrozenWidth);
|
|
1144
|
+
}
|
|
1145
|
+
getRightFrozenColsContentWidth() {
|
|
1116
1146
|
if (this.rightFrozenColCount > 0) {
|
|
1117
1147
|
let width = 0;
|
|
1118
1148
|
for (let col = this.colCount - this.rightFrozenColCount; col <= this.colCount - 1; col++) width += this.getColWidth(col);
|
|
@@ -1120,6 +1150,14 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1120
1150
|
}
|
|
1121
1151
|
return 0;
|
|
1122
1152
|
}
|
|
1153
|
+
getRightFrozenColsOffset() {
|
|
1154
|
+
const contentWidth = this.getRightFrozenColsContentWidth(), viewportWidth = this.getRightFrozenColsWidth();
|
|
1155
|
+
return Math.max(0, contentWidth - viewportWidth);
|
|
1156
|
+
}
|
|
1157
|
+
getRightFrozenColsScrollLeft() {
|
|
1158
|
+
var _a;
|
|
1159
|
+
return null !== (_a = this.stateManager.scroll.rightFrozenHorizontalBarPos) && void 0 !== _a ? _a : 0;
|
|
1160
|
+
}
|
|
1123
1161
|
getDrawRange() {
|
|
1124
1162
|
var _a, _b;
|
|
1125
1163
|
const width = (null === (_a = this.containerFit) || void 0 === _a ? void 0 : _a.width) ? this.tableNoFrameWidth : Math.min(this.tableNoFrameWidth, this.getAllColsWidth()), height = (null === (_b = this.containerFit) || void 0 === _b ? void 0 : _b.height) ? this.tableNoFrameHeight : Math.min(this.tableNoFrameHeight, this.getAllRowsHeight());
|
|
@@ -2104,8 +2142,8 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
2104
2142
|
}
|
|
2105
2143
|
getGroupTitleLevel(col, row) {}
|
|
2106
2144
|
getTargetScrollTop(row) {
|
|
2107
|
-
const drawRange = this.getDrawRange(), frozenHeight = this.getFrozenRowsHeight()
|
|
2108
|
-
return Math.max(0, Math.min(
|
|
2145
|
+
const drawRange = this.getDrawRange(), frozenHeight = this.getFrozenRowsHeight();
|
|
2146
|
+
return Math.max(0, Math.min(this.getRowsHeight(0, row - 1) - frozenHeight, this.getAllRowsHeight() - drawRange.height));
|
|
2109
2147
|
}
|
|
2110
2148
|
_scheduleScrollToRowCorrect(row, delay = 0) {
|
|
2111
2149
|
this._scrollToRowCorrectTimer = setTimeout((() => {
|