@visactor/vtable 1.24.0 → 1.25.1-alpha.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.
Files changed (103) hide show
  1. package/cjs/core/BaseTable.d.ts +7 -0
  2. package/cjs/core/BaseTable.js +100 -34
  3. package/cjs/core/BaseTable.js.map +1 -1
  4. package/cjs/core/tableHelper.js +5 -3
  5. package/cjs/core/tableHelper.js.map +1 -1
  6. package/cjs/core/utils/get-cell-position.js +23 -12
  7. package/cjs/core/utils/get-cell-position.js.map +1 -1
  8. package/cjs/event/listener/container-dom.js +7 -5
  9. package/cjs/event/listener/container-dom.js.map +1 -1
  10. package/cjs/event/listener/scroll-bar.js +77 -6
  11. package/cjs/event/listener/scroll-bar.js.map +1 -1
  12. package/cjs/event/listener/table-group.js +29 -20
  13. package/cjs/event/listener/table-group.js.map +1 -1
  14. package/cjs/event/scroll.js +34 -11
  15. package/cjs/event/scroll.js.map +1 -1
  16. package/cjs/event/util.d.ts +2 -0
  17. package/cjs/event/util.js +28 -3
  18. package/cjs/event/util.js.map +1 -1
  19. package/cjs/index.d.ts +1 -1
  20. package/cjs/index.js +1 -1
  21. package/cjs/index.js.map +1 -1
  22. package/cjs/scenegraph/component/table-component.d.ts +6 -1
  23. package/cjs/scenegraph/component/table-component.js +143 -16
  24. package/cjs/scenegraph/component/table-component.js.map +1 -1
  25. package/cjs/scenegraph/component/util.js +5 -2
  26. package/cjs/scenegraph/component/util.js.map +1 -1
  27. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +29 -10
  28. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  29. package/cjs/scenegraph/group-creater/init-scenegraph.js +36 -6
  30. package/cjs/scenegraph/group-creater/init-scenegraph.js.map +1 -1
  31. package/cjs/scenegraph/group-creater/progress/proxy.js +4 -2
  32. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  33. package/cjs/scenegraph/scenegraph.d.ts +13 -0
  34. package/cjs/scenegraph/scenegraph.js +194 -23
  35. package/cjs/scenegraph/scenegraph.js.map +1 -1
  36. package/cjs/scenegraph/select/create-select-border.js +9 -10
  37. package/cjs/scenegraph/select/create-select-border.js.map +1 -1
  38. package/cjs/scenegraph/select/delete-select-border.js.map +1 -1
  39. package/cjs/scenegraph/select/move-select-border.js.map +1 -1
  40. package/cjs/scenegraph/select/update-custom-select-border.js +9 -9
  41. package/cjs/scenegraph/select/update-custom-select-border.js.map +1 -1
  42. package/cjs/scenegraph/select/update-select-border.js +14 -73
  43. package/cjs/scenegraph/select/update-select-border.js.map +1 -1
  44. package/cjs/scenegraph/select/update-select-style.js.map +1 -1
  45. package/cjs/state/state.d.ts +7 -1
  46. package/cjs/state/state.js +61 -28
  47. package/cjs/state/state.js.map +1 -1
  48. package/cjs/ts-types/base-table.d.ts +10 -0
  49. package/cjs/ts-types/base-table.js.map +1 -1
  50. package/cjs/vrender.js.map +1 -1
  51. package/dist/vtable.js +1148 -327
  52. package/dist/vtable.min.js +2 -2
  53. package/es/core/BaseTable.d.ts +7 -0
  54. package/es/core/BaseTable.js +99 -33
  55. package/es/core/BaseTable.js.map +1 -1
  56. package/es/core/tableHelper.js +5 -3
  57. package/es/core/tableHelper.js.map +1 -1
  58. package/es/core/utils/get-cell-position.js +23 -12
  59. package/es/core/utils/get-cell-position.js.map +1 -1
  60. package/es/event/listener/container-dom.js +7 -5
  61. package/es/event/listener/container-dom.js.map +1 -1
  62. package/es/event/listener/scroll-bar.js +75 -6
  63. package/es/event/listener/scroll-bar.js.map +1 -1
  64. package/es/event/listener/table-group.js +29 -21
  65. package/es/event/listener/table-group.js.map +1 -1
  66. package/es/event/scroll.js +34 -11
  67. package/es/event/scroll.js.map +1 -1
  68. package/es/event/util.d.ts +2 -0
  69. package/es/event/util.js +24 -0
  70. package/es/event/util.js.map +1 -1
  71. package/es/index.d.ts +1 -1
  72. package/es/index.js +1 -1
  73. package/es/index.js.map +1 -1
  74. package/es/scenegraph/component/table-component.d.ts +6 -1
  75. package/es/scenegraph/component/table-component.js +141 -16
  76. package/es/scenegraph/component/table-component.js.map +1 -1
  77. package/es/scenegraph/component/util.js +5 -2
  78. package/es/scenegraph/component/util.js.map +1 -1
  79. package/es/scenegraph/graphic/contributions/group-contribution-render.js +29 -10
  80. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  81. package/es/scenegraph/group-creater/init-scenegraph.js +36 -6
  82. package/es/scenegraph/group-creater/init-scenegraph.js.map +1 -1
  83. package/es/scenegraph/group-creater/progress/proxy.js +4 -2
  84. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  85. package/es/scenegraph/scenegraph.d.ts +13 -0
  86. package/es/scenegraph/scenegraph.js +185 -18
  87. package/es/scenegraph/scenegraph.js.map +1 -1
  88. package/es/scenegraph/select/create-select-border.js +9 -10
  89. package/es/scenegraph/select/create-select-border.js.map +1 -1
  90. package/es/scenegraph/select/delete-select-border.js.map +1 -1
  91. package/es/scenegraph/select/move-select-border.js.map +1 -1
  92. package/es/scenegraph/select/update-custom-select-border.js +9 -9
  93. package/es/scenegraph/select/update-custom-select-border.js.map +1 -1
  94. package/es/scenegraph/select/update-select-border.js +14 -73
  95. package/es/scenegraph/select/update-select-border.js.map +1 -1
  96. package/es/scenegraph/select/update-select-style.js.map +1 -1
  97. package/es/state/state.d.ts +7 -1
  98. package/es/state/state.js +61 -28
  99. package/es/state/state.js.map +1 -1
  100. package/es/ts-types/base-table.d.ts +10 -0
  101. package/es/ts-types/base-table.js.map +1 -1
  102. package/es/vrender.js.map +1 -1
  103. package/package.json +9 -9
