k-vtable 1.0.34 → 1.0.35
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/ListTable.d.ts +1 -0
- package/cjs/ListTable.js +184 -25
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.js +3 -2
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.d.ts +1 -0
- package/cjs/PivotTable.js +95 -15
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +14 -0
- package/cjs/core/BaseTable.js +149 -41
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +2 -0
- package/cjs/core/TABLE_EVENT_TYPE.js +2 -0
- package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/core/record-helper.js +83 -13
- package/cjs/core/record-helper.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/data/DataSource.js +3 -2
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/dataset/dataset.js +5 -1
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/edit/edit-manager.js +24 -16
- package/cjs/edit/edit-manager.js.map +1 -1
- package/cjs/event/EventTarget.js +3 -1
- package/cjs/event/EventTarget.js.map +1 -1
- package/cjs/event/helper.js +1 -1
- package/cjs/event/listener/container-dom.js +11 -6
- 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 +53 -23
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/media-click.js +1 -1
- package/cjs/event/scroll.js +35 -12
- package/cjs/event/scroll.js.map +1 -1
- package/cjs/event/sparkline-event.js +1 -1
- package/cjs/event/util.d.ts +2 -0
- package/cjs/event/util.js +29 -4
- package/cjs/event/util.js.map +1 -1
- package/cjs/header-helper/header-helper.js +2 -2
- package/cjs/header-helper/header-helper.js.map +1 -1
- package/cjs/header-helper/style.js +2 -1
- package/cjs/index.d.ts +3 -3
- package/cjs/index.js +51 -12
- package/cjs/index.js.map +1 -1
- package/cjs/layout/cell-range/simple-cell-range.js +14 -5
- package/cjs/layout/cell-range/simple-cell-range.js.map +1 -1
- package/cjs/plugins/index.js +1 -1
- package/cjs/plugins/interface.js +1 -1
- package/cjs/plugins/invert-highlight.js +1 -1
- package/cjs/plugins/list-tree-stick-cell.js +1 -1
- package/cjs/plugins/plugin-manager.js +1 -1
- package/cjs/scenegraph/component/table-component.d.ts +6 -1
- package/cjs/scenegraph/component/table-component.js +143 -17
- 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/cell-helper.js +7 -4
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/init-scenegraph.js +37 -7
- 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 +27 -122
- 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/select/update-position.js +2 -1
- package/cjs/state/select/update-position.js.map +1 -1
- package/cjs/state/state.d.ts +8 -1
- package/cjs/state/state.js +82 -40
- package/cjs/state/state.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +15 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/dataset/aggregation.js +94 -39
- package/cjs/ts-types/dataset/aggregation.js.map +1 -1
- package/cjs/ts-types/events.d.ts +16 -0
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +2381 -733
- package/dist/vtable.min.js +1 -15
- package/es/ListTable.d.ts +1 -0
- package/es/ListTable.js +178 -25
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.js +2 -2
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.d.ts +1 -0
- package/es/PivotTable.js +93 -15
- package/es/PivotTable.js.map +1 -1
- package/es/core/BaseTable.d.ts +14 -0
- package/es/core/BaseTable.js +148 -40
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.d.ts +2 -0
- package/es/core/TABLE_EVENT_TYPE.js +2 -0
- package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/es/core/record-helper.js +83 -12
- package/es/core/record-helper.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/data/DataSource.js +3 -2
- package/es/data/DataSource.js.map +1 -1
- package/es/dataset/dataset.js +5 -1
- package/es/dataset/dataset.js.map +1 -1
- package/es/edit/edit-manager.js +22 -16
- package/es/edit/edit-manager.js.map +1 -1
- package/es/event/EventTarget.js +3 -1
- package/es/event/EventTarget.js.map +1 -1
- package/es/event/helper.js +1 -1
- package/es/event/listener/container-dom.js +10 -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 +53 -24
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/media-click.js +1 -1
- package/es/event/scroll.js +35 -12
- package/es/event/scroll.js.map +1 -1
- package/es/event/sparkline-event.js +1 -1
- package/es/event/util.d.ts +2 -0
- package/es/event/util.js +25 -1
- package/es/event/util.js.map +1 -1
- package/es/header-helper/header-helper.js +2 -2
- package/es/header-helper/header-helper.js.map +1 -1
- package/es/header-helper/style.js +2 -1
- package/es/index.d.ts +3 -3
- package/es/index.js +5 -3
- package/es/index.js.map +1 -1
- package/es/layout/cell-range/simple-cell-range.js +14 -5
- package/es/layout/cell-range/simple-cell-range.js.map +1 -1
- package/es/plugins/index.js +1 -1
- package/es/plugins/interface.js +1 -1
- package/es/plugins/invert-highlight.js +1 -1
- package/es/plugins/list-tree-stick-cell.js +1 -1
- package/es/plugins/plugin-manager.js +1 -1
- package/es/scenegraph/component/table-component.d.ts +6 -1
- package/es/scenegraph/component/table-component.js +141 -17
- 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/cell-helper.js +7 -4
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/init-scenegraph.js +37 -7
- 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 +25 -118
- 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/select/update-position.js +3 -0
- package/es/state/select/update-position.js.map +1 -1
- package/es/state/state.d.ts +8 -1
- package/es/state/state.js +81 -40
- package/es/state/state.js.map +1 -1
- package/es/ts-types/base-table.d.ts +15 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/dataset/aggregation.js +68 -38
- package/es/ts-types/dataset/aggregation.js.map +1 -1
- package/es/ts-types/events.d.ts +16 -0
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +12 -11
|
@@ -175,7 +175,7 @@ export class Scenegraph {
|
|
|
175
175
|
}));
|
|
176
176
|
}
|
|
177
177
|
clearCells() {
|
|
178
|
-
var _a, _b;
|
|
178
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
179
179
|
this.table.animationManager.clear(), (this.table.isPivotChart() || this.table._hasCustomRenderOrLayout()) && this.stage.pluginService.findPluginsByName("poptipForText").forEach((plugin => {
|
|
180
180
|
plugin.deactivate(this.stage.pluginService);
|
|
181
181
|
})), this.clear = !0, this.hasFrozen = !1, this.mergeMap.clear(), this.colHeaderGroup.clear(),
|
|
@@ -184,7 +184,12 @@ export class Scenegraph {
|
|
|
184
184
|
delete this.bodyGroup.border, this.bottomFrozenGroup.clear(), delete this.bottomFrozenGroup.border,
|
|
185
185
|
this.rightFrozenGroup.clear(), delete this.rightFrozenGroup.border, this.rightTopCornerGroup.clear(),
|
|
186
186
|
delete this.rightTopCornerGroup.border, this.rightBottomCornerGroup.clear(), delete this.rightBottomCornerGroup.border,
|
|
187
|
-
this.leftBottomCornerGroup.clear(), delete this.leftBottomCornerGroup.border, this.
|
|
187
|
+
this.leftBottomCornerGroup.clear(), delete this.leftBottomCornerGroup.border, null === (_a = this.bodySelectGroup) || void 0 === _a || _a.clear(),
|
|
188
|
+
null === (_b = this.rowHeaderSelectGroup) || void 0 === _b || _b.clear(), null === (_c = this.bottomFrozenSelectGroup) || void 0 === _c || _c.clear(),
|
|
189
|
+
null === (_d = this.colHeaderSelectGroup) || void 0 === _d || _d.clear(), null === (_e = this.rightFrozenSelectGroup) || void 0 === _e || _e.clear(),
|
|
190
|
+
null === (_f = this.rightTopCornerSelectGroup) || void 0 === _f || _f.clear(), null === (_g = this.leftBottomCornerSelectGroup) || void 0 === _g || _g.clear(),
|
|
191
|
+
null === (_h = this.rightBottomCornerSelectGroup) || void 0 === _h || _h.clear(),
|
|
192
|
+
null === (_j = this.cornerHeaderSelectGroup) || void 0 === _j || _j.clear(), this.colHeaderGroup.setAttributes({
|
|
188
193
|
x: 0,
|
|
189
194
|
y: 0,
|
|
190
195
|
width: 0,
|
|
@@ -232,14 +237,64 @@ export class Scenegraph {
|
|
|
232
237
|
width: 0,
|
|
233
238
|
height: 0,
|
|
234
239
|
visible: !1
|
|
240
|
+
}), null === (_k = this.bodySelectGroup) || void 0 === _k || _k.setAttributes({
|
|
241
|
+
x: 0,
|
|
242
|
+
y: 0,
|
|
243
|
+
width: 0,
|
|
244
|
+
height: 0
|
|
245
|
+
}), null === (_l = this.rowHeaderSelectGroup) || void 0 === _l || _l.setAttributes({
|
|
246
|
+
x: 0,
|
|
247
|
+
y: 0,
|
|
248
|
+
width: 0,
|
|
249
|
+
height: 0
|
|
250
|
+
}), null === (_m = this.bottomFrozenSelectGroup) || void 0 === _m || _m.setAttributes({
|
|
251
|
+
x: 0,
|
|
252
|
+
y: 0,
|
|
253
|
+
width: 0,
|
|
254
|
+
height: 0,
|
|
255
|
+
visible: !1
|
|
256
|
+
}), null === (_o = this.colHeaderSelectGroup) || void 0 === _o || _o.setAttributes({
|
|
257
|
+
x: 0,
|
|
258
|
+
y: 0,
|
|
259
|
+
width: 0,
|
|
260
|
+
height: 0
|
|
261
|
+
}), null === (_p = this.rightFrozenSelectGroup) || void 0 === _p || _p.setAttributes({
|
|
262
|
+
x: 0,
|
|
263
|
+
y: 0,
|
|
264
|
+
width: 0,
|
|
265
|
+
height: 0,
|
|
266
|
+
visible: !1
|
|
267
|
+
}), null === (_q = this.rightTopCornerSelectGroup) || void 0 === _q || _q.setAttributes({
|
|
268
|
+
x: 0,
|
|
269
|
+
y: 0,
|
|
270
|
+
width: 0,
|
|
271
|
+
height: 0,
|
|
272
|
+
visible: !1
|
|
273
|
+
}), null === (_r = this.leftBottomCornerSelectGroup) || void 0 === _r || _r.setAttributes({
|
|
274
|
+
x: 0,
|
|
275
|
+
y: 0,
|
|
276
|
+
width: 0,
|
|
277
|
+
height: 0,
|
|
278
|
+
visible: !1
|
|
279
|
+
}), null === (_s = this.rightBottomCornerSelectGroup) || void 0 === _s || _s.setAttributes({
|
|
280
|
+
x: 0,
|
|
281
|
+
y: 0,
|
|
282
|
+
width: 0,
|
|
283
|
+
height: 0,
|
|
284
|
+
visible: !1
|
|
285
|
+
}), null === (_t = this.cornerHeaderSelectGroup) || void 0 === _t || _t.setAttributes({
|
|
286
|
+
x: 0,
|
|
287
|
+
y: 0,
|
|
288
|
+
width: 0,
|
|
289
|
+
height: 0
|
|
235
290
|
}), this.tableGroup.setAttributes({
|
|
236
291
|
x: this.table.tableX,
|
|
237
292
|
y: this.table.tableY,
|
|
238
293
|
width: 0,
|
|
239
294
|
height: 0
|
|
240
295
|
}), this.tableGroup.border && (this.tableGroup.parent.removeChild(this.tableGroup.border),
|
|
241
|
-
delete this.tableGroup.border), null === (
|
|
242
|
-
null === (
|
|
296
|
+
delete this.tableGroup.border), null === (_u = this.proxy) || void 0 === _u || _u.release(),
|
|
297
|
+
null === (_v = this.table.reactCustomLayout) || void 0 === _v || _v.clearCache();
|
|
243
298
|
}
|
|
244
299
|
updateStageBackground() {
|
|
245
300
|
this.stage.background = this.table.theme.underlayBackgroundColor, this.stage.renderNextFrame();
|
|
@@ -644,24 +699,40 @@ export class Scenegraph {
|
|
|
644
699
|
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)),
|
|
645
700
|
this.colHeaderGroup.attribute.height + y !== this.bodyGroup.attribute.y && (this.bodyGroup.setAttribute("y", this.colHeaderGroup.attribute.height + y),
|
|
646
701
|
this.rowHeaderGroup.setAttribute("y", this.cornerHeaderGroup.attribute.height + y),
|
|
647
|
-
this.
|
|
702
|
+
this.bodySelectGroup.setAttribute("y", this.bodyGroup.attribute.y), this.rowHeaderSelectGroup.setAttribute("y", this.rowHeaderGroup.attribute.y),
|
|
703
|
+
this.colHeaderSelectGroup.setAttribute("y", this.colHeaderGroup.attribute.y), this.cornerHeaderSelectGroup.setAttribute("y", this.cornerHeaderGroup.attribute.y),
|
|
704
|
+
this.table.rightFrozenColCount > 0 && (this.rightFrozenGroup.setAttribute("y", this.rightTopCornerGroup.attribute.height + y),
|
|
705
|
+
this.rightFrozenSelectGroup.setAttribute("y", this.rightFrozenGroup.attribute.y),
|
|
706
|
+
this.rightTopCornerSelectGroup.setAttribute("y", this.rightTopCornerGroup.attribute.y)),
|
|
707
|
+
this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenSelectGroup.setAttribute("y", this.bottomFrozenGroup.attribute.y),
|
|
708
|
+
this.leftBottomCornerSelectGroup.setAttribute("y", this.leftBottomCornerGroup.attribute.y)),
|
|
709
|
+
this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0 && this.rightBottomCornerSelectGroup.setAttribute("y", this.rightBottomCornerGroup.attribute.y),
|
|
648
710
|
this.updateNextFrame());
|
|
649
711
|
}
|
|
650
712
|
setBodyAndColHeaderX(x) {
|
|
651
713
|
const firstBodyCol = this.bodyGroup.firstChild, lastBodyCol = this.bodyGroup.lastChild;
|
|
652
714
|
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),
|
|
653
715
|
this.table.getFrozenColsWidth() + x !== this.bodyGroup.attribute.x && (this.bodyGroup.setAttribute("x", this.table.getFrozenColsWidth() + x),
|
|
654
|
-
this.colHeaderGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.
|
|
716
|
+
this.colHeaderGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.bodySelectGroup.setAttribute("x", this.bodyGroup.attribute.x),
|
|
717
|
+
this.colHeaderSelectGroup.setAttribute("x", this.colHeaderGroup.attribute.x), this.rowHeaderSelectGroup.setAttribute("x", this.rowHeaderGroup.attribute.x),
|
|
718
|
+
this.cornerHeaderSelectGroup.setAttribute("x", this.cornerHeaderGroup.attribute.x),
|
|
719
|
+
this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth() + x),
|
|
720
|
+
this.bottomFrozenSelectGroup.setAttribute("x", this.bottomFrozenGroup.attribute.x),
|
|
721
|
+
this.leftBottomCornerSelectGroup.setAttribute("x", this.leftBottomCornerGroup.attribute.x)),
|
|
722
|
+
this.table.rightFrozenColCount > 0 && (this.rightFrozenSelectGroup.setAttribute("x", this.rightFrozenGroup.attribute.x),
|
|
723
|
+
this.rightTopCornerSelectGroup.setAttribute("x", this.rightTopCornerGroup.attribute.x)),
|
|
724
|
+
this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0 && this.rightBottomCornerSelectGroup.setAttribute("x", this.rightBottomCornerGroup.attribute.x),
|
|
655
725
|
this.updateNextFrame());
|
|
656
726
|
}
|
|
657
727
|
afterScenegraphCreated() {
|
|
658
|
-
var _a;
|
|
728
|
+
var _a, _b;
|
|
659
729
|
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),
|
|
660
730
|
this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount),
|
|
661
731
|
this.component.setBottomFrozenColumnShadow(), this.component.setTopFrozenColumnShadow()),
|
|
662
732
|
this.table.stateManager.checkFrozen(), this.updateContainer(), this.createFrameBorder(),
|
|
663
733
|
this.updateBorderSizeAndPosition(), this.component.updateScrollBar(), handleTextStick(this.table),
|
|
664
734
|
this.table.options.animationAppear && dealWithAnimationAppear(this.table), !1 === (null === (_a = this.table.options.menu) || void 0 === _a ? void 0 : _a.contextMenuWorkOnlyCell) && this.canvasShowMenu(),
|
|
735
|
+
(null === (_b = this.table.stateManager.select.ranges) || void 0 === _b ? void 0 : _b.length) && this.recreateAllSelectRangeComponents(),
|
|
665
736
|
this.updateNextFrame();
|
|
666
737
|
}
|
|
667
738
|
dealWidthMode() {
|
|
@@ -781,23 +852,36 @@ export class Scenegraph {
|
|
|
781
852
|
moveHeaderPosition(updateColStart, updateColEnd, updateRowStart, updateRowEnd, moveType, this.table);
|
|
782
853
|
}
|
|
783
854
|
updateContainerAttrWidthAndX() {
|
|
784
|
-
var _a, _b, _c;
|
|
785
|
-
const
|
|
786
|
-
|
|
787
|
-
updateContainerChildrenX(this.
|
|
788
|
-
|
|
789
|
-
this.
|
|
855
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
856
|
+
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();
|
|
857
|
+
updateContainerChildrenX(this.cornerHeaderGroup, frozenStartX), updateContainerChildrenX(this.rowHeaderGroup, frozenStartX);
|
|
858
|
+
const colHeaderX = this.colHeaderGroup.hasChildNodes() && this.colHeaderGroup.firstChild ? 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 ? 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;
|
|
859
|
+
this.rightFrozenGroup.childrenCount > 0 && updateContainerChildrenX(this.rightFrozenGroup, rightFrozenStartX),
|
|
860
|
+
this.bottomFrozenGroup.hasChildNodes() && this.bottomFrozenGroup.firstChild && 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),
|
|
861
|
+
updateContainerChildrenX(this.leftBottomCornerGroup, frozenStartX), updateContainerChildrenX(this.rightTopCornerGroup, rightFrozenStartX),
|
|
862
|
+
updateContainerChildrenX(this.rightBottomCornerGroup, rightFrozenStartX), this.cornerHeaderGroup.setDeltaWidth(frozenViewportWidth - this.cornerHeaderGroup.attribute.width),
|
|
863
|
+
this.leftBottomCornerGroup.setDeltaWidth(frozenViewportWidth - this.leftBottomCornerGroup.attribute.width),
|
|
790
864
|
this.colHeaderGroup.setDeltaWidth(colHeaderX - this.colHeaderGroup.attribute.width),
|
|
791
|
-
this.rowHeaderGroup.setDeltaWidth(
|
|
865
|
+
this.rowHeaderGroup.setDeltaWidth(frozenViewportWidth - this.rowHeaderGroup.attribute.width),
|
|
792
866
|
this.bottomFrozenGroup.setDeltaWidth(colHeaderX - this.bottomFrozenGroup.attribute.width),
|
|
793
|
-
this.rightFrozenGroup.setDeltaWidth(
|
|
794
|
-
this.rightTopCornerGroup.setDeltaWidth(
|
|
795
|
-
this.rightBottomCornerGroup.setDeltaWidth(
|
|
867
|
+
this.rightFrozenGroup.setDeltaWidth(rightFrozenContentWidth - this.rightFrozenGroup.attribute.width),
|
|
868
|
+
this.rightTopCornerGroup.setDeltaWidth(rightFrozenContentWidth - this.rightTopCornerGroup.attribute.width),
|
|
869
|
+
this.rightBottomCornerGroup.setDeltaWidth(rightFrozenContentWidth - this.rightBottomCornerGroup.attribute.width),
|
|
796
870
|
this.bodyGroup.setDeltaWidth(bodyX - this.bodyGroup.attribute.width), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width),
|
|
797
871
|
this.colHeaderGroup.setAttribute("y", this.table.stateManager.stickyTop), this.cornerHeaderGroup.setAttribute("y", this.table.stateManager.stickyTop),
|
|
798
872
|
this.rightTopCornerGroup.setAttribute("y", this.table.stateManager.stickyTop), this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth()),
|
|
799
873
|
this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width);
|
|
800
874
|
}
|
|
875
|
+
setFrozenColsScrollLeft(left) {
|
|
876
|
+
const frozenStartX = -left;
|
|
877
|
+
updateContainerChildrenX(this.cornerHeaderGroup, frozenStartX), updateContainerChildrenX(this.rowHeaderGroup, frozenStartX),
|
|
878
|
+
updateContainerChildrenX(this.leftBottomCornerGroup, frozenStartX), this.updateNextFrame();
|
|
879
|
+
}
|
|
880
|
+
setRightFrozenColsScrollLeft(left) {
|
|
881
|
+
const rightStartX = -this.table.getRightFrozenColsOffset() + left;
|
|
882
|
+
updateContainerChildrenX(this.rightFrozenGroup, rightStartX), updateContainerChildrenX(this.rightTopCornerGroup, rightStartX),
|
|
883
|
+
updateContainerChildrenX(this.rightBottomCornerGroup, rightStartX), this.updateNextFrame();
|
|
884
|
+
}
|
|
801
885
|
updateContainerAttrHeightAndY() {
|
|
802
886
|
var _a, _b, _c;
|
|
803
887
|
for (let i = 0; i < this.cornerHeaderGroup.children.length; i++) updateContainerChildrenY(this.cornerHeaderGroup.children[i], 0);
|
|
@@ -824,7 +908,90 @@ export class Scenegraph {
|
|
|
824
908
|
updateContainerSync(needUpdateCellY = !1) {
|
|
825
909
|
this._needUpdateContainer && (this._needUpdateContainer = !1, this.updateContainerAttrWidthAndX(),
|
|
826
910
|
needUpdateCellY && this.updateContainerAttrHeightAndY(), this.updateTableSize(),
|
|
827
|
-
this.component.updateScrollBar(), this.updateNextFrame());
|
|
911
|
+
this.syncSelectOverlayGroups(), this.component.updateScrollBar(), this.updateNextFrame());
|
|
912
|
+
}
|
|
913
|
+
syncSelectOverlayGroups() {
|
|
914
|
+
this.bodySelectGroup.setAttributes({
|
|
915
|
+
x: this.bodyGroup.attribute.x,
|
|
916
|
+
y: this.bodyGroup.attribute.y,
|
|
917
|
+
width: this.bodyGroup.attribute.width,
|
|
918
|
+
height: this.bodyGroup.attribute.height
|
|
919
|
+
}), this.rowHeaderSelectGroup.setAttributes({
|
|
920
|
+
x: this.rowHeaderGroup.attribute.x,
|
|
921
|
+
y: this.rowHeaderGroup.attribute.y,
|
|
922
|
+
width: this.rowHeaderGroup.attribute.width,
|
|
923
|
+
height: this.rowHeaderGroup.attribute.height
|
|
924
|
+
}), this.colHeaderSelectGroup.setAttributes({
|
|
925
|
+
x: this.colHeaderGroup.attribute.x,
|
|
926
|
+
y: this.colHeaderGroup.attribute.y,
|
|
927
|
+
width: this.colHeaderGroup.attribute.width,
|
|
928
|
+
height: this.colHeaderGroup.attribute.height
|
|
929
|
+
}), this.cornerHeaderSelectGroup.setAttributes({
|
|
930
|
+
x: this.cornerHeaderGroup.attribute.x,
|
|
931
|
+
y: this.cornerHeaderGroup.attribute.y,
|
|
932
|
+
width: this.cornerHeaderGroup.attribute.width,
|
|
933
|
+
height: this.cornerHeaderGroup.attribute.height
|
|
934
|
+
}), this.rightFrozenSelectGroup.setAttributes({
|
|
935
|
+
x: this.rightFrozenGroup.attribute.x,
|
|
936
|
+
y: this.rightFrozenGroup.attribute.y,
|
|
937
|
+
width: this.rightFrozenGroup.attribute.width,
|
|
938
|
+
height: this.rightFrozenGroup.attribute.height,
|
|
939
|
+
visible: this.rightFrozenGroup.attribute.visible
|
|
940
|
+
}), this.bottomFrozenSelectGroup.setAttributes({
|
|
941
|
+
x: this.bottomFrozenGroup.attribute.x,
|
|
942
|
+
y: this.bottomFrozenGroup.attribute.y,
|
|
943
|
+
width: this.bottomFrozenGroup.attribute.width,
|
|
944
|
+
height: this.bottomFrozenGroup.attribute.height,
|
|
945
|
+
visible: this.bottomFrozenGroup.attribute.visible
|
|
946
|
+
}), this.rightTopCornerSelectGroup.setAttributes({
|
|
947
|
+
x: this.rightTopCornerGroup.attribute.x,
|
|
948
|
+
y: this.rightTopCornerGroup.attribute.y,
|
|
949
|
+
width: this.rightTopCornerGroup.attribute.width,
|
|
950
|
+
height: this.rightTopCornerGroup.attribute.height,
|
|
951
|
+
visible: this.rightTopCornerGroup.attribute.visible
|
|
952
|
+
}), this.leftBottomCornerSelectGroup.setAttributes({
|
|
953
|
+
x: this.leftBottomCornerGroup.attribute.x,
|
|
954
|
+
y: this.leftBottomCornerGroup.attribute.y,
|
|
955
|
+
width: this.leftBottomCornerGroup.attribute.width,
|
|
956
|
+
height: this.leftBottomCornerGroup.attribute.height,
|
|
957
|
+
visible: this.leftBottomCornerGroup.attribute.visible
|
|
958
|
+
}), this.rightBottomCornerSelectGroup.setAttributes({
|
|
959
|
+
x: this.rightBottomCornerGroup.attribute.x,
|
|
960
|
+
y: this.rightBottomCornerGroup.attribute.y,
|
|
961
|
+
width: this.rightBottomCornerGroup.attribute.width,
|
|
962
|
+
height: this.rightBottomCornerGroup.attribute.height,
|
|
963
|
+
visible: this.rightBottomCornerGroup.attribute.visible
|
|
964
|
+
});
|
|
965
|
+
}
|
|
966
|
+
getSelectOverlayGroup(selectRangeType) {
|
|
967
|
+
switch (selectRangeType) {
|
|
968
|
+
case "body":
|
|
969
|
+
return this.bodySelectGroup;
|
|
970
|
+
|
|
971
|
+
case "rowHeader":
|
|
972
|
+
return this.rowHeaderSelectGroup;
|
|
973
|
+
|
|
974
|
+
case "bottomFrozen":
|
|
975
|
+
return this.bottomFrozenSelectGroup;
|
|
976
|
+
|
|
977
|
+
case "columnHeader":
|
|
978
|
+
return this.colHeaderSelectGroup;
|
|
979
|
+
|
|
980
|
+
case "rightFrozen":
|
|
981
|
+
return this.rightFrozenSelectGroup;
|
|
982
|
+
|
|
983
|
+
case "rightTopCorner":
|
|
984
|
+
return this.rightTopCornerSelectGroup;
|
|
985
|
+
|
|
986
|
+
case "leftBottomCorner":
|
|
987
|
+
return this.leftBottomCornerSelectGroup;
|
|
988
|
+
|
|
989
|
+
case "rightBottomCorner":
|
|
990
|
+
return this.rightBottomCornerSelectGroup;
|
|
991
|
+
|
|
992
|
+
default:
|
|
993
|
+
return this.cornerHeaderSelectGroup;
|
|
994
|
+
}
|
|
828
995
|
}
|
|
829
996
|
updateCellContentWhileResize(col, row) {
|
|
830
997
|
var _a;
|