@visactor/vtable 0.9.1-alpha.5 → 0.9.2-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.
- package/cjs/core/BaseTable.d.ts +1 -1
- package/cjs/core/BaseTable.js +9 -7
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/event/event.js +1 -1
- package/cjs/event/event.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/layout/pivot-header-layout.d.ts +2 -0
- package/cjs/layout/pivot-header-layout.js +26 -0
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/pivot-layout.d.ts +2 -0
- package/cjs/layout/pivot-layout.js +26 -0
- package/cjs/layout/pivot-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.d.ts +2 -0
- package/cjs/layout/simple-header-layout.js +6 -0
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/render/layout/container.js +13 -0
- package/cjs/render/layout/container.js.map +1 -1
- package/cjs/scenegraph/graphic/text.js +5 -5
- package/cjs/scenegraph/graphic/text.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +14 -10
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.d.ts +2 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +9 -8
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js +1 -2
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.d.ts +2 -1
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +2 -3
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.d.ts +1 -2
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js +6 -18
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js +1 -2
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +9 -30
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.d.ts +31 -12
- package/cjs/scenegraph/group-creater/progress/proxy.js +118 -123
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.d.ts +2 -0
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +112 -0
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -0
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.d.ts +2 -0
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +109 -0
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -0
- package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.d.ts +2 -0
- package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js +24 -0
- package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -0
- package/cjs/scenegraph/layout/compute-col-width.d.ts +9 -1
- package/cjs/scenegraph/layout/compute-col-width.js +11 -9
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.d.ts +3 -0
- package/cjs/scenegraph/layout/compute-row-height.js +162 -0
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -0
- package/cjs/scenegraph/layout/frozen.d.ts +3 -0
- package/cjs/scenegraph/layout/frozen.js +66 -0
- package/cjs/scenegraph/layout/frozen.js.map +1 -0
- package/cjs/scenegraph/layout/update-height.js +3 -2
- package/cjs/scenegraph/layout/update-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +4 -3
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.js +5 -5
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +4 -5
- package/cjs/scenegraph/scenegraph.js +28 -87
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/stick-text/index.d.ts +1 -0
- package/cjs/scenegraph/stick-text/index.js +16 -2
- package/cjs/scenegraph/stick-text/index.js.map +1 -1
- package/cjs/scenegraph/style/frame-border.d.ts +1 -1
- package/cjs/scenegraph/style/frame-border.js +3 -3
- package/cjs/scenegraph/style/frame-border.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.d.ts +2 -1
- package/cjs/scenegraph/utils/text-icon-layout.js +8 -7
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/state/hover/col.js +4 -4
- package/cjs/state/hover/col.js.map +1 -1
- package/cjs/tools/NumberMap.d.ts +1 -0
- package/cjs/tools/NumberMap.js +3 -0
- package/cjs/tools/NumberMap.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +12 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.d.ts +2 -0
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/dist/vtable.js +7731 -7126
- package/dist/vtable.min.js +2 -2
- package/es/core/BaseTable.d.ts +1 -1
- package/es/core/BaseTable.js +9 -7
- package/es/core/BaseTable.js.map +1 -1
- package/es/event/event.js +2 -2
- package/es/event/event.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/layout/pivot-header-layout.d.ts +2 -0
- package/es/layout/pivot-header-layout.js +26 -0
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/pivot-layout.d.ts +2 -0
- package/es/layout/pivot-layout.js +26 -0
- package/es/layout/pivot-layout.js.map +1 -1
- package/es/layout/simple-header-layout.d.ts +2 -0
- package/es/layout/simple-header-layout.js +6 -0
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/render/layout/container.js +13 -0
- package/es/render/layout/container.js.map +1 -1
- package/es/scenegraph/graphic/text.js +5 -5
- package/es/scenegraph/graphic/text.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +14 -9
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.d.ts +2 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +8 -9
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.js +0 -3
- package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.d.ts +2 -1
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +1 -4
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.d.ts +1 -2
- package/es/scenegraph/group-creater/cell-type/text-cell.js +3 -17
- package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.js +0 -3
- package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +8 -29
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.d.ts +31 -12
- package/es/scenegraph/group-creater/progress/proxy.js +124 -123
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.d.ts +2 -0
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +104 -0
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -0
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.d.ts +2 -0
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +102 -0
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -0
- package/es/scenegraph/group-creater/progress/update-position/update-auto-row.d.ts +2 -0
- package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js +18 -0
- package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -0
- package/es/scenegraph/layout/compute-col-width.d.ts +9 -1
- package/es/scenegraph/layout/compute-col-width.js +9 -8
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.d.ts +3 -0
- package/es/scenegraph/layout/compute-row-height.js +164 -0
- package/es/scenegraph/layout/compute-row-height.js.map +1 -0
- package/es/scenegraph/layout/frozen.d.ts +3 -0
- package/es/scenegraph/layout/frozen.js +58 -0
- package/es/scenegraph/layout/frozen.js.map +1 -0
- package/es/scenegraph/layout/update-height.js +3 -1
- package/es/scenegraph/layout/update-height.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +4 -2
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.js +5 -5
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +4 -5
- package/es/scenegraph/scenegraph.js +31 -89
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/stick-text/index.d.ts +1 -0
- package/es/scenegraph/stick-text/index.js +14 -0
- package/es/scenegraph/stick-text/index.js.map +1 -1
- package/es/scenegraph/style/frame-border.d.ts +1 -1
- package/es/scenegraph/style/frame-border.js +3 -3
- package/es/scenegraph/style/frame-border.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.d.ts +2 -1
- package/es/scenegraph/utils/text-icon-layout.js +6 -6
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/state/hover/col.js +4 -4
- package/es/state/hover/col.js.map +1 -1
- package/es/tools/NumberMap.d.ts +1 -0
- package/es/tools/NumberMap.js +3 -0
- package/es/tools/NumberMap.js.map +1 -1
- package/es/ts-types/base-table.d.ts +12 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.d.ts +2 -0
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/package.json +5 -4
- package/dist/vtable.es5.js +0 -53135
- package/dist/vtable.es5.min.js +0 -3
|
@@ -49,14 +49,11 @@ export declare class Scenegraph {
|
|
|
49
49
|
clearCells(): void;
|
|
50
50
|
createComponent(): void;
|
|
51
51
|
createSceneGraph(): void;
|
|
52
|
-
createHeaderSceneGraph(): void;
|
|
53
|
-
createBodySceneGraph(): void;
|
|
54
|
-
createBodySceneGraphForFirstScreen(): void;
|
|
55
52
|
renderSceneGraph(): void;
|
|
56
53
|
getCellOld(col: number, row: number): Group;
|
|
57
54
|
getColGroupOld(col: number, isHeader?: boolean): Group;
|
|
58
55
|
getCell(col: number, row: number, getShadow?: boolean): Group;
|
|
59
|
-
highPerformanceGetCell(col: number, row: number): Group;
|
|
56
|
+
highPerformanceGetCell(col: number, row: number, getShadow?: boolean): Group;
|
|
60
57
|
getColGroup(col: number, isCornerOrColHeader?: boolean): Group;
|
|
61
58
|
getCellSize(col: number, row: number): {
|
|
62
59
|
width: number;
|
|
@@ -83,6 +80,7 @@ export declare class Scenegraph {
|
|
|
83
80
|
updateChartSize(col: number): void;
|
|
84
81
|
updateAutoColWidth(col: number): void;
|
|
85
82
|
recalculateColWidths(): void;
|
|
83
|
+
recalculateRowHeights(): void;
|
|
86
84
|
resize(): void;
|
|
87
85
|
updateTableSize(): void;
|
|
88
86
|
updateRowHeight(row: number, detaY: number): void;
|
|
@@ -93,6 +91,7 @@ export declare class Scenegraph {
|
|
|
93
91
|
setX(x: number): void;
|
|
94
92
|
setY(y: number): void;
|
|
95
93
|
setBodyAndRowHeaderY(y: number): void;
|
|
94
|
+
setBodyAndColHeaderX(x: number): void;
|
|
96
95
|
afterScenegraphCreated(): void;
|
|
97
96
|
dealWidthMode(): void;
|
|
98
97
|
dealFrozen(): void;
|
|
@@ -115,7 +114,7 @@ export declare class Scenegraph {
|
|
|
115
114
|
sortCell(): void;
|
|
116
115
|
getCellOverflowText(col: number, row: number): string | null;
|
|
117
116
|
updateDrill(visible: boolean, x: number, y: number, drillDown: boolean, drillUp: boolean): void;
|
|
118
|
-
updateCellContent(col: number, row: number):
|
|
117
|
+
updateCellContent(col: number, row: number): Group;
|
|
119
118
|
setPixelRatio(pixelRatio: number): void;
|
|
120
119
|
updateHierarchyIcon(col: number, row: number): void;
|
|
121
120
|
updateRow(removeCells: CellAddress[], addCells: CellAddress[]): void;
|
|
@@ -6,10 +6,6 @@ import { isArray, isString } from "@visactor/vutils";
|
|
|
6
6
|
|
|
7
7
|
import { Group } from "./graphic/group";
|
|
8
8
|
|
|
9
|
-
import { createBodyColGroup, createColHeaderColGroup, createCornerHeaderColGroup, createRowHeaderColGroup } from "./group-creater/column";
|
|
10
|
-
|
|
11
|
-
import { updateAutoRowHeight } from "./layout/auto-height";
|
|
12
|
-
|
|
13
9
|
import { getCellMergeInfo } from "./utils/get-cell-merge";
|
|
14
10
|
|
|
15
11
|
import { updateColWidth } from "./layout/update-width";
|
|
@@ -52,10 +48,14 @@ import { updateRow } from "./layout/update-row";
|
|
|
52
48
|
|
|
53
49
|
import { handleTextStick } from "./stick-text";
|
|
54
50
|
|
|
51
|
+
import { computeRowsHeight } from "./layout/compute-row-height";
|
|
52
|
+
|
|
55
53
|
import { emptyGroup } from "./utils/empty-group";
|
|
56
54
|
|
|
57
55
|
import { updateChartSize } from "./refresh-node/update-chart";
|
|
58
56
|
|
|
57
|
+
import { dealFrozen, resetFrozen } from "./layout/frozen";
|
|
58
|
+
|
|
59
59
|
container.load(splitModule);
|
|
60
60
|
|
|
61
61
|
export class Scenegraph {
|
|
@@ -197,27 +197,10 @@ export class Scenegraph {
|
|
|
197
197
|
this.selectedRangeComponents = new Map, this.selectingRangeComponents = new Map;
|
|
198
198
|
}
|
|
199
199
|
createSceneGraph() {
|
|
200
|
-
this.clear = !1,
|
|
201
|
-
this.
|
|
202
|
-
this.
|
|
203
|
-
|
|
204
|
-
createHeaderSceneGraph() {
|
|
205
|
-
createCornerHeaderColGroup(this.cornerHeaderGroup, 0, 0, this.table), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width),
|
|
206
|
-
createColHeaderColGroup(this.colHeaderGroup, 0, 0, this.table);
|
|
207
|
-
}
|
|
208
|
-
createBodySceneGraph() {
|
|
209
|
-
this.rowHeaderGroup.setAttribute("y", this.colHeaderGroup.attribute.height), createRowHeaderColGroup(this.rowHeaderGroup, 0, 0, this.table),
|
|
210
|
-
this.bodyGroup.setAttributes({
|
|
211
|
-
y: this.colHeaderGroup.attribute.height,
|
|
212
|
-
x: this.rowHeaderGroup.attribute.width
|
|
213
|
-
}), createBodyColGroup(this.bodyGroup, 0, 0, this.table), this.afterScenegraphCreated();
|
|
214
|
-
}
|
|
215
|
-
createBodySceneGraphForFirstScreen() {
|
|
216
|
-
this.rowHeaderGroup.setAttribute("y", this.colHeaderGroup.attribute.height), this.bodyGroup.setAttributes({
|
|
217
|
-
y: this.colHeaderGroup.attribute.height,
|
|
218
|
-
x: this.rowHeaderGroup.attribute.width
|
|
219
|
-
}), console.log("before-createBodyColGroupForFirstScreen"), this.proxy.createColGroupForFirstScreen(this.rowHeaderGroup, this.bodyGroup, 0, 0, this.table),
|
|
220
|
-
console.log("after-createBodyColGroupForFirstScreen"), this.afterScenegraphCreated();
|
|
200
|
+
this.clear = !1, this.frozenColCount = this.table.rowHeaderLevelCount, this.frozenRowCount = this.table.columnHeaderLevelCount,
|
|
201
|
+
this.proxy = new SceneProxy(this.table), createFrameBorder(this.tableGroup, this.table.theme.frameStyle, this.tableGroup.role, void 0, !0),
|
|
202
|
+
this.proxy.createGroupForFirstScreen(this.cornerHeaderGroup, this.colHeaderGroup, this.rowHeaderGroup, this.bodyGroup, 0, 0),
|
|
203
|
+
this.afterScenegraphCreated();
|
|
221
204
|
}
|
|
222
205
|
renderSceneGraph() {
|
|
223
206
|
this.stage.render();
|
|
@@ -246,8 +229,8 @@ export class Scenegraph {
|
|
|
246
229
|
}
|
|
247
230
|
return cell || emptyGroup;
|
|
248
231
|
}
|
|
249
|
-
highPerformanceGetCell(col, row) {
|
|
250
|
-
return this.
|
|
232
|
+
highPerformanceGetCell(col, row, getShadow) {
|
|
233
|
+
return this.table.isHeader(col, row) ? this.getCell(col, row, getShadow) : this.proxy.highPerformanceGetCell(col, row, 0, this.table.rowCount - 1, getShadow);
|
|
251
234
|
}
|
|
252
235
|
getColGroup(col, isCornerOrColHeader = !1) {
|
|
253
236
|
let element;
|
|
@@ -371,7 +354,7 @@ export class Scenegraph {
|
|
|
371
354
|
iconBack && iconBack.setAttribute("visible", !1), icon.attribute.hoverImage && icon.attribute.image !== icon.attribute.originImage && (icon.image = icon.attribute.originImage);
|
|
372
355
|
}
|
|
373
356
|
updateColWidth(col, detaX) {
|
|
374
|
-
updateColWidth(this, col, detaX), this.
|
|
357
|
+
updateColWidth(this, col, detaX), this.updateContainer();
|
|
375
358
|
}
|
|
376
359
|
updateChartSize(col) {
|
|
377
360
|
updateChartSize(this, col);
|
|
@@ -381,10 +364,13 @@ export class Scenegraph {
|
|
|
381
364
|
newWidth !== oldWidth && this.updateColWidth(col, newWidth - oldWidth);
|
|
382
365
|
}
|
|
383
366
|
recalculateColWidths() {
|
|
384
|
-
computeColsWidth(this.table, !0);
|
|
367
|
+
computeColsWidth(this.table, 0, this.table.colCount - 1, !0);
|
|
368
|
+
}
|
|
369
|
+
recalculateRowHeights() {
|
|
370
|
+
computeRowsHeight(this.table, 0, this.table.rowCount - 1);
|
|
385
371
|
}
|
|
386
372
|
resize() {
|
|
387
|
-
this.recalculateColWidths(), this.table.internalProps.autoRowHeight &&
|
|
373
|
+
this.recalculateColWidths(), this.table.internalProps.autoRowHeight && this.recalculateRowHeights(),
|
|
388
374
|
this.dealWidthMode(), this.dealFrozen(), this.updateTableSize(), this.updateBorderSizeAndPosition(),
|
|
389
375
|
this.component.updateScrollBar(), this.updateNextFrame();
|
|
390
376
|
}
|
|
@@ -422,27 +408,24 @@ export class Scenegraph {
|
|
|
422
408
|
this.updateRowHeight(row, height - oldHeight);
|
|
423
409
|
}
|
|
424
410
|
setX(x) {
|
|
425
|
-
this.
|
|
426
|
-
this.colHeaderGroup.setAttribute("x", this.rowHeaderGroup.attribute.width + x),
|
|
427
|
-
this.updateNextFrame());
|
|
411
|
+
this.table.scenegraph.proxy.setX(-x);
|
|
428
412
|
}
|
|
429
413
|
setY(y) {
|
|
430
|
-
|
|
431
|
-
if (this.colHeaderGroup.attribute.height + y === this.bodyGroup.attribute.y) return;
|
|
432
|
-
this.bodyGroup.setAttribute("y", this.colHeaderGroup.attribute.height + y), this.rowHeaderGroup.setAttribute("y", this.colHeaderGroup.attribute.height + y),
|
|
433
|
-
this.updateNextFrame();
|
|
434
|
-
} else this.table.scenegraph.proxy && this.table.scenegraph.proxy.setY(-y);
|
|
414
|
+
this.table.scenegraph.proxy.setY(-y);
|
|
435
415
|
}
|
|
436
416
|
setBodyAndRowHeaderY(y) {
|
|
437
417
|
this.colHeaderGroup.attribute.height + y !== this.bodyGroup.attribute.y && (this.bodyGroup.setAttribute("y", this.colHeaderGroup.attribute.height + y),
|
|
438
418
|
this.rowHeaderGroup.setAttribute("y", this.colHeaderGroup.attribute.height + y),
|
|
439
419
|
this.updateNextFrame());
|
|
440
420
|
}
|
|
421
|
+
setBodyAndColHeaderX(x) {
|
|
422
|
+
this.rowHeaderGroup.attribute.width + x !== this.bodyGroup.attribute.x && (this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width + x),
|
|
423
|
+
this.colHeaderGroup.setAttribute("x", this.rowHeaderGroup.attribute.width + x),
|
|
424
|
+
this.updateNextFrame());
|
|
425
|
+
}
|
|
441
426
|
afterScenegraphCreated() {
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
this.createFrameBorder(), this.updateBorderSizeAndPosition(), this.component.updateScrollBar(),
|
|
445
|
-
handleTextStick(this.table), this.updateNextFrame();
|
|
427
|
+
this.dealWidthMode(), this.dealFrozen(), this.createFrameBorder(), this.updateBorderSizeAndPosition(),
|
|
428
|
+
this.component.updateScrollBar(), handleTextStick(this.table), this.updateNextFrame();
|
|
446
429
|
}
|
|
447
430
|
dealWidthMode() {
|
|
448
431
|
const table = this.table;
|
|
@@ -490,51 +473,10 @@ export class Scenegraph {
|
|
|
490
473
|
});
|
|
491
474
|
}
|
|
492
475
|
dealFrozen() {
|
|
493
|
-
|
|
494
|
-
if (this.table.frozenColCount > this.table.rowHeaderLevelCount) {
|
|
495
|
-
this.rowHeaderGroup.setAttribute("height", this.bodyGroup.attribute.height), this.rowHeaderGroup.setAttribute("y", this.bodyGroup.attribute.y),
|
|
496
|
-
this.cornerHeaderGroup.setAttribute("height", this.colHeaderGroup.attribute.height);
|
|
497
|
-
for (let i = 0; i < this.table.frozenColCount - this.table.rowHeaderLevelCount; i++) {
|
|
498
|
-
const column = this.bodyGroup.firstChild;
|
|
499
|
-
column && (this.rowHeaderGroup.appendChild(column), this.rowHeaderGroup.setAttribute("width", this.rowHeaderGroup.attribute.width + column.attribute.width),
|
|
500
|
-
this.bodyGroup.setAttribute("width", this.bodyGroup.attribute.width - column.attribute.width));
|
|
501
|
-
const headerColumn = this.colHeaderGroup.firstChild;
|
|
502
|
-
headerColumn && (this.cornerHeaderGroup.appendChild(headerColumn), this.cornerHeaderGroup.setAttribute("width", this.cornerHeaderGroup.attribute.width + headerColumn.attribute.width),
|
|
503
|
-
this.colHeaderGroup.setAttribute("width", this.colHeaderGroup.attribute.width - headerColumn.attribute.width));
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width);
|
|
507
|
-
const bodyDeltaX = null !== (_b = null === (_a = this.bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.attribute.x) && void 0 !== _b ? _b : 0;
|
|
508
|
-
this.bodyGroup.forEachChildrenSkipChild((column => {
|
|
509
|
-
column.setAttribute("x", column.attribute.x - bodyDeltaX);
|
|
510
|
-
}));
|
|
511
|
-
const colDeltaX = null !== (_d = null === (_c = this.colHeaderGroup.firstChild) || void 0 === _c ? void 0 : _c.attribute.x) && void 0 !== _d ? _d : 0;
|
|
512
|
-
this.colHeaderGroup.forEachChildrenSkipChild((column => {
|
|
513
|
-
column.setAttribute("x", column.attribute.x - colDeltaX);
|
|
514
|
-
})), this.updateBorderSizeAndPosition(), this.isPivot || this.transpose || this.component.setFrozenColumnShadow(this.table.frozenColCount - 1),
|
|
515
|
-
this.hasFrozen = !0, this.frozenColCount = this.table.frozenColCount, this.frozenRowCount = null !== (_f = null === (_e = this.colHeaderGroup.firstChild) || void 0 === _e ? void 0 : _e.childrenCount) && void 0 !== _f ? _f : 0;
|
|
476
|
+
dealFrozen(this);
|
|
516
477
|
}
|
|
517
478
|
resetFrozen() {
|
|
518
|
-
|
|
519
|
-
if (this.frozenColCount > this.table.rowHeaderLevelCount) for (let i = 0; i < this.frozenColCount - this.table.rowHeaderLevelCount; i++) {
|
|
520
|
-
const column = this.rowHeaderGroup.lastChild instanceof Group ? this.rowHeaderGroup.lastChild : this.rowHeaderGroup.lastChild._prev;
|
|
521
|
-
column && (this.bodyGroup.insertBefore(column, this.bodyGroup.firstChild), this.bodyGroup.setAttribute("width", this.bodyGroup.attribute.width + column.attribute.width),
|
|
522
|
-
this.rowHeaderGroup.setAttribute("width", this.rowHeaderGroup.attribute.width - column.attribute.width));
|
|
523
|
-
const headerColumn = this.cornerHeaderGroup.lastChild instanceof Group ? this.cornerHeaderGroup.lastChild : this.cornerHeaderGroup.lastChild._prev;
|
|
524
|
-
headerColumn && (this.colHeaderGroup.insertBefore(headerColumn, this.colHeaderGroup.firstChild),
|
|
525
|
-
this.colHeaderGroup.setAttribute("width", this.colHeaderGroup.attribute.width + headerColumn.attribute.width),
|
|
526
|
-
this.cornerHeaderGroup.setAttribute("width", this.cornerHeaderGroup.attribute.width - headerColumn.attribute.width));
|
|
527
|
-
}
|
|
528
|
-
this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width);
|
|
529
|
-
let bodyX = 0;
|
|
530
|
-
this.bodyGroup.forEachChildrenSkipChild((column => {
|
|
531
|
-
column.setAttribute("x", bodyX), bodyX += column.attribute.width;
|
|
532
|
-
}));
|
|
533
|
-
let colX = 0;
|
|
534
|
-
this.colHeaderGroup.forEachChildrenSkipChild((column => {
|
|
535
|
-
column.setAttribute("x", colX), colX += column.attribute.width;
|
|
536
|
-
})), this.updateBorderSizeAndPosition(), this.isPivot || this.transpose || this.component.setFrozenColumnShadow(this.table.frozenColCount - 1),
|
|
537
|
-
this.hasFrozen = !0, this.frozenColCount = this.table.rowHeaderLevelCount, this.frozenRowCount = null !== (_b = null === (_a = this.colHeaderGroup.firstChild) || void 0 === _a ? void 0 : _a.childrenCount) && void 0 !== _b ? _b : 0;
|
|
479
|
+
resetFrozen(this);
|
|
538
480
|
}
|
|
539
481
|
updateCellLayoutWidthCertainWidth(columnGroup, detaRow, col) {
|
|
540
482
|
const width = columnGroup.attribute.width;
|
|
@@ -579,7 +521,7 @@ export class Scenegraph {
|
|
|
579
521
|
this.colHeaderGroup.setDeltaWidth(colHeaderX - this.colHeaderGroup.attribute.width),
|
|
580
522
|
this.rowHeaderGroup.setDeltaWidth(rowHeaderX - this.rowHeaderGroup.attribute.width),
|
|
581
523
|
this.bodyGroup.setDeltaWidth(bodyX - this.bodyGroup.attribute.width), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width),
|
|
582
|
-
this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width);
|
|
524
|
+
this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width), this.updateTableSize();
|
|
583
525
|
const oldHorizontalBarPos = this.table.stateManeger.scroll.horizontalBarPos, oldVerticalBarPos = this.table.stateManeger.scroll.verticalBarPos;
|
|
584
526
|
this.component.updateScrollBar(), this.table.stateManeger.setScrollLeft(oldHorizontalBarPos),
|
|
585
527
|
this.table.stateManeger.setScrollTop(oldVerticalBarPos), this.updateNextFrame();
|
|
@@ -595,7 +537,7 @@ export class Scenegraph {
|
|
|
595
537
|
createFrameBorder(this.rowHeaderGroup, this.isPivot ? this.table.theme.rowHeaderStyle.frameStyle : this.table.theme.bodyStyle.frameStyle, this.rowHeaderGroup.role, isListTableWithFrozen ? [ !0, !1, !0, !0 ] : void 0),
|
|
596
538
|
createFrameBorder(this.colHeaderGroup, this.table.theme.headerStyle.frameStyle, this.colHeaderGroup.role, isListTableWithFrozen ? [ !0, !0, !0, !1 ] : void 0),
|
|
597
539
|
createFrameBorder(this.cornerHeaderGroup, this.isPivot ? this.table.theme.cornerHeaderStyle.frameStyle : this.table.theme.headerStyle.frameStyle, this.cornerHeaderGroup.role, isListTableWithFrozen ? [ !0, !1, !0, !0 ] : void 0),
|
|
598
|
-
createFrameBorder(this.tableGroup, this.table.theme.frameStyle, this.tableGroup.role);
|
|
540
|
+
createFrameBorder(this.tableGroup, this.table.theme.frameStyle, this.tableGroup.role, void 0);
|
|
599
541
|
}
|
|
600
542
|
getResizeColAt(abstractX, abstractY, cellGroup, offset = ResizeColumnHotSpotSize / 2) {
|
|
601
543
|
if (cellGroup) {
|
|
@@ -681,7 +623,7 @@ export class Scenegraph {
|
|
|
681
623
|
this.component.drillIcon.update(visible, x, y, drillDown, drillUp, this);
|
|
682
624
|
}
|
|
683
625
|
updateCellContent(col, row) {
|
|
684
|
-
this.clear
|
|
626
|
+
if (!this.clear) return updateCell(col, row, this.table);
|
|
685
627
|
}
|
|
686
628
|
setPixelRatio(pixelRatio) {
|
|
687
629
|
this.stage.disableDirtyBounds(), this.stage.window.setDpr(pixelRatio), this.stage.render(),
|
|
@@ -694,7 +636,7 @@ export class Scenegraph {
|
|
|
694
636
|
this.findAndUpdateIcon(cellGroup, [ IconFuncTypeEnum.collapse, IconFuncTypeEnum.expand ], iconConfig);
|
|
695
637
|
}
|
|
696
638
|
updateRow(removeCells, addCells) {
|
|
697
|
-
updateRow(removeCells, addCells, this.table), this.recalculateColWidths(), this.table.internalProps.autoRowHeight &&
|
|
639
|
+
updateRow(removeCells, addCells, this.table), this.recalculateColWidths(), this.table.internalProps.autoRowHeight && this.recalculateRowHeights(),
|
|
698
640
|
this.table.stateManeger.checkFrozen(), this.updateNextFrame();
|
|
699
641
|
}
|
|
700
642
|
findAndUpdateIcon(group, funcTypeArr, iconConfig) {
|