@@ -129,7 +129,7 @@ class Scenegraph {
129
129
  }));
130
130
  }
131
131
  clearCells() {
132
- var _a, _b;
132
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
133
133
  this.table.animationManager.clear(), (this.table.isPivotChart() || this.table._hasCustomRenderOrLayout()) && this.stage.pluginService.findPluginsByName("poptipForText").forEach((plugin => {
134
134
  plugin.deactivate(this.stage.pluginService);
135
135
  })), this.clear = !0, this.hasFrozen = !1, this.mergeMap.clear(), this.colHeaderGroup.clear(),
@@ -138,7 +138,12 @@ class Scenegraph {
138
138
  delete this.bodyGroup.border, this.bottomFrozenGroup.clear(), delete this.bottomFrozenGroup.border,
139
139
  this.rightFrozenGroup.clear(), delete this.rightFrozenGroup.border, this.rightTopCornerGroup.clear(),
140
140
  delete this.rightTopCornerGroup.border, this.rightBottomCornerGroup.clear(), delete this.rightBottomCornerGroup.border,
141
- this.leftBottomCornerGroup.clear(), delete this.leftBottomCornerGroup.border, this.colHeaderGroup.setAttributes({
141
+ this.leftBottomCornerGroup.clear(), delete this.leftBottomCornerGroup.border, null === (_a = this.bodySelectGroup) || void 0 === _a || _a.clear(),
142
+ null === (_b = this.rowHeaderSelectGroup) || void 0 === _b || _b.clear(), null === (_c = this.bottomFrozenSelectGroup) || void 0 === _c || _c.clear(),
143
+ null === (_d = this.colHeaderSelectGroup) || void 0 === _d || _d.clear(), null === (_e = this.rightFrozenSelectGroup) || void 0 === _e || _e.clear(),
144
+ null === (_f = this.rightTopCornerSelectGroup) || void 0 === _f || _f.clear(), null === (_g = this.leftBottomCornerSelectGroup) || void 0 === _g || _g.clear(),
145
+ null === (_h = this.rightBottomCornerSelectGroup) || void 0 === _h || _h.clear(),
146
+ null === (_j = this.cornerHeaderSelectGroup) || void 0 === _j || _j.clear(), this.colHeaderGroup.setAttributes({
142
147
  x: 0,
143
148
  y: 0,
144
149
  width: 0,
@@ -186,14 +191,64 @@ class Scenegraph {
186
191
  width: 0,
187
192
  height: 0,
188
193
  visible: !1
194
+ }), null === (_k = this.bodySelectGroup) || void 0 === _k || _k.setAttributes({
195
+ x: 0,
196
+ y: 0,
197
+ width: 0,
198
+ height: 0
199
+ }), null === (_l = this.rowHeaderSelectGroup) || void 0 === _l || _l.setAttributes({
200
+ x: 0,
201
+ y: 0,
202
+ width: 0,
203
+ height: 0
204
+ }), null === (_m = this.bottomFrozenSelectGroup) || void 0 === _m || _m.setAttributes({
205
+ x: 0,
206
+ y: 0,
207
+ width: 0,
208
+ height: 0,
209
+ visible: !1
210
+ }), null === (_o = this.colHeaderSelectGroup) || void 0 === _o || _o.setAttributes({
211
+ x: 0,
212
+ y: 0,
213
+ width: 0,
214
+ height: 0
215
+ }), null === (_p = this.rightFrozenSelectGroup) || void 0 === _p || _p.setAttributes({
216
+ x: 0,
217
+ y: 0,
218
+ width: 0,
219
+ height: 0,
220
+ visible: !1
221
+ }), null === (_q = this.rightTopCornerSelectGroup) || void 0 === _q || _q.setAttributes({
222
+ x: 0,
223
+ y: 0,
224
+ width: 0,
225
+ height: 0,
226
+ visible: !1
227
+ }), null === (_r = this.leftBottomCornerSelectGroup) || void 0 === _r || _r.setAttributes({
228
+ x: 0,
229
+ y: 0,
230
+ width: 0,
231
+ height: 0,
232
+ visible: !1
233
+ }), null === (_s = this.rightBottomCornerSelectGroup) || void 0 === _s || _s.setAttributes({
234
+ x: 0,
235
+ y: 0,
236
+ width: 0,
237
+ height: 0,
238
+ visible: !1
239
+ }), null === (_t = this.cornerHeaderSelectGroup) || void 0 === _t || _t.setAttributes({
240
+ x: 0,
241
+ y: 0,
242
+ width: 0,
243
+ height: 0
189
244
  }), this.tableGroup.setAttributes({
190
245
  x: this.table.tableX,
191
246
  y: this.table.tableY,
192
247
  width: 0,
193
248
  height: 0
194
249
  }), this.tableGroup.border && (this.tableGroup.parent.removeChild(this.tableGroup.border),
195
- delete this.tableGroup.border), null === (_a = this.proxy) || void 0 === _a || _a.release(),
196
- null === (_b = this.table.reactCustomLayout) || void 0 === _b || _b.clearCache();
250
+ delete this.tableGroup.border), null === (_u = this.proxy) || void 0 === _u || _u.release(),
251
+ null === (_v = this.table.reactCustomLayout) || void 0 === _v || _v.clearCache();
197
252
  }
198
253
  updateStageBackground() {
199
254
  this.stage.background = this.table.theme.underlayBackgroundColor, this.stage.renderNextFrame();
@@ -605,24 +660,40 @@ class Scenegraph {
605
660
  0 === y && firstBodyCell && firstBodyCell.row === this.table.frozenRowCount && firstBodyCell.attribute.y + y < 0 ? y = -firstBodyCell.attribute.y : lastBodyCell && this.table.tableNoFrameHeight < this.table.getAllRowsHeight() && lastBodyCell.row === this.table.rowCount - this.table.bottomFrozenRowCount - 1 && lastBodyCell.attribute.y + this.table.getRowHeight(lastBodyCell.row) + y < this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() && (y = this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() - lastBodyCell.attribute.y - this.table.getRowHeight(lastBodyCell.row)),
606
661
  this.colHeaderGroup.attribute.height + y !== this.bodyGroup.attribute.y && (this.bodyGroup.setAttribute("y", this.colHeaderGroup.attribute.height + y),
607
662
  this.rowHeaderGroup.setAttribute("y", this.cornerHeaderGroup.attribute.height + y),
608
- this.table.rightFrozenColCount > 0 && this.rightFrozenGroup.setAttribute("y", this.rightTopCornerGroup.attribute.height + y),
663
+ this.bodySelectGroup.setAttribute("y", this.bodyGroup.attribute.y), this.rowHeaderSelectGroup.setAttribute("y", this.rowHeaderGroup.attribute.y),
664
+ this.colHeaderSelectGroup.setAttribute("y", this.colHeaderGroup.attribute.y), this.cornerHeaderSelectGroup.setAttribute("y", this.cornerHeaderGroup.attribute.y),
665
+ this.table.rightFrozenColCount > 0 && (this.rightFrozenGroup.setAttribute("y", this.rightTopCornerGroup.attribute.height + y),
666
+ this.rightFrozenSelectGroup.setAttribute("y", this.rightFrozenGroup.attribute.y),
667
+ this.rightTopCornerSelectGroup.setAttribute("y", this.rightTopCornerGroup.attribute.y)),
668
+ this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenSelectGroup.setAttribute("y", this.bottomFrozenGroup.attribute.y),
669
+ this.leftBottomCornerSelectGroup.setAttribute("y", this.leftBottomCornerGroup.attribute.y)),
670
+ this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0 && this.rightBottomCornerSelectGroup.setAttribute("y", this.rightBottomCornerGroup.attribute.y),
609
671
  this.updateNextFrame());
610
672
  }
611
673
  setBodyAndColHeaderX(x) {
612
674
  const firstBodyCol = this.bodyGroup.firstChild, lastBodyCol = this.bodyGroup.lastChild;
613
675
  0 === x && firstBodyCol && firstBodyCol.col === this.table.frozenColCount && firstBodyCol.attribute.x + x < 0 ? x = -firstBodyCol.attribute.x : lastBodyCol && this.table.tableNoFrameWidth < this.table.getAllColsWidth() && lastBodyCol.col === this.table.colCount - this.table.rightFrozenColCount - 1 && lastBodyCol.attribute.x + lastBodyCol.attribute.width + x < this.table.tableNoFrameWidth - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth() && (x = this.table.tableNoFrameWidth - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth() - lastBodyCol.attribute.x - lastBodyCol.attribute.width),
614
676
  this.table.getFrozenColsWidth() + x !== this.bodyGroup.attribute.x && (this.bodyGroup.setAttribute("x", this.table.getFrozenColsWidth() + x),
615
- this.colHeaderGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.table.bottomFrozenRowCount > 0 && this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth() + x),
677
+ this.colHeaderGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.bodySelectGroup.setAttribute("x", this.bodyGroup.attribute.x),
678
+ this.colHeaderSelectGroup.setAttribute("x", this.colHeaderGroup.attribute.x), this.rowHeaderSelectGroup.setAttribute("x", this.rowHeaderGroup.attribute.x),
679
+ this.cornerHeaderSelectGroup.setAttribute("x", this.cornerHeaderGroup.attribute.x),
680
+ this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth() + x),
681
+ this.bottomFrozenSelectGroup.setAttribute("x", this.bottomFrozenGroup.attribute.x),
682
+ this.leftBottomCornerSelectGroup.setAttribute("x", this.leftBottomCornerGroup.attribute.x)),
683
+ this.table.rightFrozenColCount > 0 && (this.rightFrozenSelectGroup.setAttribute("x", this.rightFrozenGroup.attribute.x),
684
+ this.rightTopCornerSelectGroup.setAttribute("x", this.rightTopCornerGroup.attribute.x)),
685
+ this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0 && this.rightBottomCornerSelectGroup.setAttribute("x", this.rightBottomCornerGroup.attribute.x),
616
686
  this.updateNextFrame());
617
687
  }
