@visactor/vtable 0.15.0-alpha.3 → 0.15.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/ListTable.d.ts +12 -0
- package/cjs/ListTable.js +127 -13
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +1 -0
- package/cjs/PivotChart.js +36 -26
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.d.ts +5 -1
- package/cjs/PivotTable.js +109 -63
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +1 -2
- package/cjs/core/BaseTable.js +72 -92
- 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 +3 -1
- package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/data/DataSource.d.ts +7 -1
- package/cjs/data/DataSource.js +43 -8
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/dataset/dataset.d.ts +3 -1
- package/cjs/dataset/dataset.js +20 -15
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/edit/edit-manager.d.ts +14 -0
- package/cjs/edit/edit-manager.js +72 -0
- package/cjs/edit/edit-manager.js.map +1 -0
- package/cjs/edit/editors.d.ts +5 -0
- package/cjs/edit/editors.js +10 -0
- package/cjs/edit/editors.js.map +1 -0
- package/cjs/event/event.d.ts +3 -1
- package/cjs/event/event.js +5 -1
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.js +5 -1
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/table-group.d.ts +1 -0
- package/cjs/event/listener/table-group.js +41 -27
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/media-click.js +1 -2
- package/cjs/event/sparkline-event.js +2 -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 +8 -1
- package/cjs/layout/pivot-header-layout.js +47 -22
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/pivot-layout-helper.d.ts +11 -0
- package/cjs/layout/pivot-layout-helper.js +24 -2
- package/cjs/layout/pivot-layout-helper.js.map +1 -1
- package/cjs/layout/simple-header-layout.d.ts +3 -1
- package/cjs/layout/simple-header-layout.js +11 -9
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/register.d.ts +2 -0
- package/cjs/register.js +8 -3
- package/cjs/register.js.map +1 -1
- package/cjs/scenegraph/component/menu.d.ts +41 -0
- package/cjs/scenegraph/graphic/icon.js +5 -5
- package/cjs/scenegraph/graphic/icon.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +1 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +30 -58
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.d.ts +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +1 -3
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/icon/icon-update.js +4 -4
- package/cjs/scenegraph/icon/icon-update.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.d.ts +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +10 -8
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +1 -0
- package/cjs/scenegraph/scenegraph.js +19 -12
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/select/update-select-border.js +5 -5
- package/cjs/scenegraph/select/update-select-border.js.map +1 -1
- package/cjs/state/resize/update-resize-column.js +15 -6
- package/cjs/state/resize/update-resize-column.js.map +1 -1
- package/cjs/state/state.js +5 -4
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/ARCO.js +1 -1
- package/cjs/themes/BRIGHT.js +1 -2
- package/cjs/themes/DARK.js +1 -1
- package/cjs/themes/DEFAULT.js +1 -1
- package/cjs/themes/SIMPLIFY.js +1 -1
- package/cjs/themes/theme.js +1 -1
- package/cjs/tools/LimitPromiseQueue.js +1 -1
- package/cjs/tools/NumberMap.js +1 -1
- package/cjs/tools/Rect.js +2 -1
- package/cjs/tools/calc.js +1 -1
- package/cjs/tools/debounce.js +1 -1
- package/cjs/tools/diff-cell.js +2 -2
- package/cjs/tools/dom.js +1 -1
- package/cjs/tools/env.js +1 -1
- package/cjs/tools/global.js +1 -1
- package/cjs/tools/helper.js +1 -1
- package/cjs/ts-types/base-table.d.ts +2 -2
- package/cjs/ts-types/base-table.js +1 -1
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/common.d.ts +6 -0
- package/cjs/ts-types/common.js +1 -1
- package/cjs/ts-types/common.js.map +1 -1
- package/cjs/ts-types/component/title.d.ts +3 -3
- package/cjs/ts-types/component/title.js.map +1 -1
- package/cjs/ts-types/events.d.ts +12 -2
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/list-table/define/basic-define.d.ts +5 -1
- package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.d.ts +1 -1
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +13 -1
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/dist/vtable.js +9136 -25006
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +12 -0
- package/es/ListTable.js +111 -12
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +1 -0
- package/es/PivotChart.js +36 -27
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.d.ts +5 -1
- package/es/PivotTable.js +104 -61
- package/es/PivotTable.js.map +1 -1
- package/es/core/BaseTable.d.ts +1 -2
- package/es/core/BaseTable.js +74 -94
- 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 +3 -1
- package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/es/data/DataSource.d.ts +7 -1
- package/es/data/DataSource.js +44 -9
- package/es/data/DataSource.js.map +1 -1
- package/es/dataset/dataset.d.ts +3 -1
- package/es/dataset/dataset.js +20 -15
- package/es/dataset/dataset.js.map +1 -1
- package/es/edit/edit-manager.d.ts +14 -0
- package/es/edit/edit-manager.js +66 -0
- package/es/edit/edit-manager.js.map +1 -0
- package/es/edit/editors.d.ts +5 -0
- package/es/edit/editors.js +6 -0
- package/es/edit/editors.js.map +1 -0
- package/es/event/event.d.ts +3 -1
- package/es/event/event.js +5 -2
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.js +5 -1
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/table-group.d.ts +1 -0
- package/es/event/listener/table-group.js +40 -24
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/media-click.js +1 -2
- package/es/event/sparkline-event.js +2 -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 +8 -1
- package/es/layout/pivot-header-layout.js +48 -23
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/pivot-layout-helper.d.ts +11 -0
- package/es/layout/pivot-layout-helper.js +21 -0
- package/es/layout/pivot-layout-helper.js.map +1 -1
- package/es/layout/simple-header-layout.d.ts +3 -1
- package/es/layout/simple-header-layout.js +11 -9
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/register.d.ts +2 -0
- package/es/register.js +6 -0
- package/es/register.js.map +1 -1
- package/es/scenegraph/component/menu.d.ts +41 -0
- package/es/scenegraph/graphic/icon.js +5 -5
- package/es/scenegraph/graphic/icon.js.map +1 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +1 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +29 -57
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.d.ts +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +1 -3
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/icon/icon-update.js +4 -4
- package/es/scenegraph/icon/icon-update.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.d.ts +1 -1
- package/es/scenegraph/layout/compute-col-width.js +10 -8
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +1 -0
- package/es/scenegraph/scenegraph.js +19 -12
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/select/update-select-border.js +5 -5
- package/es/scenegraph/select/update-select-border.js.map +1 -1
- package/es/state/resize/update-resize-column.js +15 -6
- package/es/state/resize/update-resize-column.js.map +1 -1
- package/es/state/state.js +5 -4
- package/es/state/state.js.map +1 -1
- package/es/themes/ARCO.js +1 -1
- package/es/themes/BRIGHT.js +1 -2
- package/es/themes/DARK.js +1 -1
- package/es/themes/DEFAULT.js +1 -1
- package/es/themes/SIMPLIFY.js +1 -1
- package/es/themes/theme.js +1 -1
- package/es/tools/LimitPromiseQueue.js +1 -1
- package/es/tools/NumberMap.js +1 -1
- package/es/tools/Rect.js +2 -1
- package/es/tools/calc.js +1 -1
- package/es/tools/debounce.js +1 -1
- package/es/tools/diff-cell.js +1 -1
- package/es/tools/dom.js +1 -1
- package/es/tools/env.js +1 -1
- package/es/tools/global.js +1 -1
- package/es/tools/helper.js +1 -1
- package/es/ts-types/base-table.d.ts +2 -2
- package/es/ts-types/base-table.js +1 -1
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/common.d.ts +6 -0
- package/es/ts-types/common.js +1 -1
- package/es/ts-types/common.js.map +1 -1
- package/es/ts-types/component/title.d.ts +3 -3
- package/es/ts-types/component/title.js.map +1 -1
- package/es/ts-types/events.d.ts +12 -2
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/list-table/define/basic-define.d.ts +5 -1
- package/es/ts-types/list-table/define/basic-define.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.d.ts +1 -1
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +13 -1
- package/es/ts-types/table-engine.js.map +1 -1
- package/package.json +11 -7
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Group } from '../../graphic/group';
|
|
2
2
|
import type { SceneProxy } from './proxy';
|
|
3
|
-
export declare function createGroupForFirstScreen(cornerHeaderGroup: Group, colHeaderGroup: Group, rowHeaderGroup: Group, rightFrozenGroup: Group, bottomFrozenGroup: Group, bodyGroup: Group, xOrigin: number, yOrigin: number, proxy: SceneProxy):
|
|
3
|
+
export declare function createGroupForFirstScreen(cornerHeaderGroup: Group, colHeaderGroup: Group, rowHeaderGroup: Group, rightFrozenGroup: Group, bottomFrozenGroup: Group, bodyGroup: Group, xOrigin: number, yOrigin: number, proxy: SceneProxy): void;
|
|
@@ -1,29 +1,3 @@
|
|
|
1
|
-
var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
2
|
-
return new (P || (P = Promise))((function(resolve, reject) {
|
|
3
|
-
function fulfilled(value) {
|
|
4
|
-
try {
|
|
5
|
-
step(generator.next(value));
|
|
6
|
-
} catch (e) {
|
|
7
|
-
reject(e);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
function rejected(value) {
|
|
11
|
-
try {
|
|
12
|
-
step(generator.throw(value));
|
|
13
|
-
} catch (e) {
|
|
14
|
-
reject(e);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
function step(result) {
|
|
18
|
-
var value;
|
|
19
|
-
result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P((function(resolve) {
|
|
20
|
-
resolve(value);
|
|
21
|
-
}))).then(fulfilled, rejected);
|
|
22
|
-
}
|
|
23
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
-
}));
|
|
25
|
-
};
|
|
26
|
-
|
|
27
1
|
import { computeColsWidth } from "../../layout/compute-col-width";
|
|
28
2
|
|
|
29
3
|
import { computeRowsHeight } from "../../layout/compute-row-height";
|
|
@@ -32,36 +6,34 @@ import { createColGroup } from "../column";
|
|
|
32
6
|
|
|
33
7
|
export function createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, proxy) {
|
|
34
8
|
var _a, _b, _c, _d, _e, _f;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
table.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2));
|
|
65
|
-
}));
|
|
9
|
+
const {table: table} = proxy, {leftBottomCornerGroup: leftBottomCornerGroup, rightTopCornerGroup: rightTopCornerGroup, rightBottomCornerGroup: rightBottomCornerGroup} = table.scenegraph;
|
|
10
|
+
let distCol, distRow;
|
|
11
|
+
proxy.setParamsForRow(), proxy.setParamsForColumn(), distCol = "adaptive" === table.widthMode ? table.colCount - 1 : Math.min(proxy.firstScreenColLimit, table.colCount - 1),
|
|
12
|
+
distRow = "adaptive" === table.heightMode ? table.rowCount - 1 : Math.min(proxy.firstScreenRowLimit, table.rowCount - 1),
|
|
13
|
+
computeColsWidth(table, 0, distCol), computeRowsHeight(table, 0, distRow), distCol < table.colCount - 1 - table.rightFrozenColCount && computeColsWidth(table, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1),
|
|
14
|
+
distRow < table.rowCount - 1 - table.bottomFrozenRowCount && computeRowsHeight(table, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1),
|
|
15
|
+
table.scenegraph.colHeaderGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rowHeaderGroup.setAttribute("y", table.getFrozenRowsHeight()),
|
|
16
|
+
table.scenegraph.bottomFrozenGroup.setAttribute("x", table.getFrozenColsWidth()),
|
|
17
|
+
table.scenegraph.rightFrozenGroup.setAttribute("y", table.getFrozenRowsHeight()),
|
|
18
|
+
table.scenegraph.bodyGroup.setAttributes({
|
|
19
|
+
x: table.getFrozenColsWidth(),
|
|
20
|
+
y: table.getFrozenRowsHeight()
|
|
21
|
+
}), createColGroup(cornerHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, 0, table.columnHeaderLevelCount - 1, table.isListTable() ? "columnHeader" : "cornerHeader", table),
|
|
22
|
+
createColGroup(colHeaderGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, 0, table.columnHeaderLevelCount - 1, "columnHeader", table),
|
|
23
|
+
createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, table.columnHeaderLevelCount, distRow - table.bottomFrozenRowCount, table.isListTable() && !table.internalProps.transpose ? "body" : "rowHeader", table),
|
|
24
|
+
table.bottomFrozenRowCount > 0 && (createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isListTable() ? "body" : "rowHeader", table),
|
|
25
|
+
createColGroup(bottomFrozenGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isPivotChart() ? "rowHeader" : "body", table)),
|
|
26
|
+
table.rightFrozenColCount > 0 && (createColGroup(rightTopCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, 0, table.columnHeaderLevelCount - 1, "columnHeader", table),
|
|
27
|
+
createColGroup(rightFrozenGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.columnHeaderLevelCount, distRow - table.bottomFrozenRowCount, table.isPivotChart() ? "rowHeader" : "body", table)),
|
|
28
|
+
table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0 && createColGroup(rightBottomCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table),
|
|
29
|
+
createColGroup(bodyGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.columnHeaderLevelCount, distRow - table.bottomFrozenRowCount, "body", table),
|
|
30
|
+
bodyGroup.firstChild || colHeaderGroup.firstChild ? (proxy.currentRow = null !== (_b = null === (_a = bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.rowNumber) && void 0 !== _b ? _b : proxy.totalRow,
|
|
31
|
+
proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2),
|
|
32
|
+
proxy.currentCol = null !== (_f = null !== (_d = null === (_c = bodyGroup.lastChild) || void 0 === _c ? void 0 : _c.col) && void 0 !== _d ? _d : null === (_e = colHeaderGroup.lastChild) || void 0 === _e ? void 0 : _e.col) && void 0 !== _f ? _f : proxy.totalCol,
|
|
33
|
+
proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2),
|
|
34
|
+
proxy.progress()) : (proxy.currentRow = proxy.totalRow, proxy.rowEnd = proxy.currentRow,
|
|
35
|
+
proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2),
|
|
36
|
+
proxy.currentCol = proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1,
|
|
37
|
+
proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2));
|
|
66
38
|
}
|
|
67
39
|
//# sourceMappingURL=create-group-for-first-screen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/group-creater/progress/create-group-for-first-screen.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3C,MAAM,UAAgB,yBAAyB,CAC7C,iBAAwB,EACxB,cAAqB,EACrB,cAAqB,EACrB,gBAAuB,EACvB,iBAAwB,EACxB,SAAgB,EAChB,OAAe,EACf,OAAe,EACf,KAAiB;;;QAEjB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;QACxB,MAAM,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC;QAGhG,KAAK,CAAC,eAAe,EAAE,CAAC;QACxB,KAAK,CAAC,kBAAkB,EAAE,CAAC;QAE3B,IAAI,OAAO,CAAC;QACZ,IAAI,OAAO,CAAC;QACZ,IAAI,KAAK,CAAC,SAAS,KAAK,UAAU,EAAE;YAClC,OAAO,GAAG,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC;SAC9B;aAAM;YACL,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;SACnE;QACD,IAAI,KAAK,CAAC,UAAU,KAAK,UAAU,EAAE;YACnC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KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC;YAChC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;YACtC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;YAEtF,KAAK,CAAC,UAAU;gBACd,MAAA,MAAA,MAAC,SAAS,CAAC,SAAmB,0CAAE,GAAG,mCAAI,MAAC,cAAc,CAAC,SAAmB,0CAAE,GAAG,mCAAI,KAAK,CAAC,QAAQ,CAAC;YACpG,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC;YAChC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;YACtC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;YAGtF,MAAM,KAAK,CAAC,QAAQ,EAAE,CAAC;SACxB;;CACF","file":"create-group-for-first-screen.js","sourcesContent":["import type { Group } from '../../graphic/group';\nimport { computeColsWidth } from '../../layout/compute-col-width';\nimport { computeRowsHeight } from '../../layout/compute-row-height';\nimport { createColGroup } from '../column';\nimport type { SceneProxy } from './proxy';\n\nexport async function createGroupForFirstScreen(\n cornerHeaderGroup: Group,\n colHeaderGroup: Group,\n rowHeaderGroup: Group,\n rightFrozenGroup: Group,\n bottomFrozenGroup: Group,\n bodyGroup: Group,\n xOrigin: number,\n yOrigin: number,\n proxy: SceneProxy\n) {\n const { table } = proxy;\n const { leftBottomCornerGroup, rightTopCornerGroup, rightBottomCornerGroup } = table.scenegraph;\n\n // compute parameters\n proxy.setParamsForRow();\n proxy.setParamsForColumn();\n\n let distCol;\n let distRow;\n if (table.widthMode === 'adaptive') {\n distCol = table.colCount - 1;\n } else {\n distCol = Math.min(proxy.firstScreenColLimit, table.colCount - 1);\n }\n if (table.heightMode === 'adaptive') {\n distRow = table.rowCount - 1;\n } else {\n distRow = Math.min(proxy.firstScreenRowLimit, table.rowCount - 1);\n }\n\n // compute colums width in first screen\n computeColsWidth(table, 0, distCol);\n\n // compute rows height in first screen\n computeRowsHeight(table, 0, distRow);\n\n if (distCol < table.colCount - 1 - table.rightFrozenColCount) {\n // compute right frozen row height\n computeColsWidth(table, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1);\n }\n if (distRow < table.rowCount - 1 - table.bottomFrozenRowCount) {\n // compute bottom frozen row height\n computeRowsHeight(table, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1);\n }\n\n // update colHeaderGroup rowHeaderGroup bodyGroup position\n table.scenegraph.colHeaderGroup.setAttribute('x', table.getFrozenColsWidth());\n table.scenegraph.rowHeaderGroup.setAttribute('y', table.getFrozenRowsHeight());\n table.scenegraph.bottomFrozenGroup.setAttribute('x', table.getFrozenColsWidth());\n table.scenegraph.rightFrozenGroup.setAttribute('y', table.getFrozenRowsHeight());\n table.scenegraph.bodyGroup.setAttributes({\n x: table.getFrozenColsWidth(),\n y: table.getFrozenRowsHeight()\n });\n\n // create cornerHeaderGroup\n createColGroup(\n cornerHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.frozenColCount - 1, // colEnd\n 0, // rowStart\n table.columnHeaderLevelCount - 1, // rowEnd\n table.isListTable() ? 'columnHeader' : 'cornerHeader', // CellType\n table\n );\n\n // create colHeaderGroup\n createColGroup(\n colHeaderGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n // Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n distCol - table.rightFrozenColCount,\n 0, // rowStart\n table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n table\n );\n\n // create rowHeaderGroup\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.frozenColCount - 1, // colEnd\n table.columnHeaderLevelCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n table.isListTable() && !table.internalProps.transpose ? 'body' : 'rowHeader', // isHeader\n table\n );\n\n if (table.bottomFrozenRowCount > 0) {\n // if (!table.isPivotChart()) {\n // create left bottom frozen\n createColGroup(\n leftBottomCornerGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.frozenColCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n table.isListTable() ? 'body' : 'rowHeader', // isHeader\n table\n );\n // }\n // create bottomFrozenGroup\n createColGroup(\n bottomFrozenGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n // Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n distCol - table.rightFrozenColCount,\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n table.isPivotChart() ? 'rowHeader' : 'body', // isHeader\n table\n );\n }\n\n if (table.rightFrozenColCount > 0) {\n // if (!table.isPivotChart()) {\n // create right top frozen Group\n createColGroup(\n rightTopCornerGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n 0, // rowStart\n table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n table\n );\n // }\n // create rightFrozenGroup\n createColGroup(\n rightFrozenGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n table.columnHeaderLevelCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n table.isPivotChart() ? 'rowHeader' : 'body', // isHeader\n table\n );\n }\n\n if (table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0) {\n // create right bottom frozen Group\n createColGroup(\n rightBottomCornerGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n 'body', // isHeader\n table\n );\n }\n\n // create bodyGroup\n createColGroup(\n bodyGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n // Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n distCol - table.rightFrozenColCount,\n table.columnHeaderLevelCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n 'body', // isHeader\n table\n );\n\n // update progress information\n if (!bodyGroup.firstChild && !colHeaderGroup.firstChild) {\n // 无数据\n proxy.currentRow = proxy.totalRow;\n proxy.rowEnd = proxy.currentRow;\n proxy.rowUpdatePos = proxy.rowEnd + 1;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n\n proxy.currentCol = proxy.totalCol;\n proxy.colEnd = proxy.currentCol;\n proxy.colUpdatePos = proxy.colEnd + 1;\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n } else {\n proxy.currentRow = (bodyGroup.firstChild as Group)?.rowNumber ?? proxy.totalRow;\n proxy.rowEnd = proxy.currentRow;\n proxy.rowUpdatePos = proxy.rowEnd + 1;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n\n proxy.currentCol =\n (bodyGroup.lastChild as Group)?.col ?? (colHeaderGroup.lastChild as Group)?.col ?? proxy.totalCol;\n proxy.colEnd = proxy.currentCol;\n proxy.colUpdatePos = proxy.colEnd + 1;\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n\n // 开始异步任务\n await proxy.progress();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/scenegraph/group-creater/progress/create-group-for-first-screen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3C,MAAM,UAAU,yBAAyB,CACvC,iBAAwB,EACxB,cAAqB,EACrB,cAAqB,EACrB,gBAAuB,EACvB,iBAAwB,EACxB,SAAgB,EAChB,OAAe,EACf,OAAe,EACf,KAAiB;;IAEjB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IACxB,MAAM,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC;IAGhG,KAAK,CAAC,eAAe,EAAE,CAAC;IACxB,KAAK,CAAC,kBAAkB,EAAE,CAAC;IAE3B,IAAI,OAAO,CAAC;IACZ,IAAI,OAAO,CAAC;IACZ,IAAI,KAAK,CAAC,SAAS,KAAK,UAAU,EAAE;QAClC,OAAO,GAAG,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC;KAC9B;SAAM;QACL,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;KACnE;IACD,IAAI,KAAK,CAAC,UAAU,KAAK,UAAU,EAAE;QACnC,OAAO,GAAG,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC;KAC9B;SAAM;QACL,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC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I,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;QAEtF,KAAK,CAAC,UAAU;YACd,MAAA,MAAA,MAAC,SAAS,CAAC,SAAmB,0CAAE,GAAG,mCAAI,MAAC,cAAc,CAAC,SAAmB,0CAAE,GAAG,mCAAI,KAAK,CAAC,QAAQ,CAAC;QACpG,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC;QAChC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QACtC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;QAGtF,KAAK,CAAC,QAAQ,EAAE,CAAC;KAClB;AACH,CAAC","file":"create-group-for-first-screen.js","sourcesContent":["import type { Group } from '../../graphic/group';\nimport { computeColsWidth } from '../../layout/compute-col-width';\nimport { computeRowsHeight } from '../../layout/compute-row-height';\nimport { createColGroup } from '../column';\nimport type { SceneProxy } from './proxy';\n\nexport function createGroupForFirstScreen(\n cornerHeaderGroup: Group,\n colHeaderGroup: Group,\n rowHeaderGroup: Group,\n rightFrozenGroup: Group,\n bottomFrozenGroup: Group,\n bodyGroup: Group,\n xOrigin: number,\n yOrigin: number,\n proxy: SceneProxy\n) {\n const { table } = proxy;\n const { leftBottomCornerGroup, rightTopCornerGroup, rightBottomCornerGroup } = table.scenegraph;\n\n // compute parameters\n proxy.setParamsForRow();\n proxy.setParamsForColumn();\n\n let distCol;\n let distRow;\n if (table.widthMode === 'adaptive') {\n distCol = table.colCount - 1;\n } else {\n distCol = Math.min(proxy.firstScreenColLimit, table.colCount - 1);\n }\n if (table.heightMode === 'adaptive') {\n distRow = table.rowCount - 1;\n } else {\n distRow = Math.min(proxy.firstScreenRowLimit, table.rowCount - 1);\n }\n\n // compute colums width in first screen\n computeColsWidth(table, 0, distCol);\n\n // compute rows height in first screen\n computeRowsHeight(table, 0, distRow);\n\n if (distCol < table.colCount - 1 - table.rightFrozenColCount) {\n // compute right frozen row height\n computeColsWidth(table, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1);\n }\n if (distRow < table.rowCount - 1 - table.bottomFrozenRowCount) {\n // compute bottom frozen row height\n computeRowsHeight(table, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1);\n }\n\n // update colHeaderGroup rowHeaderGroup bodyGroup position\n table.scenegraph.colHeaderGroup.setAttribute('x', table.getFrozenColsWidth());\n table.scenegraph.rowHeaderGroup.setAttribute('y', table.getFrozenRowsHeight());\n table.scenegraph.bottomFrozenGroup.setAttribute('x', table.getFrozenColsWidth());\n table.scenegraph.rightFrozenGroup.setAttribute('y', table.getFrozenRowsHeight());\n table.scenegraph.bodyGroup.setAttributes({\n x: table.getFrozenColsWidth(),\n y: table.getFrozenRowsHeight()\n });\n\n // create cornerHeaderGroup\n createColGroup(\n cornerHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.frozenColCount - 1, // colEnd\n 0, // rowStart\n table.columnHeaderLevelCount - 1, // rowEnd\n table.isListTable() ? 'columnHeader' : 'cornerHeader', // CellType\n table\n );\n\n // create colHeaderGroup\n createColGroup(\n colHeaderGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n // Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n distCol - table.rightFrozenColCount,\n 0, // rowStart\n table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n table\n );\n\n // create rowHeaderGroup\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.frozenColCount - 1, // colEnd\n table.columnHeaderLevelCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n table.isListTable() && !table.internalProps.transpose ? 'body' : 'rowHeader', // isHeader\n table\n );\n\n if (table.bottomFrozenRowCount > 0) {\n // if (!table.isPivotChart()) {\n // create left bottom frozen\n createColGroup(\n leftBottomCornerGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.frozenColCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n table.isListTable() ? 'body' : 'rowHeader', // isHeader\n table\n );\n // }\n // create bottomFrozenGroup\n createColGroup(\n bottomFrozenGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n // Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n distCol - table.rightFrozenColCount,\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n table.isPivotChart() ? 'rowHeader' : 'body', // isHeader\n table\n );\n }\n\n if (table.rightFrozenColCount > 0) {\n // if (!table.isPivotChart()) {\n // create right top frozen Group\n createColGroup(\n rightTopCornerGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n 0, // rowStart\n table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n table\n );\n // }\n // create rightFrozenGroup\n createColGroup(\n rightFrozenGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n table.columnHeaderLevelCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n table.isPivotChart() ? 'rowHeader' : 'body', // isHeader\n table\n );\n }\n\n if (table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0) {\n // create right bottom frozen Group\n createColGroup(\n rightBottomCornerGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n 'body', // isHeader\n table\n );\n }\n\n // create bodyGroup\n createColGroup(\n bodyGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n // Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n distCol - table.rightFrozenColCount,\n table.columnHeaderLevelCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n 'body', // isHeader\n table\n );\n\n // update progress information\n if (!bodyGroup.firstChild && !colHeaderGroup.firstChild) {\n // 无数据\n proxy.currentRow = proxy.totalRow;\n proxy.rowEnd = proxy.currentRow;\n proxy.rowUpdatePos = proxy.rowEnd + 1;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n\n proxy.currentCol = proxy.totalCol;\n proxy.colEnd = proxy.currentCol;\n proxy.colUpdatePos = proxy.colEnd + 1;\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n } else {\n proxy.currentRow = (bodyGroup.firstChild as Group)?.rowNumber ?? proxy.totalRow;\n proxy.rowEnd = proxy.currentRow;\n proxy.rowUpdatePos = proxy.rowEnd + 1;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n\n proxy.currentCol =\n (bodyGroup.lastChild as Group)?.col ?? (colHeaderGroup.lastChild as Group)?.col ?? proxy.totalCol;\n proxy.colEnd = proxy.currentCol;\n proxy.colUpdatePos = proxy.colEnd + 1;\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n\n // 开始异步任务\n proxy.progress();\n }\n}\n"]}
|
|
@@ -45,7 +45,7 @@ export declare class SceneProxy {
|
|
|
45
45
|
get bodyLeftCol(): number;
|
|
46
46
|
setParamsForColumn(): void;
|
|
47
47
|
setParamsForRow(): void;
|
|
48
|
-
createGroupForFirstScreen(cornerHeaderGroup: Group, colHeaderGroup: Group, rowHeaderGroup: Group, rightFrozenGroup: Group, bottomFrozenGroup: Group, bodyGroup: Group, xOrigin: number, yOrigin: number):
|
|
48
|
+
createGroupForFirstScreen(cornerHeaderGroup: Group, colHeaderGroup: Group, rowHeaderGroup: Group, rightFrozenGroup: Group, bottomFrozenGroup: Group, bodyGroup: Group, xOrigin: number, yOrigin: number): void;
|
|
49
49
|
progress(): Promise<void>;
|
|
50
50
|
createRow(): Promise<void>;
|
|
51
51
|
createCol(): Promise<void>;
|
|
@@ -91,9 +91,7 @@ export class SceneProxy {
|
|
|
91
91
|
this.rowUpdatePos = this.bodyBottomRow;
|
|
92
92
|
}
|
|
93
93
|
createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin) {
|
|
94
|
-
|
|
95
|
-
yield createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, this);
|
|
96
|
-
}));
|
|
94
|
+
createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, this);
|
|
97
95
|
}
|
|
98
96
|
progress() {
|
|
99
97
|
return __awaiter(this, void 0, void 0, (function*() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/group-creater/progress/proxy.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;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,KAAc,EAAE,GAAG,CAAC,CAAC;AAC5D,CAAC","file":"proxy.js","sourcesContent":["import { isNumber } from '@visactor/vutils';\nimport type { BaseTableAPI } from '../../../ts-types/base-table';\nimport { Group } from '../../graphic/group';\nimport { computeColsWidth } from '../../layout/compute-col-width';\nimport { computeRowsHeight } from '../../layout/compute-row-height';\nimport { emptyGroup } from '../../utils/empty-group';\nimport { createColGroup } from '../column';\nimport { createComplexColumn } from '../column-helper';\nimport { createGroupForFirstScreen } from './create-group-for-first-screen';\nimport { dynamicSetX, updateColContent } from './update-position/dynamic-set-x';\nimport { dynamicSetY, updateRowContent } from './update-position/dynamic-set-y';\nimport { updateAutoRow } from './update-position/update-auto-row';\nimport { sortVertical } from './update-position/sort-vertical';\nimport { sortHorizontal } from './update-position/sort-horizontal';\n\nexport class SceneProxy {\n table: BaseTableAPI;\n isRelease: boolean = false;\n mode: 'column' | 'row' | 'pivot' = 'column';\n isProgressing: boolean;\n\n rowLimit = 200;\n currentRow = 0; // 目前渐进生成的row number\n totalRow: number; // 渐进完成最后一行的row number\n yLimitTop: number; // y > yLimitTop动态更新,否则直接修改xy\n yLimitBottom: number; // y < yLimitBottom动态更新,否则直接修改xy\n rowStart = 0; // 当前维护的部分第一行的row number\n rowEnd = 0; // 当前维护的部分最后一行的row number\n referenceRow = 0; // 当前维护的部分中间一行的row number,认为referenceRow对应当前屏幕显示范围的第一行\n bodyTopRow: number; // table body部分的第一行row number\n bodyBottomRow: number; // table body部分的最后一行row number\n screenRowCount: number; // 预计屏幕范围内显示的row count\n firstScreenRowLimit: number; // 首屏同步加载部分最后一行的row number\n taskRowCount: number; // 一次任务生成/更新的row count\n rowUpdatePos: number; // 异步任务目前更新到的行的row number\n rowUpdateDirection: 'up' | 'down'; // 当前行更新的方向\n screenTopRow: number = 0; // 当前屏幕范围内显示的第一行的row number\n totalActualBodyRowCount: number; // 实际表格body部分的行数\n deltaY: number = 0;\n\n colLimit = 100;\n // bodyLeftCol: number; // table body部分的第一列col number\n bodyRightCol: number; // table body部分的最后一列col number\n totalCol: number; // 渐进完成最后一列的col number\n colStart: number; // 当前维护的部分第一列的col number\n colEnd: number; // 当前维护的部分最后一列的col number\n taskColCount: number; // 一次任务生成/更新的col count\n xLimitLeft: number; // x > xLimitLeft动态更新,否则直接修改xy\n xLimitRight: number; // x < xLimitRight动态更新,否则直接修改xy\n screenColCount: number; // 预计屏幕范围内显示的col count\n firstScreenColLimit: number; // 首屏同步加载部分最后一列的col number\n colUpdatePos: number; // 异步任务目前更新到的列的col number\n currentCol: number; // 目前渐进生成的col number\n referenceCol: number; // 当前维护的部分中间一列的col number,认为referenceCol对应当前屏幕显示范围的第一列\n screenLeftCol: number = 0; // 当前屏幕范围内显示的第一列的col number\n colUpdateDirection: 'left' | 'right'; // 当前列更新方向\n totalActualBodyColCount: number; // 实际表格body部分的列数\n deltaX: number = 0;\n\n cellCache: Map<number, Group> = new Map(); // 单元格位置快速查找缓存\n\n constructor(table: BaseTableAPI) {\n this.table = table;\n\n if (this.table.isPivotChart()) {\n this.rowLimit = 100;\n this.colLimit = 100;\n } else if (this.table.heightMode === 'autoHeight') {\n this.rowLimit = 100;\n } else if (this.table.widthMode === 'autoWidth') {\n this.colLimit = 100;\n }\n\n if (this.table.internalProps.transpose) {\n this.mode = 'row';\n } else if (this.table.isPivotTable()) {\n this.mode = 'pivot';\n }\n if (this.table.options.maintainedDataCount) {\n this.rowLimit = this.table.options.maintainedDataCount;\n }\n }\n\n get bodyLeftCol(): number {\n return this.table.frozenColCount;\n }\n\n setParamsForColumn() {\n // this.bodyLeftCol = this.table.frozenColCount;\n this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;\n\n // compute the column info about progress creation\n const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);\n this.totalActualBodyColCount = totalActualBodyColCount;\n this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1; // 目标渐进完成的col\n this.colStart = this.bodyLeftCol;\n const defaultColWidth = this.table.defaultColWidth;\n this.taskColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth) * 1;\n\n // 确定动态更新限制\n const totalBodyWidth = defaultColWidth * totalActualBodyColCount;\n const totalWidth = defaultColWidth * (this.bodyRightCol - this.bodyLeftCol + 1);\n this.xLimitLeft = totalBodyWidth / 2;\n this.xLimitRight = totalWidth - totalBodyWidth / 2;\n\n // 确定首屏高度范围\n const widthLimit = this.table.tableNoFrameWidth * 5;\n this.screenColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth);\n this.firstScreenColLimit = this.bodyLeftCol + Math.min(this.colLimit, Math.ceil(widthLimit / defaultColWidth));\n // this.firstScreenRowLimit = this.bodyBottomRow;\n\n this.colUpdatePos = this.bodyRightCol;\n }\n\n setParamsForRow() {\n this.bodyTopRow = this.table.columnHeaderLevelCount;\n this.bodyBottomRow = this.table.rowCount - 1 - this.table.bottomFrozenRowCount;\n // this.bodyLeftCol = 0;\n // this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;\n\n // 计算渐进加载数量\n const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1); // 渐进加载总row数量\n this.totalActualBodyRowCount = totalActualBodyRowCount;\n this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1; // 目标渐进完成的row\n this.rowStart = this.bodyTopRow;\n const defaultRowHeight = this.table.defaultRowHeight;\n this.taskRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight) * 1;\n\n // 确定动态更新限制\n const totalBodyHeight = defaultRowHeight * totalActualBodyRowCount;\n const totalHeight = defaultRowHeight * (this.bodyBottomRow - this.bodyTopRow + 1);\n this.yLimitTop = totalBodyHeight / 2;\n this.yLimitBottom = totalHeight - totalBodyHeight / 2;\n // this.bottomOffset = totalHeight - totalBodyHeight / 2;\n\n // 确定首屏高度范围\n const heightLimit = this.table.tableNoFrameHeight * 5;\n this.screenRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight);\n this.firstScreenRowLimit = this.bodyTopRow + Math.min(this.rowLimit, Math.ceil(heightLimit / defaultRowHeight));\n // this.firstScreenRowLimit = this.bodyBottomRow;\n\n this.rowUpdatePos = this.bodyBottomRow;\n }\n\n async createGroupForFirstScreen(\n cornerHeaderGroup: Group,\n colHeaderGroup: Group,\n rowHeaderGroup: Group,\n rightFrozenGroup: Group,\n bottomFrozenGroup: Group,\n bodyGroup: Group,\n xOrigin: number,\n yOrigin: number\n ) {\n await createGroupForFirstScreen(\n cornerHeaderGroup,\n colHeaderGroup,\n rowHeaderGroup,\n rightFrozenGroup,\n bottomFrozenGroup,\n bodyGroup,\n xOrigin,\n yOrigin,\n this\n );\n }\n // async progress() {\n // if (this.rowUpdatePos < this.rowEnd) {\n // console.log('progress rowUpdatePos', this.rowUpdatePos);\n // // 先更新\n // await this.updateCellGroupsAsync();\n // await this.progress();\n // } else if (this.currentRow < this.totalRow) {\n // console.log('progress currentRow', this.currentRow);\n // // 先更新没有需要更新的节点,在生成新节点\n // await this.createRow();\n // await this.progress();\n // }\n // }\n async progress() {\n if (this.isProgressing) {\n return;\n }\n this.isProgressing = true;\n return new Promise<void>((resolve, reject) => {\n setTimeout(async () => {\n this.isProgressing = false;\n if (this.isRelease) {\n return;\n }\n // console.log('progress col', this.colUpdatePos, this.colEnd, this.currentCol, this.totalCol);\n // console.log('progress row', this.rowUpdatePos, this.rowEnd, this.currentRow, this.totalRow);\n // console.log('before: createRow', table.scenegraph.bodyGroup.lastChild.attribute);\n // if (this.isSkipProgress) {\n // await this.progress();\n // } else\n if (this.colUpdatePos <= this.colEnd) {\n await this.updateColCellGroupsAsync();\n await this.progress();\n } else if (this.rowUpdatePos <= this.rowEnd) {\n // console.log('progress rowUpdatePos', this.rowUpdatePos);\n // 先更新\n await this.updateRowCellGroupsAsync();\n await this.progress();\n } else if (this.currentCol < this.totalCol) {\n await this.createCol();\n await this.progress();\n } else if (this.currentRow < this.totalRow) {\n // console.log('progress currentRow', this.currentRow);\n // 先更新没有需要更新的节点,在生成新节点\n await this.createRow();\n await this.progress();\n }\n resolve();\n }, 16);\n });\n }\n\n async createRow() {\n if (!this.taskRowCount) {\n return;\n }\n // console.log('createRow', this.currentRow, this.currentRow + this.taskRowCount);\n this.createRowCellGroup(this.taskRowCount);\n }\n\n async createCol() {\n if (!this.taskColCount) {\n return;\n }\n // console.log('createCol', this.currentCol, this.currentCol + this.taskColCount);\n this.createColGroup(this.taskRowCount);\n }\n\n createRowCellGroup(onceCount: number) {\n const endRow = Math.min(this.totalRow, this.currentRow + onceCount);\n // compute rows height\n computeRowsHeight(this.table, this.currentRow + 1, endRow, false);\n\n if (this.table.frozenColCount) {\n // create row header row cellGroup\n let maxHeight = 0;\n for (let col = 0; col < this.table.frozenColCount; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellLocation = this.table.isListTable() ? 'body' : 'rowHeader';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellLocation\n );\n maxHeight = Math.max(maxHeight, height);\n this.table.scenegraph.rowHeaderGroup.setAttribute('height', maxHeight);\n }\n }\n\n if (this.table.rightFrozenColCount) {\n // create row header row cellGroup\n let maxHeight = 0;\n for (let col = this.table.colCount - this.table.rightFrozenColCount; col < this.table.colCount; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellLocation = this.table.isListTable() ? 'body' : 'rowHeader';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellLocation\n );\n maxHeight = Math.max(maxHeight, height);\n this.table.scenegraph.rightFrozenGroup.setAttribute('height', maxHeight);\n }\n }\n\n // create body row cellGroup\n let maxHeight = 0;\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n if (!colGroup) {\n continue;\n }\n const cellLocation = 'body';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellLocation\n );\n maxHeight = Math.max(maxHeight, height);\n }\n this.table.scenegraph.bodyGroup.setAttribute('height', maxHeight);\n\n this.currentRow = endRow;\n this.rowEnd = endRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = this.rowStart + Math.floor((endRow - this.rowStart) / 2);\n\n // update container group size and border\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n createColGroup(onceCount: number) {\n // compute rows height\n const endCol = Math.min(this.totalCol, this.currentCol + onceCount);\n computeColsWidth(this.table, this.currentCol + 1, endCol);\n\n // update last merge cell size\n for (let row = 0; row < this.table.rowCount; row++) {\n const cellGroup = this.highPerformanceGetCell(this.currentCol, row);\n if (isNumber(cellGroup.mergeStartCol) && cellGroup.mergeStartCol > this.currentCol) {\n this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);\n }\n }\n\n // create column\n if (this.table.columnHeaderLevelCount) {\n // create colGroup\n const lastColumnGroup = (\n this.table.scenegraph.colHeaderGroup.lastChild instanceof Group\n ? this.table.scenegraph.colHeaderGroup.lastChild\n : this.table.scenegraph.colHeaderGroup.lastChild._prev\n ) as Group;\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create colHeaderGroup\n createColGroup(\n this.table.scenegraph.colHeaderGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n 0, // rowStart\n this.table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n this.table\n );\n }\n if (this.table.bottomFrozenRowCount) {\n // create colGroup\n const lastColumnGroup = (\n this.table.scenegraph.bottomFrozenGroup.lastChild instanceof Group\n ? this.table.scenegraph.bottomFrozenGroup.lastChild\n : this.table.scenegraph.bottomFrozenGroup.lastChild._prev\n ) as Group;\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create bottomFrozenGroup\n createColGroup(\n this.table.scenegraph.bottomFrozenGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n this.table.rowCount - this.table.bottomFrozenRowCount, // rowStart\n this.table.rowCount - 1, // rowEnd\n 'columnHeader', // isHeader\n this.table\n );\n }\n // create colGroup\n let lastColumnGroup =\n this.table.scenegraph.bodyGroup.lastChild &&\n ((this.table.scenegraph.bodyGroup.lastChild instanceof Group\n ? this.table.scenegraph.bodyGroup.lastChild\n : this.table.scenegraph.bodyGroup.lastChild._prev) as Group);\n if (!lastColumnGroup) {\n lastColumnGroup =\n this.table.scenegraph.colHeaderGroup.lastChild &&\n ((this.table.scenegraph.colHeaderGroup.lastChild instanceof Group\n ? this.table.scenegraph.colHeaderGroup.lastChild\n : this.table.scenegraph.colHeaderGroup.lastChild._prev) as Group);\n }\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create bodyGroup\n createColGroup(\n this.table.scenegraph.bodyGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n this.rowStart, // rowStart\n this.rowEnd, // rowEnd\n 'body', // isHeader\n this.table\n );\n\n this.currentCol = endCol;\n this.colEnd = endCol;\n this.colUpdatePos = this.colEnd;\n this.referenceCol = this.colStart + Math.floor((endCol - this.colStart) / 2);\n console.log('async', this.referenceCol, this.colStart, this.colEnd);\n\n // update container group size and border\n // this.table.scenegraph.updateContainerAttrWidthAndX();\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n async setY(y: number) {\n const yLimitTop = this.table.getRowsHeight(this.bodyTopRow, this.bodyTopRow + this.totalActualBodyRowCount) / 2;\n const yLimitBottom = this.table.getAllRowsHeight() - yLimitTop;\n if (y < yLimitTop && this.rowStart === this.bodyTopRow) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n } else if (y > yLimitBottom && this.rowEnd === this.bodyBottomRow) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n } else {\n // 执行动态更新节点\n this.dynamicSetY(y);\n }\n }\n\n async setX(x: number) {\n const xLimitLeft = this.table.getColsWidth(this.bodyLeftCol, this.bodyLeftCol + this.totalActualBodyColCount) / 2;\n const xLimitRight = this.table.getAllColsWidth() - xLimitLeft;\n if (x < xLimitLeft && this.colStart === this.bodyLeftCol) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndColHeaderX(-x);\n } else if (x > xLimitRight && this.colEnd === this.bodyRightCol) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndColHeaderX(-x);\n } else {\n // 执行动态更新节点\n this.dynamicSetX(x);\n }\n }\n\n async dynamicSetY(y: number) {\n dynamicSetY(y, this);\n }\n async dynamicSetX(x: number) {\n dynamicSetX(x, this);\n }\n\n updateBody(y: number) {\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n }\n\n async updateRowCellGroupsAsync() {\n this.updateCellGroups(this.taskRowCount);\n }\n\n updateCellGroups(count: number) {\n const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);\n // console.log('updateCellGroups', this.rowUpdatePos, distRow);\n if (this.table.heightMode === 'autoHeight') {\n computeRowsHeight(this.table, this.rowUpdatePos, distRow, false);\n }\n\n updateRowContent(this.rowUpdatePos, distRow, this);\n\n if (this.table.heightMode === 'autoHeight') {\n // body group\n updateAutoRow(\n this.bodyLeftCol, // colStart\n this.bodyRightCol, // colEnd\n this.rowUpdatePos, // rowStart\n distRow, // rowEnd\n this.table,\n this.rowUpdateDirection\n );\n // row header group\n updateAutoRow(\n 0, // colStart\n this.table.frozenColCount - 1, // colEnd\n this.rowUpdatePos, // rowStart\n distRow, // rowEnd\n this.table,\n this.rowUpdateDirection\n );\n // right frozen group\n updateAutoRow(\n this.table.colCount - this.table.rightFrozenColCount, // colStart\n this.table.colCount - 1, // colEnd\n this.rowUpdatePos, // rowStart\n distRow, // rowEnd\n this.table,\n this.rowUpdateDirection\n );\n }\n\n this.rowUpdatePos = distRow + 1;\n }\n\n async updateColCellGroupsAsync() {\n this.updateColGroups(this.taskRowCount);\n }\n\n updateColGroups(count: number) {\n const distCol = Math.min(this.bodyRightCol, this.colUpdatePos + count);\n // console.log('updateCellGroups', this.colUpdatePos, distCol);\n // for (let col = this.colUpdatePos; col <= distCol; col++) {\n // const colGroup = this.table.scenegraph.getColGroup(col);\n // if (colGroup) {\n // // colGroup.forEachChildren((cellGroup: Group) => {\n // // this.updateCellGroupContent(cellGroup);\n // // });\n // // for (let row = (colGroup.firstChild as Group).row; row <= (colGroup.lastChild as Group).row; row++) {\n // // const cellGroup = this.highPerformanceGetCell(colGroup.col, row);\n // // this.updateCellGroupContent(cellGroup);\n // // }\n // let cellGroup = colGroup.firstChild;\n // while (cellGroup) {\n // // this.updateCellGroupContent(cellGroup as Group);\n // // cellGroup = cellGroup._next;\n // const newCellGroup = this.updateCellGroupContent(cellGroup as Group);\n // cellGroup = newCellGroup._next;\n // }\n // colGroup.needUpdate = false;\n // }\n // }\n computeColsWidth(this.table, this.colUpdatePos, distCol);\n updateColContent(this.colUpdatePos, distCol, this);\n this.colUpdatePos = distCol + 1;\n }\n\n updateCellGroupPosition(cellGroup: Group, newRow: number, y: number) {\n // 更新位置&row\n cellGroup.row = newRow;\n cellGroup.setAttribute('y', y);\n (cellGroup as any).needUpdate = true;\n (cellGroup as any).needUpdateForAutoRowHeight = true;\n }\n\n updateCellGroupContent(cellGroup: Group) {\n if (!cellGroup.needUpdate || cellGroup.role !== 'cell') {\n return cellGroup;\n }\n\n const newCellGroup = this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);\n // 更新内容\n // const textMark = cellGroup.firstChild as WrapText;\n // const autoWrapText = Array.isArray(textMark.attribute.text);\n // const textStr: string = this.table.getCellValue(cellGroup.col, cellGroup.row);\n // let text;\n // if (autoWrapText) {\n // text = String(textStr).replace(/\\r?\\n/g, '\\n').replace(/\\r/g, '\\n').split('\\n');\n // } else {\n // text = textStr;\n // }\n\n // textMark.setAttribute('text', text);\n\n cellGroup.needUpdate = false;\n return newCellGroup || cellGroup;\n }\n\n async sortCellVertical() {\n await sortVertical(this);\n }\n\n async sortCellHorizontal() {\n await sortHorizontal(this);\n }\n\n highPerformanceGetCell(\n col: number,\n row: number,\n // rowStart: number = this.rowStart,\n // rowEnd: number = this.rowEnd,\n getShadow?: boolean\n ) {\n // if (row < rowStart || row > rowEnd) {\n // return emptyGroup;\n // }\n // if (row < this.rowStart || row > this.rowEnd || col < this.colStart || col > this.colEnd) {\n // return emptyGroup;\n // }\n\n if (\n row >= this.table.columnHeaderLevelCount && // not column header\n row < this.table.rowCount - this.table.bottomFrozenRowCount && // not bottom frozen\n (row < this.rowStart || row > this.rowEnd) // not in proxy row range\n ) {\n return emptyGroup;\n }\n\n if (\n col >= this.table.frozenColCount && // not row header\n col < this.table.colCount - this.table.rightFrozenColCount && // not right frozen\n (col < this.colStart || col > this.colEnd) // not in proxy col range\n ) {\n return emptyGroup;\n }\n\n if (this.cellCache.get(col)) {\n const cacheCellGoup = this.cellCache.get(col);\n if ((cacheCellGoup._next || cacheCellGoup._prev) && Math.abs(cacheCellGoup.row - row) < row) {\n // 由缓存单元格向前后查找要快于从头查找\n let cellGroup = getCellByCache(cacheCellGoup, row);\n if (!cellGroup || (!getShadow && cellGroup.role === 'shadow-cell')) {\n cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n }\n cellGroup.row && this.cellCache.set(col, cellGroup);\n return cellGroup;\n }\n const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n // cellGroup.row && this.cellCache.set(col, cellGroup);\n if (cellGroup.col === col && cellGroup.row) {\n this.cellCache.set(col, cellGroup);\n }\n return cellGroup;\n }\n const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n // cellGroup.row && this.cellCache.set(col, cellGroup);\n if (cellGroup.col === col && cellGroup.row) {\n this.cellCache.set(col, cellGroup);\n }\n return cellGroup;\n }\n\n release() {\n this.isRelease = true;\n }\n}\n\nfunction getCellByCache(cacheCellGroup: Group, row: number): Group | null {\n if (!cacheCellGroup) {\n return null;\n }\n if (cacheCellGroup.row === row) {\n return cacheCellGroup;\n } else if (cacheCellGroup.row > row) {\n return getCellByCache(cacheCellGroup._prev as Group, row);\n }\n return getCellByCache(cacheCellGroup._next as Group, row);\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/scenegraph/group-creater/progress/proxy.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAEnE,MAAM,OAAO,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AU,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QAErE,IAAI,SAAS,CAAC,GAAG,KAAK,GAAG,IAAI,SAAS,CAAC,GAAG,EAAE;YAC1C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;SACpC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO;QACL,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACxB,CAAC;CACF;AAED,SAAS,cAAc,CAAC,cAAqB,EAAE,GAAW;IACxD,IAAI,CAAC,cAAc,EAAE;QACnB,OAAO,IAAI,CAAC;KACb;IACD,IAAI,cAAc,CAAC,GAAG,KAAK,GAAG,EAAE;QAC9B,OAAO,cAAc,CAAC;KACvB;SAAM,IAAI,cAAc,CAAC,GAAG,GAAG,GAAG,EAAE;QACnC,OAAO,cAAc,CAAC,cAAc,CAAC,KAAc,EAAE,GAAG,CAAC,CAAC;KAC3D;IACD,OAAO,cAAc,CAAC,cAAc,CAAC,KAAc,EAAE,GAAG,CAAC,CAAC;AAC5D,CAAC","file":"proxy.js","sourcesContent":["import { isNumber } from '@visactor/vutils';\nimport type { BaseTableAPI } from '../../../ts-types/base-table';\nimport { Group } from '../../graphic/group';\nimport { computeColsWidth } from '../../layout/compute-col-width';\nimport { computeRowsHeight } from '../../layout/compute-row-height';\nimport { emptyGroup } from '../../utils/empty-group';\nimport { createColGroup } from '../column';\nimport { createComplexColumn } from '../column-helper';\nimport { createGroupForFirstScreen } from './create-group-for-first-screen';\nimport { dynamicSetX, updateColContent } from './update-position/dynamic-set-x';\nimport { dynamicSetY, updateRowContent } from './update-position/dynamic-set-y';\nimport { updateAutoRow } from './update-position/update-auto-row';\nimport { sortVertical } from './update-position/sort-vertical';\nimport { sortHorizontal } from './update-position/sort-horizontal';\n\nexport class SceneProxy {\n table: BaseTableAPI;\n isRelease: boolean = false;\n mode: 'column' | 'row' | 'pivot' = 'column';\n isProgressing: boolean;\n\n rowLimit = 200;\n currentRow = 0; // 目前渐进生成的row number\n totalRow: number; // 渐进完成最后一行的row number\n yLimitTop: number; // y > yLimitTop动态更新,否则直接修改xy\n yLimitBottom: number; // y < yLimitBottom动态更新,否则直接修改xy\n rowStart = 0; // 当前维护的部分第一行的row number\n rowEnd = 0; // 当前维护的部分最后一行的row number\n referenceRow = 0; // 当前维护的部分中间一行的row number,认为referenceRow对应当前屏幕显示范围的第一行\n bodyTopRow: number; // table body部分的第一行row number\n bodyBottomRow: number; // table body部分的最后一行row number\n screenRowCount: number; // 预计屏幕范围内显示的row count\n firstScreenRowLimit: number; // 首屏同步加载部分最后一行的row number\n taskRowCount: number; // 一次任务生成/更新的row count\n rowUpdatePos: number; // 异步任务目前更新到的行的row number\n rowUpdateDirection: 'up' | 'down'; // 当前行更新的方向\n screenTopRow: number = 0; // 当前屏幕范围内显示的第一行的row number\n totalActualBodyRowCount: number; // 实际表格body部分的行数\n deltaY: number = 0;\n\n colLimit = 100;\n // bodyLeftCol: number; // table body部分的第一列col number\n bodyRightCol: number; // table body部分的最后一列col number\n totalCol: number; // 渐进完成最后一列的col number\n colStart: number; // 当前维护的部分第一列的col number\n colEnd: number; // 当前维护的部分最后一列的col number\n taskColCount: number; // 一次任务生成/更新的col count\n xLimitLeft: number; // x > xLimitLeft动态更新,否则直接修改xy\n xLimitRight: number; // x < xLimitRight动态更新,否则直接修改xy\n screenColCount: number; // 预计屏幕范围内显示的col count\n firstScreenColLimit: number; // 首屏同步加载部分最后一列的col number\n colUpdatePos: number; // 异步任务目前更新到的列的col number\n currentCol: number; // 目前渐进生成的col number\n referenceCol: number; // 当前维护的部分中间一列的col number,认为referenceCol对应当前屏幕显示范围的第一列\n screenLeftCol: number = 0; // 当前屏幕范围内显示的第一列的col number\n colUpdateDirection: 'left' | 'right'; // 当前列更新方向\n totalActualBodyColCount: number; // 实际表格body部分的列数\n deltaX: number = 0;\n\n cellCache: Map<number, Group> = new Map(); // 单元格位置快速查找缓存\n\n constructor(table: BaseTableAPI) {\n this.table = table;\n\n if (this.table.isPivotChart()) {\n this.rowLimit = 100;\n this.colLimit = 100;\n } else if (this.table.heightMode === 'autoHeight') {\n this.rowLimit = 100;\n } else if (this.table.widthMode === 'autoWidth') {\n this.colLimit = 100;\n }\n\n if (this.table.internalProps.transpose) {\n this.mode = 'row';\n } else if (this.table.isPivotTable()) {\n this.mode = 'pivot';\n }\n if (this.table.options.maintainedDataCount) {\n this.rowLimit = this.table.options.maintainedDataCount;\n }\n }\n\n get bodyLeftCol(): number {\n return this.table.frozenColCount;\n }\n\n setParamsForColumn() {\n // this.bodyLeftCol = this.table.frozenColCount;\n this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;\n\n // compute the column info about progress creation\n const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);\n this.totalActualBodyColCount = totalActualBodyColCount;\n this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1; // 目标渐进完成的col\n this.colStart = this.bodyLeftCol;\n const defaultColWidth = this.table.defaultColWidth;\n this.taskColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth) * 1;\n\n // 确定动态更新限制\n const totalBodyWidth = defaultColWidth * totalActualBodyColCount;\n const totalWidth = defaultColWidth * (this.bodyRightCol - this.bodyLeftCol + 1);\n this.xLimitLeft = totalBodyWidth / 2;\n this.xLimitRight = totalWidth - totalBodyWidth / 2;\n\n // 确定首屏高度范围\n const widthLimit = this.table.tableNoFrameWidth * 5;\n this.screenColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth);\n this.firstScreenColLimit = this.bodyLeftCol + Math.min(this.colLimit, Math.ceil(widthLimit / defaultColWidth));\n // this.firstScreenRowLimit = this.bodyBottomRow;\n\n this.colUpdatePos = this.bodyRightCol;\n }\n\n setParamsForRow() {\n this.bodyTopRow = this.table.columnHeaderLevelCount;\n this.bodyBottomRow = this.table.rowCount - 1 - this.table.bottomFrozenRowCount;\n // this.bodyLeftCol = 0;\n // this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;\n\n // 计算渐进加载数量\n const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1); // 渐进加载总row数量\n this.totalActualBodyRowCount = totalActualBodyRowCount;\n this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1; // 目标渐进完成的row\n this.rowStart = this.bodyTopRow;\n const defaultRowHeight = this.table.defaultRowHeight;\n this.taskRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight) * 1;\n\n // 确定动态更新限制\n const totalBodyHeight = defaultRowHeight * totalActualBodyRowCount;\n const totalHeight = defaultRowHeight * (this.bodyBottomRow - this.bodyTopRow + 1);\n this.yLimitTop = totalBodyHeight / 2;\n this.yLimitBottom = totalHeight - totalBodyHeight / 2;\n // this.bottomOffset = totalHeight - totalBodyHeight / 2;\n\n // 确定首屏高度范围\n const heightLimit = this.table.tableNoFrameHeight * 5;\n this.screenRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight);\n this.firstScreenRowLimit = this.bodyTopRow + Math.min(this.rowLimit, Math.ceil(heightLimit / defaultRowHeight));\n // this.firstScreenRowLimit = this.bodyBottomRow;\n\n this.rowUpdatePos = this.bodyBottomRow;\n }\n\n createGroupForFirstScreen(\n cornerHeaderGroup: Group,\n colHeaderGroup: Group,\n rowHeaderGroup: Group,\n rightFrozenGroup: Group,\n bottomFrozenGroup: Group,\n bodyGroup: Group,\n xOrigin: number,\n yOrigin: number\n ) {\n createGroupForFirstScreen(\n cornerHeaderGroup,\n colHeaderGroup,\n rowHeaderGroup,\n rightFrozenGroup,\n bottomFrozenGroup,\n bodyGroup,\n xOrigin,\n yOrigin,\n this\n );\n }\n // async progress() {\n // if (this.rowUpdatePos < this.rowEnd) {\n // console.log('progress rowUpdatePos', this.rowUpdatePos);\n // // 先更新\n // await this.updateCellGroupsAsync();\n // await this.progress();\n // } else if (this.currentRow < this.totalRow) {\n // console.log('progress currentRow', this.currentRow);\n // // 先更新没有需要更新的节点,在生成新节点\n // await this.createRow();\n // await this.progress();\n // }\n // }\n async progress() {\n if (this.isProgressing) {\n return;\n }\n this.isProgressing = true;\n return new Promise<void>((resolve, reject) => {\n setTimeout(async () => {\n this.isProgressing = false;\n if (this.isRelease) {\n return;\n }\n // console.log('progress col', this.colUpdatePos, this.colEnd, this.currentCol, this.totalCol);\n // console.log('progress row', this.rowUpdatePos, this.rowEnd, this.currentRow, this.totalRow);\n // console.log('before: createRow', table.scenegraph.bodyGroup.lastChild.attribute);\n // if (this.isSkipProgress) {\n // await this.progress();\n // } else\n if (this.colUpdatePos <= this.colEnd) {\n await this.updateColCellGroupsAsync();\n await this.progress();\n } else if (this.rowUpdatePos <= this.rowEnd) {\n // console.log('progress rowUpdatePos', this.rowUpdatePos);\n // 先更新\n await this.updateRowCellGroupsAsync();\n await this.progress();\n } else if (this.currentCol < this.totalCol) {\n await this.createCol();\n await this.progress();\n } else if (this.currentRow < this.totalRow) {\n // console.log('progress currentRow', this.currentRow);\n // 先更新没有需要更新的节点,在生成新节点\n await this.createRow();\n await this.progress();\n }\n resolve();\n }, 16);\n });\n }\n\n async createRow() {\n if (!this.taskRowCount) {\n return;\n }\n // console.log('createRow', this.currentRow, this.currentRow + this.taskRowCount);\n this.createRowCellGroup(this.taskRowCount);\n }\n\n async createCol() {\n if (!this.taskColCount) {\n return;\n }\n // console.log('createCol', this.currentCol, this.currentCol + this.taskColCount);\n this.createColGroup(this.taskRowCount);\n }\n\n createRowCellGroup(onceCount: number) {\n const endRow = Math.min(this.totalRow, this.currentRow + onceCount);\n // compute rows height\n computeRowsHeight(this.table, this.currentRow + 1, endRow, false);\n\n if (this.table.frozenColCount) {\n // create row header row cellGroup\n let maxHeight = 0;\n for (let col = 0; col < this.table.frozenColCount; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellLocation = this.table.isListTable() ? 'body' : 'rowHeader';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellLocation\n );\n maxHeight = Math.max(maxHeight, height);\n this.table.scenegraph.rowHeaderGroup.setAttribute('height', maxHeight);\n }\n }\n\n if (this.table.rightFrozenColCount) {\n // create row header row cellGroup\n let maxHeight = 0;\n for (let col = this.table.colCount - this.table.rightFrozenColCount; col < this.table.colCount; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellLocation = this.table.isListTable() ? 'body' : 'rowHeader';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellLocation\n );\n maxHeight = Math.max(maxHeight, height);\n this.table.scenegraph.rightFrozenGroup.setAttribute('height', maxHeight);\n }\n }\n\n // create body row cellGroup\n let maxHeight = 0;\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n if (!colGroup) {\n continue;\n }\n const cellLocation = 'body';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellLocation\n );\n maxHeight = Math.max(maxHeight, height);\n }\n this.table.scenegraph.bodyGroup.setAttribute('height', maxHeight);\n\n this.currentRow = endRow;\n this.rowEnd = endRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = this.rowStart + Math.floor((endRow - this.rowStart) / 2);\n\n // update container group size and border\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n createColGroup(onceCount: number) {\n // compute rows height\n const endCol = Math.min(this.totalCol, this.currentCol + onceCount);\n computeColsWidth(this.table, this.currentCol + 1, endCol);\n\n // update last merge cell size\n for (let row = 0; row < this.table.rowCount; row++) {\n const cellGroup = this.highPerformanceGetCell(this.currentCol, row);\n if (isNumber(cellGroup.mergeStartCol) && cellGroup.mergeStartCol > this.currentCol) {\n this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);\n }\n }\n\n // create column\n if (this.table.columnHeaderLevelCount) {\n // create colGroup\n const lastColumnGroup = (\n this.table.scenegraph.colHeaderGroup.lastChild instanceof Group\n ? this.table.scenegraph.colHeaderGroup.lastChild\n : this.table.scenegraph.colHeaderGroup.lastChild._prev\n ) as Group;\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create colHeaderGroup\n createColGroup(\n this.table.scenegraph.colHeaderGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n 0, // rowStart\n this.table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n this.table\n );\n }\n if (this.table.bottomFrozenRowCount) {\n // create colGroup\n const lastColumnGroup = (\n this.table.scenegraph.bottomFrozenGroup.lastChild instanceof Group\n ? this.table.scenegraph.bottomFrozenGroup.lastChild\n : this.table.scenegraph.bottomFrozenGroup.lastChild._prev\n ) as Group;\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create bottomFrozenGroup\n createColGroup(\n this.table.scenegraph.bottomFrozenGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n this.table.rowCount - this.table.bottomFrozenRowCount, // rowStart\n this.table.rowCount - 1, // rowEnd\n 'columnHeader', // isHeader\n this.table\n );\n }\n // create colGroup\n let lastColumnGroup =\n this.table.scenegraph.bodyGroup.lastChild &&\n ((this.table.scenegraph.bodyGroup.lastChild instanceof Group\n ? this.table.scenegraph.bodyGroup.lastChild\n : this.table.scenegraph.bodyGroup.lastChild._prev) as Group);\n if (!lastColumnGroup) {\n lastColumnGroup =\n this.table.scenegraph.colHeaderGroup.lastChild &&\n ((this.table.scenegraph.colHeaderGroup.lastChild instanceof Group\n ? this.table.scenegraph.colHeaderGroup.lastChild\n : this.table.scenegraph.colHeaderGroup.lastChild._prev) as Group);\n }\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create bodyGroup\n createColGroup(\n this.table.scenegraph.bodyGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n this.rowStart, // rowStart\n this.rowEnd, // rowEnd\n 'body', // isHeader\n this.table\n );\n\n this.currentCol = endCol;\n this.colEnd = endCol;\n this.colUpdatePos = this.colEnd;\n this.referenceCol = this.colStart + Math.floor((endCol - this.colStart) / 2);\n console.log('async', this.referenceCol, this.colStart, this.colEnd);\n\n // update container group size and border\n // this.table.scenegraph.updateContainerAttrWidthAndX();\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n async setY(y: number) {\n const yLimitTop = this.table.getRowsHeight(this.bodyTopRow, this.bodyTopRow + this.totalActualBodyRowCount) / 2;\n const yLimitBottom = this.table.getAllRowsHeight() - yLimitTop;\n if (y < yLimitTop && this.rowStart === this.bodyTopRow) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n } else if (y > yLimitBottom && this.rowEnd === this.bodyBottomRow) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n } else {\n // 执行动态更新节点\n this.dynamicSetY(y);\n }\n }\n\n async setX(x: number) {\n const xLimitLeft = this.table.getColsWidth(this.bodyLeftCol, this.bodyLeftCol + this.totalActualBodyColCount) / 2;\n const xLimitRight = this.table.getAllColsWidth() - xLimitLeft;\n if (x < xLimitLeft && this.colStart === this.bodyLeftCol) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndColHeaderX(-x);\n } else if (x > xLimitRight && this.colEnd === this.bodyRightCol) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndColHeaderX(-x);\n } else {\n // 执行动态更新节点\n this.dynamicSetX(x);\n }\n }\n\n async dynamicSetY(y: number) {\n dynamicSetY(y, this);\n }\n async dynamicSetX(x: number) {\n dynamicSetX(x, this);\n }\n\n updateBody(y: number) {\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n }\n\n async updateRowCellGroupsAsync() {\n this.updateCellGroups(this.taskRowCount);\n }\n\n updateCellGroups(count: number) {\n const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);\n // console.log('updateCellGroups', this.rowUpdatePos, distRow);\n if (this.table.heightMode === 'autoHeight') {\n computeRowsHeight(this.table, this.rowUpdatePos, distRow, false);\n }\n\n updateRowContent(this.rowUpdatePos, distRow, this);\n\n if (this.table.heightMode === 'autoHeight') {\n // body group\n updateAutoRow(\n this.bodyLeftCol, // colStart\n this.bodyRightCol, // colEnd\n this.rowUpdatePos, // rowStart\n distRow, // rowEnd\n this.table,\n this.rowUpdateDirection\n );\n // row header group\n updateAutoRow(\n 0, // colStart\n this.table.frozenColCount - 1, // colEnd\n this.rowUpdatePos, // rowStart\n distRow, // rowEnd\n this.table,\n this.rowUpdateDirection\n );\n // right frozen group\n updateAutoRow(\n this.table.colCount - this.table.rightFrozenColCount, // colStart\n this.table.colCount - 1, // colEnd\n this.rowUpdatePos, // rowStart\n distRow, // rowEnd\n this.table,\n this.rowUpdateDirection\n );\n }\n\n this.rowUpdatePos = distRow + 1;\n }\n\n async updateColCellGroupsAsync() {\n this.updateColGroups(this.taskRowCount);\n }\n\n updateColGroups(count: number) {\n const distCol = Math.min(this.bodyRightCol, this.colUpdatePos + count);\n // console.log('updateCellGroups', this.colUpdatePos, distCol);\n // for (let col = this.colUpdatePos; col <= distCol; col++) {\n // const colGroup = this.table.scenegraph.getColGroup(col);\n // if (colGroup) {\n // // colGroup.forEachChildren((cellGroup: Group) => {\n // // this.updateCellGroupContent(cellGroup);\n // // });\n // // for (let row = (colGroup.firstChild as Group).row; row <= (colGroup.lastChild as Group).row; row++) {\n // // const cellGroup = this.highPerformanceGetCell(colGroup.col, row);\n // // this.updateCellGroupContent(cellGroup);\n // // }\n // let cellGroup = colGroup.firstChild;\n // while (cellGroup) {\n // // this.updateCellGroupContent(cellGroup as Group);\n // // cellGroup = cellGroup._next;\n // const newCellGroup = this.updateCellGroupContent(cellGroup as Group);\n // cellGroup = newCellGroup._next;\n // }\n // colGroup.needUpdate = false;\n // }\n // }\n computeColsWidth(this.table, this.colUpdatePos, distCol);\n updateColContent(this.colUpdatePos, distCol, this);\n this.colUpdatePos = distCol + 1;\n }\n\n updateCellGroupPosition(cellGroup: Group, newRow: number, y: number) {\n // 更新位置&row\n cellGroup.row = newRow;\n cellGroup.setAttribute('y', y);\n (cellGroup as any).needUpdate = true;\n (cellGroup as any).needUpdateForAutoRowHeight = true;\n }\n\n updateCellGroupContent(cellGroup: Group) {\n if (!cellGroup.needUpdate || cellGroup.role !== 'cell') {\n return cellGroup;\n }\n\n const newCellGroup = this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);\n // 更新内容\n // const textMark = cellGroup.firstChild as WrapText;\n // const autoWrapText = Array.isArray(textMark.attribute.text);\n // const textStr: string = this.table.getCellValue(cellGroup.col, cellGroup.row);\n // let text;\n // if (autoWrapText) {\n // text = String(textStr).replace(/\\r?\\n/g, '\\n').replace(/\\r/g, '\\n').split('\\n');\n // } else {\n // text = textStr;\n // }\n\n // textMark.setAttribute('text', text);\n\n cellGroup.needUpdate = false;\n return newCellGroup || cellGroup;\n }\n\n async sortCellVertical() {\n await sortVertical(this);\n }\n\n async sortCellHorizontal() {\n await sortHorizontal(this);\n }\n\n highPerformanceGetCell(\n col: number,\n row: number,\n // rowStart: number = this.rowStart,\n // rowEnd: number = this.rowEnd,\n getShadow?: boolean\n ) {\n // if (row < rowStart || row > rowEnd) {\n // return emptyGroup;\n // }\n // if (row < this.rowStart || row > this.rowEnd || col < this.colStart || col > this.colEnd) {\n // return emptyGroup;\n // }\n\n if (\n row >= this.table.columnHeaderLevelCount && // not column header\n row < this.table.rowCount - this.table.bottomFrozenRowCount && // not bottom frozen\n (row < this.rowStart || row > this.rowEnd) // not in proxy row range\n ) {\n return emptyGroup;\n }\n\n if (\n col >= this.table.frozenColCount && // not row header\n col < this.table.colCount - this.table.rightFrozenColCount && // not right frozen\n (col < this.colStart || col > this.colEnd) // not in proxy col range\n ) {\n return emptyGroup;\n }\n\n if (this.cellCache.get(col)) {\n const cacheCellGoup = this.cellCache.get(col);\n if ((cacheCellGoup._next || cacheCellGoup._prev) && Math.abs(cacheCellGoup.row - row) < row) {\n // 由缓存单元格向前后查找要快于从头查找\n let cellGroup = getCellByCache(cacheCellGoup, row);\n if (!cellGroup || (!getShadow && cellGroup.role === 'shadow-cell')) {\n cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n }\n cellGroup.row && this.cellCache.set(col, cellGroup);\n return cellGroup;\n }\n const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n // cellGroup.row && this.cellCache.set(col, cellGroup);\n if (cellGroup.col === col && cellGroup.row) {\n this.cellCache.set(col, cellGroup);\n }\n return cellGroup;\n }\n const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n // cellGroup.row && this.cellCache.set(col, cellGroup);\n if (cellGroup.col === col && cellGroup.row) {\n this.cellCache.set(col, cellGroup);\n }\n return cellGroup;\n }\n\n release() {\n this.isRelease = true;\n }\n}\n\nfunction getCellByCache(cacheCellGroup: Group, row: number): Group | null {\n if (!cacheCellGroup) {\n return null;\n }\n if (cacheCellGroup.row === row) {\n return cacheCellGroup;\n } else if (cacheCellGroup.row > row) {\n return getCellByCache(cacheCellGroup._prev as Group, row);\n }\n return getCellByCache(cacheCellGroup._next as Group, row);\n}\n"]}
|
|
@@ -8,25 +8,25 @@ import { dealWithIcon } from "../utils/text-icon-layout";
|
|
|
8
8
|
|
|
9
9
|
export function hideHoverIcon(col, row, scene) {
|
|
10
10
|
-1 !== col && -1 !== row && (updateCellRangeIcon(col, row, (icon => "mouseenter_cell" === icon.attribute.visibleTime), (icon => {
|
|
11
|
-
icon.setAttribute("
|
|
11
|
+
icon.setAttribute("opacity", 0);
|
|
12
12
|
}), scene), scene.updateNextFrame());
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export function showHoverIcon(col, row, scene) {
|
|
16
16
|
-1 !== col && -1 !== row && (updateCellRangeIcon(col, row, (icon => "mouseenter_cell" === icon.attribute.visibleTime), (icon => {
|
|
17
|
-
icon.setAttribute("
|
|
17
|
+
icon.setAttribute("opacity", 1);
|
|
18
18
|
}), scene), scene.updateNextFrame());
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export function hideClickIcon(col, row, scene) {
|
|
22
22
|
-1 !== col && -1 !== row && (updateCellRangeIcon(col, row, (icon => "click_cell" === icon.attribute.visibleTime), (icon => {
|
|
23
|
-
icon.setAttribute("
|
|
23
|
+
icon.setAttribute("opacity", 0);
|
|
24
24
|
}), scene), scene.updateNextFrame());
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export function showClickIcon(col, row, scene) {
|
|
28
28
|
-1 !== col && -1 !== row && (updateCellRangeIcon(col, row, (icon => "click_cell" === icon.attribute.visibleTime), (icon => {
|
|
29
|
-
icon.setAttribute("
|
|
29
|
+
icon.setAttribute("opacity", 1);
|
|
30
30
|
}), scene), scene.updateNextFrame());
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/icon/icon-update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIlD,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD,MAAM,UAAU,aAAa,CAAC,GAAW,EAAE,GAAW,EAAE,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AAM,UAAU,mBAAmB,CAAC,SAAgB,EAAE,MAA+B,EAAE,MAA4B;IACjH,SAAS,CAAC,eAAe,CAAC,CAAC,KAAU,EAAE,EAAE;QACvC,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE;YAC1B,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;SAC5C;aAAM,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE;YACxB,MAAM,CAAC,KAAK,CAAC,CAAC;SACf;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,GAAW,EACX,GAAW,EACX,MAA+B,EAC/B,MAA4B,EAC5B,KAAiB;IAEjB,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC1C,IACE,OAAO,CAAC,SAAS,CAAC,aAAa,CAAC;QAChC,OAAO,CAAC,SAAS,CAAC,aAAa,CAAC;QAChC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC;QAC9B,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,EAC9B;QACA,KAAK,IAAI,GAAG,GAAG,SAAS,CAAC,aAAa,EAAE,GAAG,IAAI,SAAS,CAAC,WAAW,EAAE,GAAG,EAAE,EAAE;YAC3E,KAAK,IAAI,GAAG,GAAG,SAAS,CAAC,aAAa,EAAE,GAAG,IAAI,SAAS,CAAC,WAAW,EAAE,GAAG,EAAE,EAAE;gBAC3E,mBAAmB,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;aAC9D;SACF;KACF;SAAM;QACL,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;KAChD;AACH,CAAC","file":"icon-update.js","sourcesContent":["import { isValid } from '@visactor/vutils';\nimport type { Group } from '../graphic/group';\nimport type { Scenegraph } from '../scenegraph';\nimport type { ColumnIconOption, SortOrder, SvgIcon } from '../../ts-types';\nimport { IconFuncTypeEnum } from '../../ts-types';\nimport type { Icon } from '../graphic/icon';\nimport type { TooltipOptions } from '../../ts-types/tooltip';\nimport type { IRect } from '@visactor/vrender';\nimport { IContainPointMode, createRect } from '@visactor/vrender';\nimport { dealWithIcon } from '../utils/text-icon-layout';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\n\nexport function hideHoverIcon(col: number, row: number, scene: Scenegraph) {\n if (col === -1 || row === -1) {\n return;\n }\n // const cellGroup = scene.getCell(col, row);\n // hideIcon(scene, cellGroup, 'mouseenter_cell');\n\n // hideIcon\n updateCellRangeIcon(\n col,\n row,\n (icon: Icon) => icon.attribute.visibleTime === 'mouseenter_cell',\n (icon: Icon) => {\n icon.setAttribute('visible', false);\n },\n scene\n );\n scene.updateNextFrame();\n}\n\nexport function showHoverIcon(col: number, row: number, scene: Scenegraph) {\n if (col === -1 || row === -1) {\n return;\n }\n // const cellGroup = scene.getCell(col, row);\n // showIcon(scene, cellGroup, 'mouseenter_cell');\n\n // showIcon\n updateCellRangeIcon(\n col,\n row,\n (icon: Icon) => icon.attribute.visibleTime === 'mouseenter_cell',\n (icon: Icon) => {\n icon.setAttribute('visible', true);\n },\n scene\n );\n scene.updateNextFrame();\n}\n\nexport function hideClickIcon(col: number, row: number, scene: Scenegraph) {\n if (col === -1 || row === -1) {\n return;\n }\n // const cellGroup = scene.getCell(col, row);\n // hideIcon(scene, cellGroup, 'click_cell');\n\n // hideIcon\n updateCellRangeIcon(\n col,\n row,\n (icon: Icon) => icon.attribute.visibleTime === 'click_cell',\n (icon: Icon) => {\n icon.setAttribute('visible', false);\n },\n scene\n );\n scene.updateNextFrame();\n}\n\nexport function showClickIcon(col: number, row: number, scene: Scenegraph) {\n if (col === -1 || row === -1) {\n return;\n }\n // const cellGroup = scene.getCell(col, row);\n // showIcon(scene, cellGroup, 'click_cell');\n\n // showIcon\n updateCellRangeIcon(\n col,\n row,\n (icon: Icon) => icon.attribute.visibleTime === 'click_cell',\n (icon: Icon) => {\n icon.setAttribute('visible', true);\n },\n scene\n );\n scene.updateNextFrame();\n}\n\n/**\n * @description: 获取指定单元格指定位置的icon mark\n * @param {number} col\n * @param {number} row\n * @param {number} x\n * @param {number} y\n * @return {*}\n */\nexport function getIconByXY(col: number, row: number, x: number, y: number, scene: Scenegraph): Icon | undefined {\n const cellGroup = scene.getCell(col, row);\n let pickMark;\n cellGroup.forEachChildren((mark: Icon) => {\n if (mark.role && mark.role.startsWith('icon') && mark.containsPoint(x, y, IContainPointMode.GLOBAL)) {\n pickMark = mark;\n }\n });\n return pickMark;\n}\n\n/**\n * @description: 将指定icon mark设置为Hover样式\n * @param {Icon} icon\n * @param {number} col\n * @param {number} row\n * @return {*}\n */\nexport function setIconHoverStyle(baseIcon: Icon, col: number, row: number, cellGroup: Group, scene: Scenegraph) {\n if (baseIcon.attribute.backgroundColor || baseIcon.attribute.hoverImage) {\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) => icon.name === baseIcon.name,\n (icon: Icon) => {\n // hover展示背景\n if (icon.attribute.backgroundColor) {\n let iconBack = icon.parent.getChildByName('icon-back') as IRect;\n if (iconBack) {\n iconBack.setAttributes({\n x:\n (icon.attribute.x ?? 0) +\n (icon.attribute.dx ?? 0) +\n (icon.AABBBounds.width() - icon.backgroundWidth) / 2,\n y: (icon.attribute.y ?? 0) + (icon.AABBBounds.height() - icon.backgroundHeight) / 2,\n dx: icon.attribute.dx ?? 0,\n dy: icon.attribute.dy ?? 0,\n width: icon.backgroundWidth,\n height: icon.backgroundHeight,\n fill: icon.attribute.backgroundColor,\n cornerRadius: 5,\n visible: true\n });\n } else {\n iconBack = createRect({\n x:\n (icon.attribute.x ?? 0) +\n (icon.attribute.dx ?? 0) +\n (icon.AABBBounds.width() - icon.backgroundWidth) / 2,\n y: (icon.attribute.y ?? 0) + (icon.AABBBounds.height() - icon.backgroundHeight) / 2,\n dx: icon.attribute.dx ?? 0,\n dy: icon.attribute.dy ?? 0,\n width: icon.backgroundWidth,\n height: icon.backgroundHeight,\n fill: icon.attribute.backgroundColor,\n cornerRadius: 5,\n pickable: false,\n visible: true\n }) as IRect;\n iconBack.name = 'icon-back';\n // cellGroup.appendChild(iconBack);\n }\n icon.parent.insertBefore(iconBack, icon);\n }\n\n // hover更换图片\n if (icon.attribute.hoverImage && icon.attribute.image !== icon.attribute.hoverImage) {\n icon.image = icon.attribute.hoverImage;\n }\n },\n scene\n );\n }\n // hover展示tooltip\n if (baseIcon.tooltip) {\n const { x1: left, x2: right, y1: top, y2: bottom } = baseIcon.globalAABBBounds;\n const tooltipOptions: TooltipOptions = {\n content: baseIcon.tooltip.title,\n referencePosition: {\n rect: {\n left: left,\n right: right,\n top: top,\n bottom: bottom,\n width: baseIcon.globalAABBBounds.width(),\n height: baseIcon.globalAABBBounds.height()\n },\n placement: baseIcon.tooltip.placement\n },\n style: Object.assign({}, scene.table.internalProps.theme?.tooltipStyle, baseIcon.tooltip?.style)\n };\n if (!scene.table.internalProps.tooltipHandler.isBinded(tooltipOptions)) {\n scene.table.showTooltip(col, row, tooltipOptions);\n }\n }\n}\n\n/**\n * @description: 将指定icon mark设置为Normal样式\n * @param {Icon} icon\n * @param {number} col\n * @param {number} row\n * @return {*}\n */\nexport function setIconNormalStyle(baseIcon: Icon, col: number, row: number, scene: Scenegraph) {\n if (baseIcon.attribute.backgroundColor || baseIcon.attribute.hoverImage) {\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) => icon.name === baseIcon.name,\n (icon: Icon) => {\n const iconBack = icon.parent.getChildByName('icon-back') as IRect;\n if (iconBack) {\n iconBack.setAttribute('visible', false);\n }\n\n // hover更换图片\n if (icon.attribute.hoverImage && icon.attribute.image !== icon.attribute.originImage) {\n icon.image = icon.attribute.originImage;\n }\n },\n scene\n );\n }\n}\n\nexport function updateIcon(baseIcon: Icon, iconConfig: ColumnIconOption, col: number, row: number, scene: Scenegraph) {\n // 直接更新mark attribute\n // dealWithIcon(iconConfig, icon);\n // icon.name = iconConfig.name;\n // scene.updateNextFrame();\n\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) => icon.name === baseIcon.name,\n // dealer\n (icon: Icon) => {\n dealWithIcon(iconConfig, icon);\n icon.name = iconConfig.name;\n },\n scene\n );\n\n scene.updateNextFrame();\n}\n\nfunction resetSortIcon(oldSortCol: number, oldSortRow: number, iconConfig: ColumnIconOption, scene: Scenegraph) {\n const oldSortCell = scene.getCell(oldSortCol, oldSortRow);\n if (\n isValid(oldSortCell.mergeStartCol) &&\n isValid(oldSortCell.mergeStartRow) &&\n isValid(oldSortCell.mergeEndCol) &&\n isValid(oldSortCell.mergeEndRow)\n ) {\n for (let col = oldSortCell.mergeStartCol; col <= oldSortCell.mergeEndCol; col++) {\n for (let row = oldSortCell.mergeStartRow; row <= oldSortCell.mergeEndRow; row++) {\n let oldIconMark: Icon;\n scene.getCell(col, row).forEachChildren((mark: Icon) => {\n if (mark.attribute.funcType === 'sort') {\n oldIconMark = mark;\n return true;\n }\n return false;\n });\n if (oldIconMark) {\n dealWithIcon(iconConfig, oldIconMark);\n oldIconMark.name = iconConfig.name;\n }\n }\n }\n } else {\n let oldIconMark: Icon;\n oldSortCell.forEachChildren((mark: Icon) => {\n if (mark.attribute.funcType === 'sort') {\n oldIconMark = mark;\n return true;\n }\n return false;\n });\n if (oldIconMark) {\n // updateIcon(oldIconMark, oldIcon);\n dealWithIcon(iconConfig, oldIconMark);\n oldIconMark.name = iconConfig.name;\n }\n }\n}\n\nfunction checkSameCell(col1: number, row1: number, col2: number, row2: number, table: BaseTableAPI) {\n const range1 = table.getCellRange(col1, row1);\n const range2 = table.getCellRange(col2, row2);\n if (\n range1.start.col === range2.start.col &&\n range1.start.row === range2.start.row &&\n range1.end.col === range2.end.col &&\n range1.end.row === range2.end.row\n ) {\n return true;\n }\n return false;\n}\n\nexport function updateSortIcon(\n col: number,\n row: number,\n iconMark: Icon,\n order: SortOrder,\n oldSortCol: number,\n oldSortRow: number,\n oldIconMark: Icon | undefined,\n scene: Scenegraph\n) {\n // 更新icon\n const icon = scene.table.internalProps.headerHelper.getSortIcon(order, scene.table, col, row);\n if (iconMark) {\n updateIcon(iconMark, icon, col, row, scene);\n }\n\n // 更新旧frozen icon\n if (!checkSameCell(col, row, oldSortCol, oldSortRow, scene.table)) {\n const oldIcon = scene.table.internalProps.headerHelper.getSortIcon('normal', scene.table, oldSortCol, oldSortRow);\n if (oldIconMark) {\n updateIcon(oldIconMark, oldIcon, oldSortCol, oldSortRow, scene);\n } else {\n resetSortIcon(oldSortCol, oldSortRow, oldIcon, scene);\n }\n }\n}\n\nexport function updateFrozenIcon(scene: Scenegraph) {\n // 依据新旧冻结列确定更新范围\n for (let col = 0; col < scene.table.colCount; col++) {\n for (let row = 0; row < scene.table.columnHeaderLevelCount; row++) {\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) => icon.attribute.funcType === 'frozen',\n // dealer\n (icon: Icon) => {\n const iconConfig = scene.table.internalProps.headerHelper.getFrozenIcon(col, row);\n dealWithIcon(iconConfig, icon);\n icon.name = iconConfig.name;\n },\n scene\n );\n }\n }\n}\n\nexport function updateHierarchyIcon(col: number, row: number, scene: Scenegraph) {\n let iconConfig: SvgIcon;\n if (scene.table.isHeader(col, row)) {\n iconConfig = scene.table.internalProps.headerHelper.getHierarchyIcon(col, row);\n } else {\n iconConfig = scene.table.internalProps.bodyHelper.getHierarchyIcon(col, row);\n }\n\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) =>\n icon.attribute.funcType === IconFuncTypeEnum.collapse || icon.attribute.funcType === IconFuncTypeEnum.expand,\n // dealer\n (icon: Icon) => {\n dealWithIcon(iconConfig, icon);\n icon.name = iconConfig.name;\n },\n scene\n );\n}\n\nexport function updateCellGroupIcon(cellGroup: Group, filter: (icon: Icon) => boolean, dealer: (icon: Icon) => void) {\n cellGroup.forEachChildren((child: any) => {\n if (child.type === 'group') {\n updateCellGroupIcon(child, filter, dealer);\n } else if (filter(child)) {\n dealer(child);\n }\n });\n}\n\nexport function updateCellRangeIcon(\n col: number,\n row: number,\n filter: (icon: Icon) => boolean,\n dealer: (icon: Icon) => void,\n scene: Scenegraph\n) {\n const cellGroup = scene.getCell(col, row);\n if (\n isValid(cellGroup.mergeStartCol) &&\n isValid(cellGroup.mergeStartRow) &&\n isValid(cellGroup.mergeEndCol) &&\n isValid(cellGroup.mergeEndRow)\n ) {\n for (let col = cellGroup.mergeStartCol; col <= cellGroup.mergeEndCol; col++) {\n for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {\n updateCellGroupIcon(scene.getCell(col, row), filter, dealer);\n }\n }\n } else {\n updateCellGroupIcon(cellGroup, filter, dealer);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/scenegraph/icon/icon-update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIlD,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD,MAAM,UAAU,aAAa,CAAC,GAAW,EAAE,GAAW,EAAE,KAAiB;IACvE,IAAI,GAAG,KAAK,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE;QAC5B,OAAO;KACR;IAKD,mBAAmB,CACjB,GAAG,EACH,GAAG,EACH,CAAC,IAAU,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,KAAK,iBAAiB,EAChE,CAAC,IAAU,EAAE,EAAE;QACb,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IAClC,CAAC,EACD,KAAK,CACN,CAAC;IACF,KAAK,CAAC,eAAe,EAAE,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,GAAW,EAA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EAC5B,KAAiB;IAEjB,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC1C,IACE,OAAO,CAAC,SAAS,CAAC,aAAa,CAAC;QAChC,OAAO,CAAC,SAAS,CAAC,aAAa,CAAC;QAChC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC;QAC9B,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,EAC9B;QACA,KAAK,IAAI,GAAG,GAAG,SAAS,CAAC,aAAa,EAAE,GAAG,IAAI,SAAS,CAAC,WAAW,EAAE,GAAG,EAAE,EAAE;YAC3E,KAAK,IAAI,GAAG,GAAG,SAAS,CAAC,aAAa,EAAE,GAAG,IAAI,SAAS,CAAC,WAAW,EAAE,GAAG,EAAE,EAAE;gBAC3E,mBAAmB,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;aAC9D;SACF;KACF;SAAM;QACL,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;KAChD;AACH,CAAC","file":"icon-update.js","sourcesContent":["import { isValid } from '@visactor/vutils';\nimport type { Group } from '../graphic/group';\nimport type { Scenegraph } from '../scenegraph';\nimport type { ColumnIconOption, SortOrder, SvgIcon } from '../../ts-types';\nimport { IconFuncTypeEnum } from '../../ts-types';\nimport type { Icon } from '../graphic/icon';\nimport type { TooltipOptions } from '../../ts-types/tooltip';\nimport type { IRect } from '@visactor/vrender';\nimport { IContainPointMode, createRect } from '@visactor/vrender';\nimport { dealWithIcon } from '../utils/text-icon-layout';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\n\nexport function hideHoverIcon(col: number, row: number, scene: Scenegraph) {\n if (col === -1 || row === -1) {\n return;\n }\n // const cellGroup = scene.getCell(col, row);\n // hideIcon(scene, cellGroup, 'mouseenter_cell');\n\n // hideIcon\n updateCellRangeIcon(\n col,\n row,\n (icon: Icon) => icon.attribute.visibleTime === 'mouseenter_cell',\n (icon: Icon) => {\n icon.setAttribute('opacity', 0);\n },\n scene\n );\n scene.updateNextFrame();\n}\n\nexport function showHoverIcon(col: number, row: number, scene: Scenegraph) {\n if (col === -1 || row === -1) {\n return;\n }\n // const cellGroup = scene.getCell(col, row);\n // showIcon(scene, cellGroup, 'mouseenter_cell');\n\n // showIcon\n updateCellRangeIcon(\n col,\n row,\n (icon: Icon) => icon.attribute.visibleTime === 'mouseenter_cell',\n (icon: Icon) => {\n icon.setAttribute('opacity', 1);\n },\n scene\n );\n scene.updateNextFrame();\n}\n\nexport function hideClickIcon(col: number, row: number, scene: Scenegraph) {\n if (col === -1 || row === -1) {\n return;\n }\n // const cellGroup = scene.getCell(col, row);\n // hideIcon(scene, cellGroup, 'click_cell');\n\n // hideIcon\n updateCellRangeIcon(\n col,\n row,\n (icon: Icon) => icon.attribute.visibleTime === 'click_cell',\n (icon: Icon) => {\n icon.setAttribute('opacity', 0);\n },\n scene\n );\n scene.updateNextFrame();\n}\n\nexport function showClickIcon(col: number, row: number, scene: Scenegraph) {\n if (col === -1 || row === -1) {\n return;\n }\n // const cellGroup = scene.getCell(col, row);\n // showIcon(scene, cellGroup, 'click_cell');\n\n // showIcon\n updateCellRangeIcon(\n col,\n row,\n (icon: Icon) => icon.attribute.visibleTime === 'click_cell',\n (icon: Icon) => {\n icon.setAttribute('opacity', 1);\n },\n scene\n );\n scene.updateNextFrame();\n}\n\n/**\n * @description: 获取指定单元格指定位置的icon mark\n * @param {number} col\n * @param {number} row\n * @param {number} x\n * @param {number} y\n * @return {*}\n */\nexport function getIconByXY(col: number, row: number, x: number, y: number, scene: Scenegraph): Icon | undefined {\n const cellGroup = scene.getCell(col, row);\n let pickMark;\n cellGroup.forEachChildren((mark: Icon) => {\n if (mark.role && mark.role.startsWith('icon') && mark.containsPoint(x, y, IContainPointMode.GLOBAL)) {\n pickMark = mark;\n }\n });\n return pickMark;\n}\n\n/**\n * @description: 将指定icon mark设置为Hover样式\n * @param {Icon} icon\n * @param {number} col\n * @param {number} row\n * @return {*}\n */\nexport function setIconHoverStyle(baseIcon: Icon, col: number, row: number, cellGroup: Group, scene: Scenegraph) {\n if (baseIcon.attribute.backgroundColor || baseIcon.attribute.hoverImage) {\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) => icon.name === baseIcon.name,\n (icon: Icon) => {\n // hover展示背景\n if (icon.attribute.backgroundColor) {\n let iconBack = icon.parent.getChildByName('icon-back') as IRect;\n if (iconBack) {\n iconBack.setAttributes({\n x:\n (icon.attribute.x ?? 0) +\n (icon.attribute.dx ?? 0) +\n (icon.AABBBounds.width() - icon.backgroundWidth) / 2,\n y: (icon.attribute.y ?? 0) + (icon.AABBBounds.height() - icon.backgroundHeight) / 2,\n dx: icon.attribute.dx ?? 0,\n dy: icon.attribute.dy ?? 0,\n width: icon.backgroundWidth,\n height: icon.backgroundHeight,\n fill: icon.attribute.backgroundColor,\n cornerRadius: 5,\n visible: true\n });\n } else {\n iconBack = createRect({\n x:\n (icon.attribute.x ?? 0) +\n (icon.attribute.dx ?? 0) +\n (icon.AABBBounds.width() - icon.backgroundWidth) / 2,\n y: (icon.attribute.y ?? 0) + (icon.AABBBounds.height() - icon.backgroundHeight) / 2,\n dx: icon.attribute.dx ?? 0,\n dy: icon.attribute.dy ?? 0,\n width: icon.backgroundWidth,\n height: icon.backgroundHeight,\n fill: icon.attribute.backgroundColor,\n cornerRadius: 5,\n pickable: false,\n visible: true\n }) as IRect;\n iconBack.name = 'icon-back';\n // cellGroup.appendChild(iconBack);\n }\n icon.parent.insertBefore(iconBack, icon);\n }\n\n // hover更换图片\n if (icon.attribute.hoverImage && icon.attribute.image !== icon.attribute.hoverImage) {\n icon.image = icon.attribute.hoverImage;\n }\n },\n scene\n );\n }\n // hover展示tooltip\n if (baseIcon.tooltip) {\n const { x1: left, x2: right, y1: top, y2: bottom } = baseIcon.globalAABBBounds;\n const tooltipOptions: TooltipOptions = {\n content: baseIcon.tooltip.title,\n referencePosition: {\n rect: {\n left: left,\n right: right,\n top: top,\n bottom: bottom,\n width: baseIcon.globalAABBBounds.width(),\n height: baseIcon.globalAABBBounds.height()\n },\n placement: baseIcon.tooltip.placement\n },\n style: Object.assign({}, scene.table.internalProps.theme?.tooltipStyle, baseIcon.tooltip?.style)\n };\n if (!scene.table.internalProps.tooltipHandler.isBinded(tooltipOptions)) {\n scene.table.showTooltip(col, row, tooltipOptions);\n }\n }\n}\n\n/**\n * @description: 将指定icon mark设置为Normal样式\n * @param {Icon} icon\n * @param {number} col\n * @param {number} row\n * @return {*}\n */\nexport function setIconNormalStyle(baseIcon: Icon, col: number, row: number, scene: Scenegraph) {\n if (baseIcon.attribute.backgroundColor || baseIcon.attribute.hoverImage) {\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) => icon.name === baseIcon.name,\n (icon: Icon) => {\n const iconBack = icon.parent.getChildByName('icon-back') as IRect;\n if (iconBack) {\n iconBack.setAttribute('visible', false);\n }\n\n // hover更换图片\n if (icon.attribute.hoverImage && icon.attribute.image !== icon.attribute.originImage) {\n icon.image = icon.attribute.originImage;\n }\n },\n scene\n );\n }\n}\n\nexport function updateIcon(baseIcon: Icon, iconConfig: ColumnIconOption, col: number, row: number, scene: Scenegraph) {\n // 直接更新mark attribute\n // dealWithIcon(iconConfig, icon);\n // icon.name = iconConfig.name;\n // scene.updateNextFrame();\n\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) => icon.name === baseIcon.name,\n // dealer\n (icon: Icon) => {\n dealWithIcon(iconConfig, icon);\n icon.name = iconConfig.name;\n },\n scene\n );\n\n scene.updateNextFrame();\n}\n\nfunction resetSortIcon(oldSortCol: number, oldSortRow: number, iconConfig: ColumnIconOption, scene: Scenegraph) {\n const oldSortCell = scene.getCell(oldSortCol, oldSortRow);\n if (\n isValid(oldSortCell.mergeStartCol) &&\n isValid(oldSortCell.mergeStartRow) &&\n isValid(oldSortCell.mergeEndCol) &&\n isValid(oldSortCell.mergeEndRow)\n ) {\n for (let col = oldSortCell.mergeStartCol; col <= oldSortCell.mergeEndCol; col++) {\n for (let row = oldSortCell.mergeStartRow; row <= oldSortCell.mergeEndRow; row++) {\n let oldIconMark: Icon;\n scene.getCell(col, row).forEachChildren((mark: Icon) => {\n if (mark.attribute.funcType === 'sort') {\n oldIconMark = mark;\n return true;\n }\n return false;\n });\n if (oldIconMark) {\n dealWithIcon(iconConfig, oldIconMark);\n oldIconMark.name = iconConfig.name;\n }\n }\n }\n } else {\n let oldIconMark: Icon;\n oldSortCell.forEachChildren((mark: Icon) => {\n if (mark.attribute.funcType === 'sort') {\n oldIconMark = mark;\n return true;\n }\n return false;\n });\n if (oldIconMark) {\n // updateIcon(oldIconMark, oldIcon);\n dealWithIcon(iconConfig, oldIconMark);\n oldIconMark.name = iconConfig.name;\n }\n }\n}\n\nfunction checkSameCell(col1: number, row1: number, col2: number, row2: number, table: BaseTableAPI) {\n const range1 = table.getCellRange(col1, row1);\n const range2 = table.getCellRange(col2, row2);\n if (\n range1.start.col === range2.start.col &&\n range1.start.row === range2.start.row &&\n range1.end.col === range2.end.col &&\n range1.end.row === range2.end.row\n ) {\n return true;\n }\n return false;\n}\n\nexport function updateSortIcon(\n col: number,\n row: number,\n iconMark: Icon,\n order: SortOrder,\n oldSortCol: number,\n oldSortRow: number,\n oldIconMark: Icon | undefined,\n scene: Scenegraph\n) {\n // 更新icon\n const icon = scene.table.internalProps.headerHelper.getSortIcon(order, scene.table, col, row);\n if (iconMark) {\n updateIcon(iconMark, icon, col, row, scene);\n }\n\n // 更新旧frozen icon\n if (!checkSameCell(col, row, oldSortCol, oldSortRow, scene.table)) {\n const oldIcon = scene.table.internalProps.headerHelper.getSortIcon('normal', scene.table, oldSortCol, oldSortRow);\n if (oldIconMark) {\n updateIcon(oldIconMark, oldIcon, oldSortCol, oldSortRow, scene);\n } else {\n resetSortIcon(oldSortCol, oldSortRow, oldIcon, scene);\n }\n }\n}\n\nexport function updateFrozenIcon(scene: Scenegraph) {\n // 依据新旧冻结列确定更新范围\n for (let col = 0; col < scene.table.colCount; col++) {\n for (let row = 0; row < scene.table.columnHeaderLevelCount; row++) {\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) => icon.attribute.funcType === 'frozen',\n // dealer\n (icon: Icon) => {\n const iconConfig = scene.table.internalProps.headerHelper.getFrozenIcon(col, row);\n dealWithIcon(iconConfig, icon);\n icon.name = iconConfig.name;\n },\n scene\n );\n }\n }\n}\n\nexport function updateHierarchyIcon(col: number, row: number, scene: Scenegraph) {\n let iconConfig: SvgIcon;\n if (scene.table.isHeader(col, row)) {\n iconConfig = scene.table.internalProps.headerHelper.getHierarchyIcon(col, row);\n } else {\n iconConfig = scene.table.internalProps.bodyHelper.getHierarchyIcon(col, row);\n }\n\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) =>\n icon.attribute.funcType === IconFuncTypeEnum.collapse || icon.attribute.funcType === IconFuncTypeEnum.expand,\n // dealer\n (icon: Icon) => {\n dealWithIcon(iconConfig, icon);\n icon.name = iconConfig.name;\n },\n scene\n );\n}\n\nexport function updateCellGroupIcon(cellGroup: Group, filter: (icon: Icon) => boolean, dealer: (icon: Icon) => void) {\n cellGroup.forEachChildren((child: any) => {\n if (child.type === 'group') {\n updateCellGroupIcon(child, filter, dealer);\n } else if (filter(child)) {\n dealer(child);\n }\n });\n}\n\nexport function updateCellRangeIcon(\n col: number,\n row: number,\n filter: (icon: Icon) => boolean,\n dealer: (icon: Icon) => void,\n scene: Scenegraph\n) {\n const cellGroup = scene.getCell(col, row);\n if (\n isValid(cellGroup.mergeStartCol) &&\n isValid(cellGroup.mergeStartRow) &&\n isValid(cellGroup.mergeEndCol) &&\n isValid(cellGroup.mergeEndRow)\n ) {\n for (let col = cellGroup.mergeStartCol; col <= cellGroup.mergeEndCol; col++) {\n for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {\n updateCellGroupIcon(scene.getCell(col, row), filter, dealer);\n }\n }\n } else {\n updateCellGroupIcon(cellGroup, filter, dealer);\n }\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { BaseTableAPI } from '../../ts-types/base-table';
|
|
2
2
|
export declare function computeColsWidth(table: BaseTableAPI, colStart?: number, colEnd?: number, update?: boolean): void;
|
|
3
|
-
export declare function computeColWidth(col: number, startRow: number, endRow: number, table: BaseTableAPI, forceCompute
|
|
3
|
+
export declare function computeColWidth(col: number, startRow: number, endRow: number, table: BaseTableAPI, forceCompute?: boolean): number;
|