618
688
  afterScenegraphCreated() {
619
- var _a;
689
+ var _a, _b;
620
690
  this.isPivot || this.table.transpose ? this.table.options.frozenColCount ? this.component.setFrozenColumnShadow(this.table.frozenColCount - 1) : this.table.options.rightFrozenColCount ? this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount) : this.component.setFrozenColumnShadow(-1) : (this.component.setFrozenColumnShadow(this.table.frozenColCount - 1),
621
691
  this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount)),
622
692
  this.table.stateManager.checkFrozen(), this.updateContainer(), this.createFrameBorder(),
623
693
  this.updateBorderSizeAndPosition(), this.component.updateScrollBar(), (0, stick_text_1.handleTextStick)(this.table),
624
694
  this.table.options.animationAppear && (0, appear_1.dealWithAnimationAppear)(this.table),
625
695
  !1 === (null === (_a = this.table.options.menu) || void 0 === _a ? void 0 : _a.contextMenuWorkOnlyCell) && this.canvasShowMenu(),
696
+ (null === (_b = this.table.stateManager.select.ranges) || void 0 === _b ? void 0 : _b.length) && this.recreateAllSelectRangeComponents(),
626
697
  this.updateNextFrame();
627
698
  }
628
699
  dealWidthMode() {
@@ -743,27 +814,44 @@ class Scenegraph {
743
814
  (0, move_cell_1.moveHeaderPosition)(updateColStart, updateColEnd, updateRowStart, updateRowEnd, moveType, this.table);
744
815
  }
745
816
  updateContainerAttrWidthAndX() {
746
- var _a, _b, _c;
747
- const cornerX = (0, update_container_1.updateContainerChildrenX)(this.cornerHeaderGroup, 0), rowHeaderX = (0,
748
- update_container_1.updateContainerChildrenX)(this.rowHeaderGroup, 0), colHeaderX = this.colHeaderGroup.hasChildNodes() && this.colHeaderGroup.firstChild ? (0,
749
- update_container_1.updateContainerChildrenX)(this.colHeaderGroup, this.colHeaderGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_a = this.table.frozenColCount) && void 0 !== _a ? _a : 0, this.colHeaderGroup.firstChild.col - 1) : 0) : 0, bodyX = this.bodyGroup.hasChildNodes() && this.bodyGroup.firstChild ? (0,
750
- update_container_1.updateContainerChildrenX)(this.bodyGroup, this.bodyGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_b = this.table.frozenColCount) && void 0 !== _b ? _b : 0, this.bodyGroup.firstChild.col - 1) : 0) : 0, rightX = (0,
751
- update_container_1.updateContainerChildrenX)(this.rightFrozenGroup.childrenCount > 0 ? this.rightFrozenGroup : this.rightTopCornerGroup, 0);
817
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
818
+ const frozenStartX = -(null !== (_c = null === (_b = (_a = this.table).getFrozenColsScrollLeft) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0), frozenViewportWidth = this.table.getFrozenColsWidth(), rightFrozenStartX = -this.table.getRightFrozenColsOffset() + (null !== (_f = null === (_e = (_d = this.table).getRightFrozenColsScrollLeft) || void 0 === _e ? void 0 : _e.call(_d)) && void 0 !== _f ? _f : 0), rightFrozenContentWidth = this.table.getRightFrozenColsContentWidth();
819
+ (0, update_container_1.updateContainerChildrenX)(this.cornerHeaderGroup, frozenStartX),
820
+ (0, update_container_1.updateContainerChildrenX)(this.rowHeaderGroup, frozenStartX);
821
+ const colHeaderX = this.colHeaderGroup.hasChildNodes() && this.colHeaderGroup.firstChild ? (0,
822
+ update_container_1.updateContainerChildrenX)(this.colHeaderGroup, this.colHeaderGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_g = this.table.frozenColCount) && void 0 !== _g ? _g : 0, this.colHeaderGroup.firstChild.col - 1) : 0) : 0, bodyX = this.bodyGroup.hasChildNodes() && this.bodyGroup.firstChild ? (0,
823
+ update_container_1.updateContainerChildrenX)(this.bodyGroup, this.bodyGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_h = this.table.frozenColCount) && void 0 !== _h ? _h : 0, this.bodyGroup.firstChild.col - 1) : 0) : 0;
824
+ this.rightFrozenGroup.childrenCount > 0 && (0, update_container_1.updateContainerChildrenX)(this.rightFrozenGroup, rightFrozenStartX),
752
825
  this.bottomFrozenGroup.hasChildNodes() && this.bottomFrozenGroup.firstChild && (0,
753
- update_container_1.updateContainerChildrenX)(this.bottomFrozenGroup, this.bottomFrozenGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_c = this.table.frozenColCount) && void 0 !== _c ? _c : 0, this.bottomFrozenGroup.firstChild.col - 1) : 0),
754
- (0, update_container_1.updateContainerChildrenX)(this.leftBottomCornerGroup, 0),
755
- (0, update_container_1.updateContainerChildrenX)(this.rightTopCornerGroup, 0), (0,
756
- update_container_1.updateContainerChildrenX)(this.rightBottomCornerGroup, 0), this.cornerHeaderGroup.setDeltaWidth(cornerX - this.cornerHeaderGroup.attribute.width),
757
- this.leftBottomCornerGroup.setDeltaWidth(cornerX - this.leftBottomCornerGroup.attribute.width),
826
+ update_container_1.updateContainerChildrenX)(this.bottomFrozenGroup, this.bottomFrozenGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_j = this.table.frozenColCount) && void 0 !== _j ? _j : 0, this.bottomFrozenGroup.firstChild.col - 1) : 0),
827
+ (0, update_container_1.updateContainerChildrenX)(this.leftBottomCornerGroup, frozenStartX),
828
+ (0, update_container_1.updateContainerChildrenX)(this.rightTopCornerGroup, rightFrozenStartX),
829
+ (0, update_container_1.updateContainerChildrenX)(this.rightBottomCornerGroup, rightFrozenStartX),
830
+ this.cornerHeaderGroup.setDeltaWidth(frozenViewportWidth - this.cornerHeaderGroup.attribute.width),
831
+ this.leftBottomCornerGroup.setDeltaWidth(frozenViewportWidth - this.leftBottomCornerGroup.attribute.width),
758
832
  this.colHeaderGroup.setDeltaWidth(colHeaderX - this.colHeaderGroup.attribute.width),
759
- this.rowHeaderGroup.setDeltaWidth(rowHeaderX - this.rowHeaderGroup.attribute.width),
833
+ this.rowHeaderGroup.setDeltaWidth(frozenViewportWidth - this.rowHeaderGroup.attribute.width),
760
834
  this.bottomFrozenGroup.setDeltaWidth(colHeaderX - this.bottomFrozenGroup.attribute.width),
761
- this.rightFrozenGroup.setDeltaWidth(rightX - this.rightFrozenGroup.attribute.width),
762
- this.rightTopCornerGroup.setDeltaWidth(rightX - this.rightTopCornerGroup.attribute.width),
763
- this.rightBottomCornerGroup.setDeltaWidth(rightX - this.rightBottomCornerGroup.attribute.width),
835
+ this.rightFrozenGroup.setDeltaWidth(rightFrozenContentWidth - this.rightFrozenGroup.attribute.width),
836
+ this.rightTopCornerGroup.setDeltaWidth(rightFrozenContentWidth - this.rightTopCornerGroup.attribute.width),
837
+ this.rightBottomCornerGroup.setDeltaWidth(rightFrozenContentWidth - this.rightBottomCornerGroup.attribute.width),
764
838
  this.bodyGroup.setDeltaWidth(bodyX - this.bodyGroup.attribute.width), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width),
765
839
  this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth()), this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width);
766
840
  }
841
+ setFrozenColsScrollLeft(left) {
842
+ const frozenStartX = -left;
843
+ (0, update_container_1.updateContainerChildrenX)(this.cornerHeaderGroup, frozenStartX),
844
+ (0, update_container_1.updateContainerChildrenX)(this.rowHeaderGroup, frozenStartX),
845
+ (0, update_container_1.updateContainerChildrenX)(this.leftBottomCornerGroup, frozenStartX),
846
+ this.updateNextFrame();
847
+ }
848
+ setRightFrozenColsScrollLeft(left) {
849
+ const rightStartX = -this.table.getRightFrozenColsOffset() + left;
850
+ (0, update_container_1.updateContainerChildrenX)(this.rightFrozenGroup, rightStartX),
851
+ (0, update_container_1.updateContainerChildrenX)(this.rightTopCornerGroup, rightStartX),
852
+ (0, update_container_1.updateContainerChildrenX)(this.rightBottomCornerGroup, rightStartX),
853
+ this.updateNextFrame();
854
+ }
767
855
  updateContainerAttrHeightAndY() {
768
856
  var _a, _b, _c;
769
857
  for (let i = 0; i < this.cornerHeaderGroup.children.length; i++) (0, update_container_1.updateContainerChildrenY)(this.cornerHeaderGroup.children[i], 0);
@@ -793,7 +881,90 @@ class Scenegraph {
793
881
  updateContainerSync(needUpdateCellY = !1) {
794
882
  this._needUpdateContainer && (this._needUpdateContainer = !1, this.updateContainerAttrWidthAndX(),
795
883
  needUpdateCellY && this.updateContainerAttrHeightAndY(), this.updateTableSize(),
796
- this.component.updateScrollBar(), this.updateNextFrame());
884
+ this.syncSelectOverlayGroups(), this.component.updateScrollBar(), this.updateNextFrame());
885
+ }
886
+ syncSelectOverlayGroups() {
887
+ this.bodySelectGroup.setAttributes({
888
+ x: this.bodyGroup.attribute.x,
889
+ y: this.bodyGroup.attribute.y,
890
+ width: this.bodyGroup.attribute.width,
891
+ height: this.bodyGroup.attribute.height
892
+ }), this.rowHeaderSelectGroup.setAttributes({
893
+ x: this.rowHeaderGroup.attribute.x,
894
+ y: this.rowHeaderGroup.attribute.y,
895
+ width: this.rowHeaderGroup.attribute.width,
896
+ height: this.rowHeaderGroup.attribute.height
897
+ }), this.colHeaderSelectGroup.setAttributes({
898
+ x: this.colHeaderGroup.attribute.x,
899
+ y: this.colHeaderGroup.attribute.y,
900
+ width: this.colHeaderGroup.attribute.width,
901
+ height: this.colHeaderGroup.attribute.height
902
+ }), this.cornerHeaderSelectGroup.setAttributes({
903
+ x: this.cornerHeaderGroup.attribute.x,
904
+ y: this.cornerHeaderGroup.attribute.y,
905
+ width: this.cornerHeaderGroup.attribute.width,
906
+ height: this.cornerHeaderGroup.attribute.height
907
+ }), this.rightFrozenSelectGroup.setAttributes({
908
+ x: this.rightFrozenGroup.attribute.x,
909
+ y: this.rightFrozenGroup.attribute.y,
910
+ width: this.rightFrozenGroup.attribute.width,
911
+ height: this.rightFrozenGroup.attribute.height,
912
+ visible: this.rightFrozenGroup.attribute.visible
913
+ }), this.bottomFrozenSelectGroup.setAttributes({
914
+ x: this.bottomFrozenGroup.attribute.x,
915
+ y: this.bottomFrozenGroup.attribute.y,
916
+ width: this.bottomFrozenGroup.attribute.width,
917
+ height: this.bottomFrozenGroup.attribute.height,
918
+ visible: this.bottomFrozenGroup.attribute.visible
919
+ }), this.rightTopCornerSelectGroup.setAttributes({
920
+ x: this.rightTopCornerGroup.attribute.x,
921
+ y: this.rightTopCornerGroup.attribute.y,
922
+ width: this.rightTopCornerGroup.attribute.width,
923
+ height: this.rightTopCornerGroup.attribute.height,
924
+ visible: this.rightTopCornerGroup.attribute.visible
925
+ }), this.leftBottomCornerSelectGroup.setAttributes({
926
+ x: this.leftBottomCornerGroup.attribute.x,
927
+ y: this.leftBottomCornerGroup.attribute.y,
928
+ width: this.leftBottomCornerGroup.attribute.width,
929
+ height: this.leftBottomCornerGroup.attribute.height,
930
+ visible: this.leftBottomCornerGroup.attribute.visible
931
+ }), this.rightBottomCornerSelectGroup.setAttributes({
932
+ x: this.rightBottomCornerGroup.attribute.x,
933
+ y: this.rightBottomCornerGroup.attribute.y,
934
+ width: this.rightBottomCornerGroup.attribute.width,
935
+ height: this.rightBottomCornerGroup.attribute.height,
936
+ visible: this.rightBottomCornerGroup.attribute.visible
937
+ });
938
+ }
939
+ getSelectOverlayGroup(selectRangeType) {
940
+ switch (selectRangeType) {
941
+ case "body":
942
+ return this.bodySelectGroup;
943
+
944
+ case "rowHeader":
945
+ return this.rowHeaderSelectGroup;
946
+
947
+ case "bottomFrozen":
948
+ return this.bottomFrozenSelectGroup;
949
+
950
+ case "columnHeader":
951
+ return this.colHeaderSelectGroup;
952
+
953
+ case "rightFrozen":
954
+ return this.rightFrozenSelectGroup;
955
+
956
+ case "rightTopCorner":
957
+ return this.rightTopCornerSelectGroup;
958
+
959
+ case "leftBottomCorner":
960
+ return this.leftBottomCornerSelectGroup;
961
+
962
+ case "rightBottomCorner":
963
+ return this.rightBottomCornerSelectGroup;
964
+
965
+ default:
966
+ return this.cornerHeaderSelectGroup;
967
+ }
797
968
  }
798
969
  updateCellContentWhileResize(col, row) {
799
970
  var _a;