@visactor/vtable 0.9.3-alpha.0 → 0.9.3-alpha.2
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/README.md +15 -15
- package/cjs/PivotChart.js +20 -10
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/core/BaseTable.js +1 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/dataset/dataset.d.ts +1 -0
- package/cjs/dataset/dataset.js +11 -3
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/dataset/statistics-helper.d.ts +1 -2
- package/cjs/dataset/statistics-helper.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/chart-helper/get-axis-config.js +18 -8
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/chart-helper/get-chart-spec.js +8 -2
- package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/cjs/layout/pivot-layout.d.ts +1 -0
- package/cjs/layout/pivot-layout.js +12 -5
- package/cjs/layout/pivot-layout.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js +2 -2
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.d.ts +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +18 -22
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.d.ts +1 -0
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +60 -26
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.d.ts +1 -0
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +90 -36
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +2 -1
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +3 -2
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/state/hover/is-cell-hover.js +4 -3
- package/cjs/state/hover/is-cell-hover.js.map +1 -1
- package/cjs/ts-types/new-data-set.d.ts +3 -3
- package/cjs/ts-types/new-data-set.js.map +1 -1
- package/dist/vtable.js +392 -141
- package/dist/vtable.min.js +3 -3
- package/es/PivotChart.js +20 -10
- package/es/PivotChart.js.map +1 -1
- package/es/core/BaseTable.js +1 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/dataset/dataset.d.ts +1 -0
- package/es/dataset/dataset.js +11 -3
- package/es/dataset/dataset.js.map +1 -1
- package/es/dataset/statistics-helper.d.ts +1 -2
- package/es/dataset/statistics-helper.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/chart-helper/get-axis-config.js +19 -9
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/chart-helper/get-chart-spec.js +9 -3
- package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/es/layout/pivot-layout.d.ts +1 -0
- package/es/layout/pivot-layout.js +12 -5
- package/es/layout/pivot-layout.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js +2 -2
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +1 -1
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.d.ts +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +17 -23
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.d.ts +1 -0
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +59 -23
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.d.ts +1 -0
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +90 -33
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +2 -1
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/scenegraph.js +3 -2
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.js +1 -1
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/state/hover/is-cell-hover.js +4 -3
- package/es/state/hover/is-cell-hover.js.map +1 -1
- package/es/ts-types/new-data-set.d.ts +3 -3
- package/es/ts-types/new-data-set.js.map +1 -1
- package/package.json +3 -3
|
@@ -28,9 +28,9 @@ var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, gener
|
|
|
28
28
|
|
|
29
29
|
Object.defineProperty(exports, "__esModule", {
|
|
30
30
|
value: !0
|
|
31
|
-
}), exports.dynamicSetY = void 0;
|
|
31
|
+
}), exports.updateRowContent = exports.dynamicSetY = void 0;
|
|
32
32
|
|
|
33
|
-
const compute_row_height_1 = require("../../../layout/compute-row-height"), update_auto_row_1 = require("./update-auto-row");
|
|
33
|
+
const compute_row_height_1 = require("../../../layout/compute-row-height"), get_cell_merge_1 = require("../../../utils/get-cell-merge"), cell_helper_1 = require("../../cell-helper"), update_auto_row_1 = require("./update-auto-row");
|
|
34
34
|
|
|
35
35
|
function dynamicSetY(y, proxy) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, (function*() {
|
|
@@ -48,28 +48,14 @@ function moveCell(count, direction, screenTopRow, proxy) {
|
|
|
48
48
|
return __awaiter(this, void 0, void 0, (function*() {
|
|
49
49
|
if ("up" === direction && proxy.rowEnd + count > proxy.bodyBottomRow ? count = proxy.bodyBottomRow - proxy.rowEnd : "down" === direction && proxy.rowStart - count < proxy.bodyTopRow && (count = proxy.rowStart - proxy.bodyTopRow),
|
|
50
50
|
count < proxy.rowEnd - proxy.rowStart) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const cellGroup = colGroup.firstChild;
|
|
56
|
-
proxy.updateCellGroupPosition(cellGroup, colGroup.lastChild.row + 1, colGroup.lastChild.attribute.y + colGroup.lastChild.attribute.height),
|
|
57
|
-
colGroup.appendChild(cellGroup);
|
|
58
|
-
} else {
|
|
59
|
-
const cellGroup = colGroup.lastChild;
|
|
60
|
-
proxy.updateCellGroupPosition(cellGroup, colGroup.firstChild.row - 1, colGroup.firstChild.attribute.y - cellGroup.attribute.height),
|
|
61
|
-
colGroup.insertBefore(cellGroup, colGroup.firstChild);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
const distStartRow = "up" === direction ? proxy.rowEnd + 1 : proxy.rowStart - count, distEndRow = "up" === direction ? proxy.rowEnd + count : proxy.rowStart - 1, syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount), syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount);
|
|
65
|
-
"autoHeight" === proxy.table.heightMode && (0, compute_row_height_1.computeRowsHeight)(proxy.table, syncTopRow, syncBottomRow);
|
|
66
|
-
for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) for (let row = syncTopRow; row <= syncBottomRow; row++) {
|
|
67
|
-
const cellGroup = proxy.highPerformanceGetCell(col, row, distStartRow, distEndRow);
|
|
68
|
-
proxy.updateCellGroupContent(cellGroup);
|
|
69
|
-
}
|
|
70
|
-
"autoHeight" === proxy.table.heightMode && (0, update_auto_row_1.updateAutoRow)(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, direction),
|
|
51
|
+
updatePartRowPosition("up" === direction ? proxy.rowStart : proxy.rowEnd - count + 1, "up" === direction ? proxy.rowStart + count - 1 : proxy.rowEnd, direction, proxy);
|
|
52
|
+
const distStartRow = "up" === direction ? proxy.rowEnd + 1 : proxy.rowStart - count, syncTopRow = ("up" === direction ? proxy.rowEnd : proxy.rowStart,
|
|
53
|
+
Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount)), syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount);
|
|
54
|
+
"autoHeight" === proxy.table.heightMode && (0, compute_row_height_1.computeRowsHeight)(proxy.table, syncTopRow, syncBottomRow),
|
|
71
55
|
proxy.rowStart = "up" === direction ? proxy.rowStart + count : proxy.rowStart - count,
|
|
72
56
|
proxy.rowEnd = "up" === direction ? proxy.rowEnd + count : proxy.rowEnd - count,
|
|
57
|
+
checkFirstRowMerge(distStartRow, proxy), updateRowContent(syncTopRow, syncBottomRow, proxy),
|
|
58
|
+
"autoHeight" === proxy.table.heightMode && (0, update_auto_row_1.updateAutoRow)(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, direction),
|
|
73
59
|
proxy.currentRow = "up" === direction ? proxy.currentRow + count : proxy.currentRow - count,
|
|
74
60
|
proxy.totalRow = "up" === direction ? proxy.totalRow + count : proxy.totalRow - count,
|
|
75
61
|
proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2),
|
|
@@ -77,24 +63,15 @@ function moveCell(count, direction, screenTopRow, proxy) {
|
|
|
77
63
|
console.log("move end cell", proxy.table.scenegraph.bodyGroup.firstChild.firstChild.row, proxy.table.scenegraph.bodyGroup.firstChild.lastChild.row),
|
|
78
64
|
proxy.table.scenegraph.updateNextFrame(), yield proxy.progress();
|
|
79
65
|
} else {
|
|
80
|
-
const distStartRow = "up" === direction ? proxy.rowStart + count : proxy.rowStart - count, distEndRow = "up" === direction ? proxy.rowEnd + count : proxy.rowEnd - count
|
|
81
|
-
for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {
|
|
82
|
-
const colGroup = proxy.table.scenegraph.getColGroup(col);
|
|
83
|
-
null == colGroup || colGroup.forEachChildren(((cellGroup, index) => {
|
|
84
|
-
proxy.updateCellGroupPosition(cellGroup, "up" === direction ? cellGroup.row + count : cellGroup.row - count, 0 === index ? distStartRowY : cellGroup._prev.attribute.y + cellGroup._prev.attribute.height);
|
|
85
|
-
}));
|
|
86
|
-
}
|
|
66
|
+
const distStartRow = "up" === direction ? proxy.rowStart + count : proxy.rowStart - count, distEndRow = "up" === direction ? proxy.rowEnd + count : proxy.rowEnd - count;
|
|
87
67
|
let syncTopRow, syncBottomRow;
|
|
68
|
+
updateAllRowPosition(proxy.table.getRowsHeight(proxy.bodyTopRow, distStartRow - 1), count, direction, proxy),
|
|
88
69
|
"autoHeight" === proxy.table.heightMode ? (syncTopRow = distStartRow, syncBottomRow = distEndRow) : (syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount),
|
|
89
70
|
syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount)),
|
|
90
71
|
console.log("更新同步范围", syncTopRow, syncBottomRow), "autoHeight" === proxy.table.heightMode && (0,
|
|
91
72
|
compute_row_height_1.computeRowsHeight)(proxy.table, syncTopRow, syncBottomRow),
|
|
92
|
-
proxy.rowStart = distStartRow, proxy.rowEnd = distEndRow
|
|
93
|
-
|
|
94
|
-
const cellGroup = proxy.highPerformanceGetCell(col, row, distStartRow, distEndRow);
|
|
95
|
-
proxy.updateCellGroupContent(cellGroup);
|
|
96
|
-
}
|
|
97
|
-
console.log("updateAutoRow", distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up"),
|
|
73
|
+
proxy.rowStart = distStartRow, proxy.rowEnd = distEndRow, checkFirstRowMerge(distStartRow, proxy),
|
|
74
|
+
updateRowContent(syncTopRow, syncBottomRow, proxy), console.log("updateAutoRow", distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up"),
|
|
98
75
|
"autoHeight" === proxy.table.heightMode && (0, update_auto_row_1.updateAutoRow)(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up"),
|
|
99
76
|
proxy.currentRow = "up" === direction ? proxy.currentRow + count : proxy.currentRow - count,
|
|
100
77
|
proxy.totalRow = "up" === direction ? proxy.totalRow + count : proxy.totalRow - count,
|
|
@@ -106,5 +83,82 @@ function moveCell(count, direction, screenTopRow, proxy) {
|
|
|
106
83
|
}));
|
|
107
84
|
}
|
|
108
85
|
|
|
109
|
-
|
|
86
|
+
function updatePartRowPosition(startRow, endRow, direction, proxy) {
|
|
87
|
+
for (let col = 0; col < proxy.table.rowHeaderLevelCount; col++) {
|
|
88
|
+
const colGroup = proxy.table.scenegraph.getColGroup(col);
|
|
89
|
+
for (let row = startRow; row <= endRow; row++) updateCellGroupPosition(colGroup, direction, proxy);
|
|
90
|
+
}
|
|
91
|
+
for (let col = proxy.table.colCount - proxy.table.rightFrozenColCount; col < proxy.table.colCount; col++) {
|
|
92
|
+
const colGroup = proxy.table.scenegraph.getColGroup(col);
|
|
93
|
+
for (let row = startRow; row <= endRow; row++) updateCellGroupPosition(colGroup, direction, proxy);
|
|
94
|
+
}
|
|
95
|
+
for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {
|
|
96
|
+
const colGroup = proxy.table.scenegraph.getColGroup(col);
|
|
97
|
+
for (let row = startRow; row <= endRow; row++) updateCellGroupPosition(colGroup, direction, proxy);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function updateCellGroupPosition(colGroup, direction, proxy) {
|
|
102
|
+
if ("up" === direction) {
|
|
103
|
+
const cellGroup = colGroup.firstChild;
|
|
104
|
+
proxy.updateCellGroupPosition(cellGroup, colGroup.lastChild.row + 1, colGroup.lastChild.attribute.y + colGroup.lastChild.attribute.height),
|
|
105
|
+
colGroup.appendChild(cellGroup);
|
|
106
|
+
} else {
|
|
107
|
+
const cellGroup = colGroup.lastChild;
|
|
108
|
+
proxy.updateCellGroupPosition(cellGroup, colGroup.firstChild.row - 1, colGroup.firstChild.attribute.y - cellGroup.attribute.height),
|
|
109
|
+
colGroup.insertBefore(cellGroup, colGroup.firstChild);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function updateAllRowPosition(distStartRowY, count, direction, proxy) {
|
|
114
|
+
for (let col = 0; col < proxy.table.rowHeaderLevelCount; col++) {
|
|
115
|
+
const colGroup = proxy.table.scenegraph.getColGroup(col);
|
|
116
|
+
null == colGroup || colGroup.forEachChildren(((cellGroup, index) => {
|
|
117
|
+
proxy.updateCellGroupPosition(cellGroup, "up" === direction ? cellGroup.row + count : cellGroup.row - count, 0 === index ? distStartRowY : cellGroup._prev.attribute.y + proxy.table.getRowHeight(cellGroup._prev.row));
|
|
118
|
+
}));
|
|
119
|
+
}
|
|
120
|
+
for (let col = proxy.table.colCount - proxy.table.rightFrozenColCount; col < proxy.table.colCount; col++) {
|
|
121
|
+
const colGroup = proxy.table.scenegraph.getColGroup(col);
|
|
122
|
+
null == colGroup || colGroup.forEachChildren(((cellGroup, index) => {
|
|
123
|
+
proxy.updateCellGroupPosition(cellGroup, "up" === direction ? cellGroup.row + count : cellGroup.row - count, 0 === index ? distStartRowY : cellGroup._prev.attribute.y + proxy.table.getRowHeight(cellGroup._prev.row));
|
|
124
|
+
}));
|
|
125
|
+
}
|
|
126
|
+
for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {
|
|
127
|
+
const colGroup = proxy.table.scenegraph.getColGroup(col);
|
|
128
|
+
null == colGroup || colGroup.forEachChildren(((cellGroup, index) => {
|
|
129
|
+
proxy.updateCellGroupPosition(cellGroup, "up" === direction ? cellGroup.row + count : cellGroup.row - count, 0 === index ? distStartRowY : cellGroup._prev.attribute.y + proxy.table.getRowHeight(cellGroup._prev.row));
|
|
130
|
+
}));
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function updateRowContent(syncTopRow, syncBottomRow, proxy) {
|
|
135
|
+
for (let col = 0; col < proxy.table.rowHeaderLevelCount; col++) for (let row = syncTopRow; row <= syncBottomRow; row++) {
|
|
136
|
+
const cellGroup = proxy.highPerformanceGetCell(col, row, !0);
|
|
137
|
+
proxy.updateCellGroupContent(cellGroup);
|
|
138
|
+
}
|
|
139
|
+
for (let col = proxy.table.colCount - proxy.table.rightFrozenColCount; col < proxy.table.colCount; col++) for (let row = syncTopRow; row <= syncBottomRow; row++) {
|
|
140
|
+
const cellGroup = proxy.highPerformanceGetCell(col, row);
|
|
141
|
+
proxy.updateCellGroupContent(cellGroup);
|
|
142
|
+
}
|
|
143
|
+
for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) for (let row = syncTopRow; row <= syncBottomRow; row++) {
|
|
144
|
+
const cellGroup = proxy.highPerformanceGetCell(col, row);
|
|
145
|
+
proxy.updateCellGroupContent(cellGroup);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function checkFirstRowMerge(row, proxy) {
|
|
150
|
+
for (let col = 0; col < proxy.table.colCount; col++) {
|
|
151
|
+
if (col >= proxy.table.rowHeaderLevelCount && col < proxy.colStart || col > proxy.colEnd && col < proxy.table.colCount - proxy.table.rightFrozenColCount) continue;
|
|
152
|
+
const range = (0, get_cell_merge_1.getCellMergeInfo)(proxy.table, col, row);
|
|
153
|
+
if (range && range.start.row !== row) {
|
|
154
|
+
const oldCellGroup = proxy.highPerformanceGetCell(col, row, !0), newCellGroup = (0,
|
|
155
|
+
cell_helper_1.updateCell)(range.start.col, range.start.row, proxy.table, !0);
|
|
156
|
+
newCellGroup.col = col, newCellGroup.row = row, newCellGroup.setAttribute("y", proxy.table.getRowsHeight(proxy.table.columnHeaderLevelCount, range.start.row - 1)),
|
|
157
|
+
oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup), oldCellGroup.parent.removeChild(oldCellGroup),
|
|
158
|
+
oldCellGroup.needUpdate = !1, newCellGroup.needUpdate = !1, proxy.cellCache.get(col) && proxy.cellCache.set(col, newCellGroup);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
exports.dynamicSetY = dynamicSetY, exports.updateRowContent = updateRowContent;
|
|
110
164
|
//# sourceMappingURL=dynamic-set-y.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["scenegraph/group-creater/progress/update-position/dynamic-set-y.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,2EAAuE;AAEvE,uDAAkD;AAElD,SAAsB,WAAW,CAAC,CAAS,EAAE,KAAiB;;QAG5D,MAAM,SAAS,GAAI,KAAK,CAAC,KAAa,CAAC,cAAc,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAClH,IAAI,CAAC,SAAS,EAAE;YACd,OAAO;SACR;QACD,MAAM,YAAY,GAAG,SAAS,CAAC,GAAG,CAAC;QACnC,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC;QAClC,MAAM,QAAQ,GAAG,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QACnD,IAAI,QAAQ,GAAG,CAAC,EAAE;YAEhB,QAAQ,CAAC,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;YAC9C,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;SAQrB;aAAM,IAAI,QAAQ,GAAG,CAAC,EAAE;YAEvB,QAAQ,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;YACjD,KAAK,CAAC,UAAU,CAAC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AAS,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC;YACtF,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;YACtF,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,QAAQ,CAAC;YACpC,KAAK,CAAC,kBAAkB,GAAG,UAAU,GAAG,KAAK,CAAC,aAAa,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;YAClH,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YAClE,OAAO,CAAC,GAAG,CACT,qBAAqB,EACpB,KAAK,CAAC,KAAa,CAAC,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,EAClE,KAAK,CAAC,KAAa,CAAC,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CACnE,CAAC;YAEF,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC;YACzC,IAAI,KAAK,CAAC,KAAK,CAAC,UAAU,KAAK,YAAY,EAAE;gBAC3C,MAAM,KAAK,CAAC,QAAQ,EAAE,CAAC;aACxB;SACF;IACH,CAAC;CAAA","file":"dynamic-set-y.js","sourcesContent":["import type { Group } from '../../../graphic/group';\nimport { computeRowsHeight } from '../../../layout/compute-row-height';\nimport type { SceneProxy } from '../proxy';\nimport { updateAutoRow } from './update-auto-row';\n\nexport async function dynamicSetY(y: number, proxy: SceneProxy) {\n // 计算变动row range\n // const screenTopRow = proxy.table.getRowAt(y).row;\n const screenTop = (proxy.table as any).getTargetRowAt(y + proxy.table.scenegraph.colHeaderGroup.attribute.height);\n if (!screenTop) {\n return;\n }\n const screenTopRow = screenTop.row;\n proxy.screenTopRow = screenTopRow;\n const deltaRow = screenTopRow - proxy.referenceRow;\n if (deltaRow > 0) {\n // 向下滚动,顶部cell group移到底部\n moveCell(deltaRow, 'up', screenTopRow, proxy);\n proxy.updateBody(y);\n // if (proxy.rowEnd === proxy.table.scenegraph.proxy.bodyBottomRow) {\n // const totalHeight = proxy.table.getAllRowsHeight();\n // const top = totalHeight - proxy.table.scenegraph.height;\n // proxy.updateBody(top);\n // } else {\n // proxy.updateBody(y);\n // }\n } else if (deltaRow < 0) {\n // 向上滚动,底部cell group移到顶部\n moveCell(-deltaRow, 'down', screenTopRow, proxy);\n proxy.updateBody(y);\n // if (proxy.rowStart === proxy.bodyTopRow) {\n // proxy.updateBody(0);\n // } else {\n // proxy.updateBody(y);\n // }\n } else {\n // 不改变row,更新body group范围\n proxy.updateBody(y);\n }\n\n proxy.table.scenegraph.updateNextFrame();\n}\n\nasync function moveCell(count: number, direction: 'up' | 'down', screenTopRow: number, proxy: SceneProxy) {\n // 限制count范围\n if (direction === 'up' && proxy.rowEnd + count > proxy.bodyBottomRow) {\n count = proxy.bodyBottomRow - proxy.rowEnd;\n } else if (direction === 'down' && proxy.rowStart - count < proxy.bodyTopRow) {\n count = proxy.rowStart - proxy.bodyTopRow;\n }\n\n // 两种更新模式\n // 1. count < rowEnd - rowStart:从顶/底部移动count数量的单元格到底/顶部\n // 2. count >= rowEnd - rowStart:整体移动到目标位置\n if (count < proxy.rowEnd - proxy.rowStart) {\n // 计算更新区域\n const startRow = direction === 'up' ? proxy.rowStart : proxy.rowEnd - count + 1;\n const endRow = direction === 'up' ? proxy.rowStart + count - 1 : proxy.rowEnd;\n // console.log('move', startRow, endRow, direction);\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n const colGroup = proxy.table.scenegraph.getColGroup(col);\n for (let row = startRow; row <= endRow; row++) {\n if (direction === 'up') {\n const cellGroup = colGroup.firstChild as Group;\n proxy.updateCellGroupPosition(\n cellGroup,\n (colGroup.lastChild as Group).row + 1,\n (colGroup.lastChild as Group).attribute.y + (colGroup.lastChild as Group).attribute.height\n );\n colGroup.appendChild(cellGroup);\n } else {\n const cellGroup = colGroup.lastChild as Group;\n proxy.updateCellGroupPosition(\n cellGroup,\n (colGroup.firstChild as Group).row - 1,\n (colGroup.firstChild as Group).attribute.y - cellGroup.attribute.height\n );\n colGroup.insertBefore(cellGroup, colGroup.firstChild);\n }\n }\n }\n const distStartRow = direction === 'up' ? proxy.rowEnd + 1 : proxy.rowStart - count;\n const distEndRow = direction === 'up' ? proxy.rowEnd + count : proxy.rowStart - 1;\n\n // 更新同步范围\n const syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);\n const syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2);\n if (proxy.table.heightMode === 'autoHeight') {\n computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);\n }\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n for (let row = syncTopRow; row <= syncBottomRow; row++) {\n // const cellGroup = proxy.table.scenegraph.getCell(col, row);\n const cellGroup = proxy.highPerformanceGetCell(col, row, distStartRow, distEndRow);\n proxy.updateCellGroupContent(cellGroup);\n }\n }\n if (proxy.table.heightMode === 'autoHeight') {\n updateAutoRow(\n proxy.bodyLeftCol, // colStart\n proxy.bodyRightCol, // colEnd\n syncTopRow, // rowStart\n syncBottomRow, // rowEnd\n proxy.table,\n direction\n );\n }\n\n proxy.rowStart = direction === 'up' ? proxy.rowStart + count : proxy.rowStart - count;\n proxy.rowEnd = direction === 'up' ? proxy.rowEnd + count : proxy.rowEnd - count;\n proxy.currentRow = direction === 'up' ? proxy.currentRow + count : proxy.currentRow - count;\n proxy.totalRow = direction === 'up' ? proxy.totalRow + count : proxy.totalRow - count;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n proxy.rowUpdatePos = distStartRow;\n proxy.rowUpdateDirection = direction;\n console.log('move end proxy', proxy.rowStart, proxy.rowEnd);\n console.log(\n 'move end cell',\n (proxy.table as any).scenegraph.bodyGroup.firstChild.firstChild.row,\n (proxy.table as any).scenegraph.bodyGroup.firstChild.lastChild.row\n );\n\n proxy.table.scenegraph.updateNextFrame();\n await proxy.progress();\n } else {\n const distStartRow = direction === 'up' ? proxy.rowStart + count : proxy.rowStart - count;\n const distEndRow = direction === 'up' ? proxy.rowEnd + count : proxy.rowEnd - count;\n const distStartRowY = proxy.table.getRowsHeight(proxy.bodyTopRow, distStartRow - 1);\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n const colGroup = proxy.table.scenegraph.getColGroup(col);\n colGroup?.forEachChildren((cellGroup: Group, index) => {\n // 这里使用colGroup变量而不是for proxy.rowStart to proxy.rowEndproxy.rowEnd是因为在更新内可能出现row号码重复的情况\n proxy.updateCellGroupPosition(\n cellGroup,\n direction === 'up' ? cellGroup.row + count : cellGroup.row - count,\n index === 0 // row === proxy.rowStart\n ? distStartRowY\n : (cellGroup._prev as Group).attribute.y + (cellGroup._prev as Group).attribute.height\n );\n });\n }\n\n // 更新同步范围\n let syncTopRow;\n let syncBottomRow;\n if (proxy.table.heightMode === 'autoHeight') {\n syncTopRow = distStartRow;\n syncBottomRow = distEndRow;\n } else {\n syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);\n syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2);\n }\n console.log('更新同步范围', syncTopRow, syncBottomRow);\n if (proxy.table.heightMode === 'autoHeight') {\n computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);\n }\n proxy.rowStart = distStartRow;\n proxy.rowEnd = distEndRow;\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n for (let row = syncTopRow; row <= syncBottomRow; row++) {\n // const cellGroup = proxy.table.scenegraph.getCell(col, row);\n const cellGroup = proxy.highPerformanceGetCell(col, row, distStartRow, distEndRow);\n proxy.updateCellGroupContent(cellGroup);\n }\n }\n console.log(\n 'updateAutoRow',\n distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up'\n );\n\n if (proxy.table.heightMode === 'autoHeight') {\n updateAutoRow(\n proxy.bodyLeftCol, // colStart\n proxy.bodyRightCol, // colEnd\n syncTopRow, // rowStart\n syncBottomRow, // rowEnd\n proxy.table,\n distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up' // 跳转到底部时,从下向上对齐\n );\n }\n\n proxy.currentRow = direction === 'up' ? proxy.currentRow + count : proxy.currentRow - count;\n proxy.totalRow = direction === 'up' ? proxy.totalRow + count : proxy.totalRow - count;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n proxy.rowUpdatePos = proxy.rowStart;\n proxy.rowUpdateDirection = distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up';\n console.log('move total end proxy', proxy.rowStart, proxy.rowEnd);\n console.log(\n 'move total end cell',\n (proxy.table as any).scenegraph.bodyGroup.firstChild.firstChild.row,\n (proxy.table as any).scenegraph.bodyGroup.firstChild.lastChild.row\n );\n\n proxy.table.scenegraph.updateNextFrame();\n if (proxy.table.heightMode !== 'autoHeight') {\n await proxy.progress();\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["scenegraph/group-creater/progress/update-position/dynamic-set-y.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,2EAAuE;AACvE,kEAAiE;AACjE,mDAA+C;AAE/C,uDAAkD;AAElD,SAAsB,WAAW,CAAC,CAAS,EAAE,KAAiB;;QAG5D,MAAM,SAAS,GAAI,KAAK,CAAC,KAAa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AC,YAAY,EAAE,YAAY,CAAC,CAAC;YAC5D,YAAY,CAAC,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;YAE9C,YAAY,CAAC,UAAU,GAAG,KAAK,CAAC;YAChC,YAAY,CAAC,UAAU,GAAG,KAAK,CAAC;YAGhC,IAAI,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;gBAC5B,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;aACxC;SACF;KACF;AACH,CAAC","file":"dynamic-set-y.js","sourcesContent":["import type { Group } from '../../../graphic/group';\nimport { computeRowsHeight } from '../../../layout/compute-row-height';\nimport { getCellMergeInfo } from '../../../utils/get-cell-merge';\nimport { updateCell } from '../../cell-helper';\nimport type { SceneProxy } from '../proxy';\nimport { updateAutoRow } from './update-auto-row';\n\nexport async function dynamicSetY(y: number, proxy: SceneProxy) {\n // 计算变动row range\n // const screenTopRow = proxy.table.getRowAt(y).row;\n const screenTop = (proxy.table as any).getTargetRowAt(y + proxy.table.scenegraph.colHeaderGroup.attribute.height);\n if (!screenTop) {\n return;\n }\n const screenTopRow = screenTop.row;\n proxy.screenTopRow = screenTopRow;\n const deltaRow = screenTopRow - proxy.referenceRow;\n if (deltaRow > 0) {\n // 向下滚动,顶部cell group移到底部\n moveCell(deltaRow, 'up', screenTopRow, proxy);\n proxy.updateBody(y);\n // if (proxy.rowEnd === proxy.table.scenegraph.proxy.bodyBottomRow) {\n // const totalHeight = proxy.table.getAllRowsHeight();\n // const top = totalHeight - proxy.table.scenegraph.height;\n // proxy.updateBody(top);\n // } else {\n // proxy.updateBody(y);\n // }\n } else if (deltaRow < 0) {\n // 向上滚动,底部cell group移到顶部\n moveCell(-deltaRow, 'down', screenTopRow, proxy);\n proxy.updateBody(y);\n // if (proxy.rowStart === proxy.bodyTopRow) {\n // proxy.updateBody(0);\n // } else {\n // proxy.updateBody(y);\n // }\n } else {\n // 不改变row,更新body group范围\n proxy.updateBody(y);\n }\n\n proxy.table.scenegraph.updateNextFrame();\n}\n\nasync function moveCell(count: number, direction: 'up' | 'down', screenTopRow: number, proxy: SceneProxy) {\n // 限制count范围\n if (direction === 'up' && proxy.rowEnd + count > proxy.bodyBottomRow) {\n count = proxy.bodyBottomRow - proxy.rowEnd;\n } else if (direction === 'down' && proxy.rowStart - count < proxy.bodyTopRow) {\n count = proxy.rowStart - proxy.bodyTopRow;\n }\n\n // 两种更新模式\n // 1. count < rowEnd - rowStart:从顶/底部移动count数量的单元格到底/顶部\n // 2. count >= rowEnd - rowStart:整体移动到目标位置\n if (count < proxy.rowEnd - proxy.rowStart) {\n // 计算更新区域\n const startRow = direction === 'up' ? proxy.rowStart : proxy.rowEnd - count + 1;\n const endRow = direction === 'up' ? proxy.rowStart + count - 1 : proxy.rowEnd;\n // console.log('move', startRow, endRow, direction);\n updatePartRowPosition(startRow, endRow, direction, proxy);\n const distStartRow = direction === 'up' ? proxy.rowEnd + 1 : proxy.rowStart - count;\n const distEndRow = direction === 'up' ? proxy.rowEnd + count : proxy.rowStart - 1;\n\n // 更新同步范围\n const syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);\n const syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2);\n if (proxy.table.heightMode === 'autoHeight') {\n computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);\n }\n\n proxy.rowStart = direction === 'up' ? proxy.rowStart + count : proxy.rowStart - count;\n proxy.rowEnd = direction === 'up' ? proxy.rowEnd + count : proxy.rowEnd - count;\n\n checkFirstRowMerge(distStartRow, proxy);\n\n updateRowContent(syncTopRow, syncBottomRow, proxy);\n if (proxy.table.heightMode === 'autoHeight') {\n updateAutoRow(\n proxy.bodyLeftCol, // colStart\n proxy.bodyRightCol, // colEnd\n syncTopRow, // rowStart\n syncBottomRow, // rowEnd\n proxy.table,\n direction\n );\n }\n\n proxy.currentRow = direction === 'up' ? proxy.currentRow + count : proxy.currentRow - count;\n proxy.totalRow = direction === 'up' ? proxy.totalRow + count : proxy.totalRow - count;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n proxy.rowUpdatePos = distStartRow;\n proxy.rowUpdateDirection = direction;\n console.log('move end proxy', proxy.rowStart, proxy.rowEnd);\n console.log(\n 'move end cell',\n (proxy.table as any).scenegraph.bodyGroup.firstChild.firstChild.row,\n (proxy.table as any).scenegraph.bodyGroup.firstChild.lastChild.row\n );\n\n proxy.table.scenegraph.updateNextFrame();\n await proxy.progress();\n } else {\n const distStartRow = direction === 'up' ? proxy.rowStart + count : proxy.rowStart - count;\n const distEndRow = direction === 'up' ? proxy.rowEnd + count : proxy.rowEnd - count;\n const distStartRowY = proxy.table.getRowsHeight(proxy.bodyTopRow, distStartRow - 1);\n // 更新distStartRow位置的merge单元格,避免distStartRow位置不是merge的起始位置造成的空白\n\n // 更新同步范围\n updateAllRowPosition(distStartRowY, count, direction, proxy);\n let syncTopRow;\n let syncBottomRow;\n if (proxy.table.heightMode === 'autoHeight') {\n syncTopRow = distStartRow;\n syncBottomRow = distEndRow;\n } else {\n syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);\n syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2);\n }\n console.log('更新同步范围', syncTopRow, syncBottomRow);\n if (proxy.table.heightMode === 'autoHeight') {\n computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);\n }\n proxy.rowStart = distStartRow;\n proxy.rowEnd = distEndRow;\n\n checkFirstRowMerge(distStartRow, proxy);\n\n updateRowContent(syncTopRow, syncBottomRow, proxy);\n console.log(\n 'updateAutoRow',\n distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up'\n );\n\n if (proxy.table.heightMode === 'autoHeight') {\n updateAutoRow(\n proxy.bodyLeftCol, // colStart\n proxy.bodyRightCol, // colEnd\n syncTopRow, // rowStart\n syncBottomRow, // rowEnd\n proxy.table,\n distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up' // 跳转到底部时,从下向上对齐\n );\n }\n\n proxy.currentRow = direction === 'up' ? proxy.currentRow + count : proxy.currentRow - count;\n proxy.totalRow = direction === 'up' ? proxy.totalRow + count : proxy.totalRow - count;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n proxy.rowUpdatePos = proxy.rowStart;\n proxy.rowUpdateDirection = distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up';\n console.log('move total end proxy', proxy.rowStart, proxy.rowEnd);\n console.log(\n 'move total end cell',\n (proxy.table as any).scenegraph.bodyGroup.firstChild.firstChild.row,\n (proxy.table as any).scenegraph.bodyGroup.firstChild.lastChild.row\n );\n\n proxy.table.scenegraph.updateNextFrame();\n if (proxy.table.heightMode !== 'autoHeight') {\n await proxy.progress();\n }\n }\n}\n\nfunction updatePartRowPosition(startRow: number, endRow: number, direction: 'up' | 'down', proxy: SceneProxy) {\n // row header group\n for (let col = 0; col < proxy.table.rowHeaderLevelCount; col++) {\n const colGroup = proxy.table.scenegraph.getColGroup(col);\n for (let row = startRow; row <= endRow; row++) {\n updateCellGroupPosition(colGroup, direction, proxy);\n }\n }\n // right frozen group\n for (let col = proxy.table.colCount - proxy.table.rightFrozenColCount; col < proxy.table.colCount; col++) {\n const colGroup = proxy.table.scenegraph.getColGroup(col);\n for (let row = startRow; row <= endRow; row++) {\n updateCellGroupPosition(colGroup, direction, proxy);\n }\n }\n // body group\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n const colGroup = proxy.table.scenegraph.getColGroup(col);\n for (let row = startRow; row <= endRow; row++) {\n updateCellGroupPosition(colGroup, direction, proxy);\n }\n }\n}\n\nfunction updateCellGroupPosition(colGroup: Group, direction: 'up' | 'down', proxy: SceneProxy) {\n if (direction === 'up') {\n const cellGroup = colGroup.firstChild as Group;\n proxy.updateCellGroupPosition(\n cellGroup,\n (colGroup.lastChild as Group).row + 1,\n (colGroup.lastChild as Group).attribute.y + (colGroup.lastChild as Group).attribute.height\n );\n colGroup.appendChild(cellGroup);\n } else {\n const cellGroup = colGroup.lastChild as Group;\n proxy.updateCellGroupPosition(\n cellGroup,\n (colGroup.firstChild as Group).row - 1,\n (colGroup.firstChild as Group).attribute.y - cellGroup.attribute.height\n );\n colGroup.insertBefore(cellGroup, colGroup.firstChild);\n }\n}\n\nfunction updateAllRowPosition(distStartRowY: number, count: number, direction: 'up' | 'down', proxy: SceneProxy) {\n // row header group\n for (let col = 0; col < proxy.table.rowHeaderLevelCount; col++) {\n const colGroup = proxy.table.scenegraph.getColGroup(col);\n colGroup?.forEachChildren((cellGroup: Group, index) => {\n // 这里使用colGroup变量而不是for proxy.rowStart to proxy.rowEndproxy.rowEnd是因为在更新内可能出现row号码重复的情况\n proxy.updateCellGroupPosition(\n cellGroup,\n direction === 'up' ? cellGroup.row + count : cellGroup.row - count,\n index === 0 // row === proxy.rowStart\n ? distStartRowY\n : (cellGroup._prev as Group).attribute.y + proxy.table.getRowHeight((cellGroup._prev as Group).row)\n );\n });\n }\n // right frozen group\n for (let col = proxy.table.colCount - proxy.table.rightFrozenColCount; col < proxy.table.colCount; col++) {\n const colGroup = proxy.table.scenegraph.getColGroup(col);\n colGroup?.forEachChildren((cellGroup: Group, index) => {\n // 这里使用colGroup变量而不是for proxy.rowStart to proxy.rowEndproxy.rowEnd是因为在更新内可能出现row号码重复的情况\n proxy.updateCellGroupPosition(\n cellGroup,\n direction === 'up' ? cellGroup.row + count : cellGroup.row - count,\n index === 0 // row === proxy.rowStart\n ? distStartRowY\n : (cellGroup._prev as Group).attribute.y + proxy.table.getRowHeight((cellGroup._prev as Group).row)\n );\n });\n }\n // body group\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n const colGroup = proxy.table.scenegraph.getColGroup(col);\n colGroup?.forEachChildren((cellGroup: Group, index) => {\n // 这里使用colGroup变量而不是for proxy.rowStart to proxy.rowEndproxy.rowEnd是因为在更新内可能出现row号码重复的情况\n proxy.updateCellGroupPosition(\n cellGroup,\n direction === 'up' ? cellGroup.row + count : cellGroup.row - count,\n index === 0 // row === proxy.rowStart\n ? distStartRowY\n : (cellGroup._prev as Group).attribute.y + proxy.table.getRowHeight((cellGroup._prev as Group).row)\n );\n });\n }\n}\n\nexport function updateRowContent(syncTopRow: number, syncBottomRow: number, proxy: SceneProxy) {\n // row header group\n for (let col = 0; col < proxy.table.rowHeaderLevelCount; col++) {\n for (let row = syncTopRow; row <= syncBottomRow; row++) {\n // const cellGroup = proxy.table.scenegraph.getCell(col, row);\n const cellGroup = proxy.highPerformanceGetCell(col, row, true);\n proxy.updateCellGroupContent(cellGroup);\n }\n }\n // right frozen group\n for (let col = proxy.table.colCount - proxy.table.rightFrozenColCount; col < proxy.table.colCount; col++) {\n for (let row = syncTopRow; row <= syncBottomRow; row++) {\n // const cellGroup = proxy.table.scenegraph.getCell(col, row);\n const cellGroup = proxy.highPerformanceGetCell(col, row);\n proxy.updateCellGroupContent(cellGroup);\n }\n }\n // body group\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n for (let row = syncTopRow; row <= syncBottomRow; row++) {\n // const cellGroup = proxy.table.scenegraph.getCell(col, row);\n const cellGroup = proxy.highPerformanceGetCell(col, row);\n proxy.updateCellGroupContent(cellGroup);\n }\n }\n}\n\nfunction checkFirstRowMerge(row: number, proxy: SceneProxy) {\n for (let col = 0; col < proxy.table.colCount; col++) {\n if (\n (col >= proxy.table.rowHeaderLevelCount && col < proxy.colStart) ||\n (col > proxy.colEnd && col < proxy.table.colCount - proxy.table.rightFrozenColCount)\n ) {\n continue;\n }\n const range = getCellMergeInfo(proxy.table, col, row);\n if (range && range.start.row !== row) {\n // 在row的位置添加range.start.row单元格\n const oldCellGroup = proxy.highPerformanceGetCell(col, row, true);\n const newCellGroup = updateCell(range.start.col, range.start.row, proxy.table, true);\n\n newCellGroup.col = col;\n newCellGroup.row = row;\n newCellGroup.setAttribute(\n 'y',\n proxy.table.getRowsHeight(proxy.table.columnHeaderLevelCount, range.start.row - 1)\n );\n\n oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup);\n oldCellGroup.parent.removeChild(oldCellGroup);\n\n oldCellGroup.needUpdate = false;\n newCellGroup.needUpdate = false;\n\n // update cache\n if (proxy.cellCache.get(col)) {\n proxy.cellCache.set(col, newCellGroup);\n }\n }\n }\n}\n"]}
|
|
@@ -84,6 +84,7 @@ function updateColWidth(scene, col, detaX) {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
function updateCellWidth(scene, cell, col, row, width, detaX, isHeader, autoRowHeight) {
|
|
87
|
+
var _a;
|
|
87
88
|
let cellGroup, distWidth;
|
|
88
89
|
const mergeInfo = (0, get_cell_merge_1.getCellMergeInfo)(scene.table, col, row);
|
|
89
90
|
if (mergeInfo && mergeInfo.end.col - mergeInfo.start.col) {
|
|
@@ -108,7 +109,7 @@ function updateCellWidth(scene, cell, col, row, width, detaX, isHeader, autoRowH
|
|
|
108
109
|
get_prop_1.getProp)("padding", headerStyle, col, row, scene.table));
|
|
109
110
|
(0, spark_line_cell_1.createSparkLineCellGroup)(cellGroup, cellGroup.parent, cellGroup.attribute.x, cellGroup.attribute.y, col, row, cellGroup.attribute.width, cellGroup.attribute.height, padding, scene.table, (0,
|
|
110
111
|
tableHelper_1.getStyleTheme)(headerStyle, scene.table, col, row, get_prop_1.getProp).theme);
|
|
111
|
-
} else if ("image" === type || "video" === type) (0, image_cell_1.updateImageCellContentWhileResize)(cellGroup, col, row, scene.table); else if ("axis" === cellGroup.firstChild.name) {
|
|
112
|
+
} else if ("image" === type || "video" === type) (0, image_cell_1.updateImageCellContentWhileResize)(cellGroup, col, row, scene.table); else if ("axis" === (null === (_a = cellGroup.firstChild) || void 0 === _a ? void 0 : _a.name)) {
|
|
112
113
|
const axisConfig = scene.table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);
|
|
113
114
|
if (axisConfig) {
|
|
114
115
|
const axis = new axis_1.CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, scene.table);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["scenegraph/layout/update-width.ts"],"names":[],"mappings":";;;AACA,qDAA2D;AAC3D,wDAAuD;AAIvD,sEAA0F;AAC1F,oFAAqF;AACrF,gFAAsF;AAEtF,4DAA2D;AAC3D,gDAA4C;AAC5C,8CAAgD;AAChD,gEAAmE;AACnE,mDAAyD;AAUzD,SAAgB,cAAc,CAAC,KAAiB,EAAE,GAAW,EAAE,KAAa;IAC1E,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC,UAAU,KAAK,YAAY,CAAC;IAE9D,IAAI,cAAc,GAAG,KAAK,CAAC;IAC3B,MAAM,uBAAuB,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,CAAU,CAAC;IACtE,MAAM,+BAA+B,GAAG,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,SAAS,CAAC,KAAK,CAAC;IACjF,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,YAAY,CAAC,OAAO,EAAE,+BAA+B,GAAG,KAAK,CAAC,CAAC;IAExF,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,eAAe,CAAC,CAAC,IAAW,EAAE,KAAa,EAAE,EAAE;QACtE,MAAM,cAAc,GAAG,eAAe,CACpC,KAAK,EACL,IAAI,EACJ,GAAG,EAEH,IAAI,CAAC,GAAG,EACR,+BAA+B,EAC/B,KAAK,EAEL,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,sBAAsB,EAC1C,aAAa,CACd,CAAC;QACF,IAAI,cAAc,EAAE;YAClB,MAAM,SAAS,GAAG,IAAA,iCAAgB,EAAC,KAAK,CAAC,KAAK,EAAE,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C,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;KAC9F;IAGD,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;AACjD,CAAC;AAED,SAAS,kBAAkB,CAAC,IAAW,EAAE,KAAiB;IACxD,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,IAAI,CAAC,eAAe,CAAC,CAAC,KAAW,EAAE,EAAE;QACnC,IACE,KAAK,CAAC,IAAI,KAAK,WAAW;YAC1B,KAAK,CAAC,IAAI,KAAK,YAAY;YAC3B,KAAK,CAAC,IAAI,KAAK,MAAM;YACrB,KAAK,CAAC,IAAI,KAAK,SAAS,EACxB;YACA,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;SAC5D;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,IAAA,sBAAY,EAAC,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,OAAiB,CAAC,CAAC;IAC9F,OAAO,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC","file":"update-width.js","sourcesContent":["import type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport { CartesianAxis } from '../../components/axis/axis';\nimport { getStyleTheme } from '../../core/tableHelper';\nimport type { IProgressbarColumnBodyDefine } from '../../ts-types/list-table/define/progressbar-define';\nimport type { Group } from '../graphic/group';\nimport type { Icon } from '../graphic/icon';\nimport { updateImageCellContentWhileResize } from '../group-creater/cell-type/image-cell';\nimport { createProgressBarCell } from '../group-creater/cell-type/progress-bar-cell';\nimport { createSparkLineCellGroup } from '../group-creater/cell-type/spark-line-cell';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport { getProp } from '../utils/get-prop';\nimport { getQuadProps } from '../utils/padding';\nimport { updateCellContentWidth } from '../utils/text-icon-layout';\nimport { updateCellHeightForRow } from './update-height';\n// import { updateAutoRowHeight } from './auto-height';\n\n/**\n * @description: 更新指定列列宽,在拖拽调整列宽中使用\n * @param {Scenegraph} scene\n * @param {number} col\n * @param {number} detaX\n * @return {*}\n */\nexport function updateColWidth(scene: Scenegraph, col: number, detaX: number) {\n const autoRowHeight = scene.table.heightMode === 'autoHeight';\n // deal width corner header or column header\n let needRerangeRow = false;\n const colOrCornerHeaderColumn = scene.getColGroup(col, true) as Group;\n const oldColOrCornerHeaderColumnWidth = colOrCornerHeaderColumn?.attribute.width;\n colOrCornerHeaderColumn?.setAttribute('width', oldColOrCornerHeaderColumnWidth + detaX);\n // 更新单元格宽度\n colOrCornerHeaderColumn?.forEachChildren((cell: Group, index: number) => {\n const isHeightChange = updateCellWidth(\n scene,\n cell,\n col,\n // index,\n cell.row,\n oldColOrCornerHeaderColumnWidth,\n detaX,\n // true\n index < scene.table.columnHeaderLevelCount,\n autoRowHeight\n );\n if (isHeightChange) {\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n resetRowHeight(scene, row);\n }\n } else {\n resetRowHeight(scene, cell.row);\n }\n needRerangeRow = true;\n }\n });\n\n if (needRerangeRow) {\n let newTotalHeight = 0;\n for (let col = 0; col < scene.table.colCount; col++) {\n const colGroup = scene.getColGroup(col, true);\n let y = 0;\n colGroup.forEachChildren((cellGroup: Group) => {\n if (cellGroup.role !== 'cell') {\n return;\n }\n cellGroup.setAttribute('y', y);\n y += cellGroup.attribute.height;\n });\n newTotalHeight = y;\n }\n scene.updateContainerHeight(0, newTotalHeight - scene.colHeaderGroup.attribute.height);\n }\n // deal width row header or body or right frozen cells\n needRerangeRow = false;\n const rowHeaderOrBodyColumn = scene.getColGroup(col) as Group;\n const oldRowHeaderOrBodyColumn = rowHeaderOrBodyColumn.attribute.width;\n rowHeaderOrBodyColumn?.setAttribute('width', oldRowHeaderOrBodyColumn + detaX);\n rowHeaderOrBodyColumn?.forEachChildren((cell: Group, index: number) => {\n const isHeightChange = updateCellWidth(\n scene,\n cell,\n // col + (!isRowHeader ? scene.table.frozenColCount : 0),\n cell.col,\n // index + scene.table.frozenRowCount,\n cell.row,\n oldRowHeaderOrBodyColumn,\n detaX,\n // isRowHeader\n col < scene.table.rowHeaderLevelCount,\n autoRowHeight\n );\n if (isHeightChange) {\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n resetRowHeight(scene, row);\n }\n } else {\n resetRowHeight(scene, cell.row);\n }\n needRerangeRow = true;\n }\n });\n\n if (needRerangeRow) {\n let newTotalHeight = 0;\n for (let col = 0; col < scene.table.colCount; col++) {\n const colGroup = scene.getColGroup(col, false);\n let y = 0;\n colGroup.forEachChildren((cellGroup: Group) => {\n if (cellGroup.role !== 'cell') {\n return;\n }\n cellGroup.setAttribute('y', y);\n y += cellGroup.attribute.height;\n });\n newTotalHeight = y;\n }\n scene.updateContainerHeight(scene.table.frozenRowCount, newTotalHeight - scene.bodyGroup.attribute.height);\n }\n\n // deal width bottom frozen cells\n const bottomColumn = scene.getColGroupInBottom(col);\n if (bottomColumn) {\n const oldBottomColumnWidth = bottomColumn.attribute.width;\n bottomColumn?.setAttribute('width', oldBottomColumnWidth + detaX);\n bottomColumn?.forEachChildren((cell: Group, index: number) => {\n const isHeightChange = updateCellWidth(\n scene,\n cell,\n // col + (!isRowHeader ? scene.table.frozenColCount : 0),\n cell.col,\n // index + scene.table.frozenRowCount,\n cell.row,\n oldBottomColumnWidth,\n detaX,\n // isRowHeader\n col < scene.table.rowHeaderLevelCount,\n autoRowHeight\n );\n if (isHeightChange) {\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n resetRowHeight(scene, row);\n }\n } else {\n resetRowHeight(scene, cell.row);\n }\n needRerangeRow = true;\n }\n });\n\n if (needRerangeRow) {\n let newTotalHeight = 0;\n for (let col = 0; col < scene.table.colCount; col++) {\n const colGroup = scene.getColGroup(col, false);\n let y = 0;\n colGroup.forEachChildren((cellGroup: Group) => {\n if (cellGroup.role !== 'cell') {\n return;\n }\n cellGroup.setAttribute('y', y);\n y += cellGroup.attribute.height;\n });\n newTotalHeight = y;\n }\n scene.updateContainerHeight(scene.table.frozenRowCount, newTotalHeight - scene.bodyGroup.attribute.height);\n }\n }\n\n // 更新剩余列位置\n if (col < scene.frozenColCount) {\n scene.cornerHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.rowHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n } else {\n scene.colHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.bodyGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n if (bottomColumn) {\n scene.bottomFrozenGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n }\n\n scene.table.setColWidth(col, rowHeaderOrBodyColumn.attribute.width, true);\n}\n\n/**\n * @description: 更新单个单元格宽度\n * @return {*}\n */\nfunction updateCellWidth(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n width: number, // old width, not dist\n detaX: number,\n isHeader: boolean,\n // autoColWidth: boolean,\n autoRowHeight: boolean\n): boolean {\n let cellGroup;\n let distWidth;\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n // TO BE FIXED 这里使用横向和纵向来判断单元格merge情况,目前没有横纵都merge的情况,\n // 如果有这里的逻辑要修改\n if (mergeInfo && mergeInfo.end.col - mergeInfo.start.col) {\n // 更新横向merge cell width\n const mergeCell = scene.getCell(mergeInfo.start.col, mergeInfo.start.row);\n const mergeCellWidth = mergeCell.attribute.width;\n mergeCell.setAttribute('width', mergeCellWidth + detaX);\n\n cellGroup = mergeCell;\n distWidth = mergeCell.attribute.width;\n col = cellGroup.col;\n row = cellGroup.row;\n } else if (mergeInfo && mergeInfo.start.row === row) {\n // 更新纵向merge cell width,只更新一次\n cell.setAttribute('width', width + detaX);\n\n cellGroup = cell;\n distWidth = width + detaX;\n col = cellGroup.col;\n row = cellGroup.row;\n } else if (!mergeInfo) {\n cell.setAttribute('width', width + detaX);\n cellGroup = cell;\n distWidth = width + detaX;\n }\n\n if (!cellGroup) {\n // 合并单元格非主单元格,不处理\n return false;\n }\n\n // 更新单元格布局\n const type = scene.table.isHeader(col, row)\n ? scene.table._getHeaderLayoutMap(col, row).headerType\n : scene.table.getBodyColumnType(col, row);\n let isHeightChange = false;\n if (type === 'progressbar') {\n // 目前先采用重新生成节点的方案\n const columnDefine = scene.table.getBodyColumnDefine(col, row) as IProgressbarColumnBodyDefine;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const value = scene.table.getCellValue(col, row);\n const dataValue = scene.table.getCellOriginValue(col, row);\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n\n const newBarCell = createProgressBarCell(\n columnDefine,\n style,\n cellGroup.attribute.width,\n // cellGroup.attribute.height,\n value,\n dataValue,\n col,\n row,\n padding,\n scene.table\n );\n\n const oldBarCell = cellGroup.getChildByName('progress-bar') as Group;\n // cell.replaceChild(newBarCell, oldBarCell);\n cellGroup.insertBefore(newBarCell, oldBarCell);\n cellGroup.removeChild(oldBarCell);\n oldBarCell.removeAllChild();\n oldBarCell.release();\n } else if (type === 'sparkline') {\n // 目前先采用重新生成节点的方案\n cellGroup.removeAllChild();\n const headerStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', headerStyle, col, row, scene.table));\n createSparkLineCellGroup(\n cellGroup,\n cellGroup.parent,\n cellGroup.attribute.x,\n cellGroup.attribute.y,\n col,\n row,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n padding,\n scene.table,\n getStyleTheme(headerStyle, scene.table, col, row, getProp).theme\n );\n } else if (type === 'image' || type === 'video') {\n // // 只更新背景边框\n // const rect = cell.firstChild as Rect;\n // rect.setAttribute('width', cell.attribute.width);\n updateImageCellContentWhileResize(cellGroup, col, row, scene.table);\n } else if (cellGroup.firstChild.name === 'axis') {\n // recreate axis component\n const axisConfig = scene.table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);\n if (axisConfig) {\n const axis = new CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, scene.table);\n cellGroup.clear();\n cellGroup.appendChild(axis.component);\n axis.overlap();\n }\n } else {\n // 处理文字\n const style = scene.table._getCellStyle(col, row);\n isHeightChange = updateCellContentWidth(\n cellGroup,\n distWidth,\n detaX,\n autoRowHeight,\n getQuadProps(style.padding as number),\n style.textAlign,\n style.textBaseline,\n scene\n );\n }\n\n return isHeightChange;\n}\n\n/**\n * @description: 重置指定行行高\n * @param {Scenegraph} scene\n * @param {number} row\n * @return {*}\n */\nfunction resetRowHeight(scene: Scenegraph, row: number) {\n let maxHeight = 0;\n // 获取高度\n for (let col = 0; col < scene.table.colCount; col++) {\n const cell = scene.highPerformanceGetCell(col, row);\n let cellHeight = getCleanCellHeight(cell, scene);\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n cellHeight = cellHeight / (mergeInfo.end.row - mergeInfo.start.row + 1);\n }\n maxHeight = Math.max(maxHeight, cellHeight);\n }\n\n // 更新高度\n for (let col = 0; col < scene.table.colCount; col++) {\n let distHeight = maxHeight;\n const cell = scene.highPerformanceGetCell(col, row);\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n for (let rowIndex = mergeInfo.start.row; rowIndex <= mergeInfo.end.row; rowIndex++) {\n if (rowIndex !== row) {\n distHeight += scene.table.getRowHeight(rowIndex);\n }\n }\n }\n updateCellHeightForRow(scene, cell, col, row, distHeight, 0, scene.table.isHeader(col, row));\n }\n\n // 更新table行高存储\n scene.table.setRowHeight(row, maxHeight, true);\n}\n\nfunction getCleanCellHeight(cell: Group, scene: Scenegraph) {\n let maxHeight = 0;\n cell.forEachChildren((child: Icon) => {\n if (\n child.role === 'icon-left' ||\n child.role === 'icon-right' ||\n child.name === 'text' ||\n child.name === 'content'\n ) {\n maxHeight = Math.max(maxHeight, child.AABBBounds.height());\n }\n });\n\n const padding = getQuadProps(scene.table._getCellStyle(cell.col, cell.row).padding as number);\n return maxHeight + padding[0] + padding[2];\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["scenegraph/layout/update-width.ts"],"names":[],"mappings":";;;AACA,qDAA2D;AAC3D,wDAAuD;AAIvD,sEAA0F;AAC1F,oFAAqF;AACrF,gFAAsF;AAEtF,4DAA2D;AAC3D,gDAA4C;AAC5C,8CAAgD;AAChD,gEAAmE;AACnE,mDAAyD;AAUzD,SAAgB,cAAc,CAAC,KAAiB,EAAE,GAAW,EAAE,KAAa;IAC1E,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC,UAAU,KAAK,YAAY,CAAC;IAE9D,IAAI,cAAc,GAAG,KAAK,CAAC;IAC3B,MAAM,uBAAuB,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,CAAU,CAAC;IACtE,MAAM,+BAA+B,GAAG,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,SAAS,CAAC,KAAK,CAAC;IACjF,uB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C9F,OAAO,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC","file":"update-width.js","sourcesContent":["import type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport { CartesianAxis } from '../../components/axis/axis';\nimport { getStyleTheme } from '../../core/tableHelper';\nimport type { IProgressbarColumnBodyDefine } from '../../ts-types/list-table/define/progressbar-define';\nimport type { Group } from '../graphic/group';\nimport type { Icon } from '../graphic/icon';\nimport { updateImageCellContentWhileResize } from '../group-creater/cell-type/image-cell';\nimport { createProgressBarCell } from '../group-creater/cell-type/progress-bar-cell';\nimport { createSparkLineCellGroup } from '../group-creater/cell-type/spark-line-cell';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport { getProp } from '../utils/get-prop';\nimport { getQuadProps } from '../utils/padding';\nimport { updateCellContentWidth } from '../utils/text-icon-layout';\nimport { updateCellHeightForRow } from './update-height';\n// import { updateAutoRowHeight } from './auto-height';\n\n/**\n * @description: 更新指定列列宽,在拖拽调整列宽中使用\n * @param {Scenegraph} scene\n * @param {number} col\n * @param {number} detaX\n * @return {*}\n */\nexport function updateColWidth(scene: Scenegraph, col: number, detaX: number) {\n const autoRowHeight = scene.table.heightMode === 'autoHeight';\n // deal width corner header or column header\n let needRerangeRow = false;\n const colOrCornerHeaderColumn = scene.getColGroup(col, true) as Group;\n const oldColOrCornerHeaderColumnWidth = colOrCornerHeaderColumn?.attribute.width;\n colOrCornerHeaderColumn?.setAttribute('width', oldColOrCornerHeaderColumnWidth + detaX);\n // 更新单元格宽度\n colOrCornerHeaderColumn?.forEachChildren((cell: Group, index: number) => {\n const isHeightChange = updateCellWidth(\n scene,\n cell,\n col,\n // index,\n cell.row,\n oldColOrCornerHeaderColumnWidth,\n detaX,\n // true\n index < scene.table.columnHeaderLevelCount,\n autoRowHeight\n );\n if (isHeightChange) {\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n resetRowHeight(scene, row);\n }\n } else {\n resetRowHeight(scene, cell.row);\n }\n needRerangeRow = true;\n }\n });\n\n if (needRerangeRow) {\n let newTotalHeight = 0;\n for (let col = 0; col < scene.table.colCount; col++) {\n const colGroup = scene.getColGroup(col, true);\n let y = 0;\n colGroup.forEachChildren((cellGroup: Group) => {\n if (cellGroup.role !== 'cell') {\n return;\n }\n cellGroup.setAttribute('y', y);\n y += cellGroup.attribute.height;\n });\n newTotalHeight = y;\n }\n scene.updateContainerHeight(0, newTotalHeight - scene.colHeaderGroup.attribute.height);\n }\n // deal width row header or body or right frozen cells\n needRerangeRow = false;\n const rowHeaderOrBodyColumn = scene.getColGroup(col) as Group;\n const oldRowHeaderOrBodyColumn = rowHeaderOrBodyColumn.attribute.width;\n rowHeaderOrBodyColumn?.setAttribute('width', oldRowHeaderOrBodyColumn + detaX);\n rowHeaderOrBodyColumn?.forEachChildren((cell: Group, index: number) => {\n const isHeightChange = updateCellWidth(\n scene,\n cell,\n // col + (!isRowHeader ? scene.table.frozenColCount : 0),\n cell.col,\n // index + scene.table.frozenRowCount,\n cell.row,\n oldRowHeaderOrBodyColumn,\n detaX,\n // isRowHeader\n col < scene.table.rowHeaderLevelCount,\n autoRowHeight\n );\n if (isHeightChange) {\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n resetRowHeight(scene, row);\n }\n } else {\n resetRowHeight(scene, cell.row);\n }\n needRerangeRow = true;\n }\n });\n\n if (needRerangeRow) {\n let newTotalHeight = 0;\n for (let col = 0; col < scene.table.colCount; col++) {\n const colGroup = scene.getColGroup(col, false);\n let y = 0;\n colGroup.forEachChildren((cellGroup: Group) => {\n if (cellGroup.role !== 'cell') {\n return;\n }\n cellGroup.setAttribute('y', y);\n y += cellGroup.attribute.height;\n });\n newTotalHeight = y;\n }\n scene.updateContainerHeight(scene.table.frozenRowCount, newTotalHeight - scene.bodyGroup.attribute.height);\n }\n\n // deal width bottom frozen cells\n const bottomColumn = scene.getColGroupInBottom(col);\n if (bottomColumn) {\n const oldBottomColumnWidth = bottomColumn.attribute.width;\n bottomColumn?.setAttribute('width', oldBottomColumnWidth + detaX);\n bottomColumn?.forEachChildren((cell: Group, index: number) => {\n const isHeightChange = updateCellWidth(\n scene,\n cell,\n // col + (!isRowHeader ? scene.table.frozenColCount : 0),\n cell.col,\n // index + scene.table.frozenRowCount,\n cell.row,\n oldBottomColumnWidth,\n detaX,\n // isRowHeader\n col < scene.table.rowHeaderLevelCount,\n autoRowHeight\n );\n if (isHeightChange) {\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n resetRowHeight(scene, row);\n }\n } else {\n resetRowHeight(scene, cell.row);\n }\n needRerangeRow = true;\n }\n });\n\n if (needRerangeRow) {\n let newTotalHeight = 0;\n for (let col = 0; col < scene.table.colCount; col++) {\n const colGroup = scene.getColGroup(col, false);\n let y = 0;\n colGroup.forEachChildren((cellGroup: Group) => {\n if (cellGroup.role !== 'cell') {\n return;\n }\n cellGroup.setAttribute('y', y);\n y += cellGroup.attribute.height;\n });\n newTotalHeight = y;\n }\n scene.updateContainerHeight(scene.table.frozenRowCount, newTotalHeight - scene.bodyGroup.attribute.height);\n }\n }\n\n // 更新剩余列位置\n if (col < scene.frozenColCount) {\n scene.cornerHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.rowHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n } else {\n scene.colHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.bodyGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n if (bottomColumn) {\n scene.bottomFrozenGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n }\n\n scene.table.setColWidth(col, rowHeaderOrBodyColumn.attribute.width, true);\n}\n\n/**\n * @description: 更新单个单元格宽度\n * @return {*}\n */\nfunction updateCellWidth(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n width: number, // old width, not dist\n detaX: number,\n isHeader: boolean,\n // autoColWidth: boolean,\n autoRowHeight: boolean\n): boolean {\n let cellGroup;\n let distWidth;\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n // TO BE FIXED 这里使用横向和纵向来判断单元格merge情况,目前没有横纵都merge的情况,\n // 如果有这里的逻辑要修改\n if (mergeInfo && mergeInfo.end.col - mergeInfo.start.col) {\n // 更新横向merge cell width\n const mergeCell = scene.getCell(mergeInfo.start.col, mergeInfo.start.row);\n const mergeCellWidth = mergeCell.attribute.width;\n mergeCell.setAttribute('width', mergeCellWidth + detaX);\n\n cellGroup = mergeCell;\n distWidth = mergeCell.attribute.width;\n col = cellGroup.col;\n row = cellGroup.row;\n } else if (mergeInfo && mergeInfo.start.row === row) {\n // 更新纵向merge cell width,只更新一次\n cell.setAttribute('width', width + detaX);\n\n cellGroup = cell;\n distWidth = width + detaX;\n col = cellGroup.col;\n row = cellGroup.row;\n } else if (!mergeInfo) {\n cell.setAttribute('width', width + detaX);\n cellGroup = cell;\n distWidth = width + detaX;\n }\n\n if (!cellGroup) {\n // 合并单元格非主单元格,不处理\n return false;\n }\n\n // 更新单元格布局\n const type = scene.table.isHeader(col, row)\n ? scene.table._getHeaderLayoutMap(col, row).headerType\n : scene.table.getBodyColumnType(col, row);\n let isHeightChange = false;\n if (type === 'progressbar') {\n // 目前先采用重新生成节点的方案\n const columnDefine = scene.table.getBodyColumnDefine(col, row) as IProgressbarColumnBodyDefine;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const value = scene.table.getCellValue(col, row);\n const dataValue = scene.table.getCellOriginValue(col, row);\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n\n const newBarCell = createProgressBarCell(\n columnDefine,\n style,\n cellGroup.attribute.width,\n // cellGroup.attribute.height,\n value,\n dataValue,\n col,\n row,\n padding,\n scene.table\n );\n\n const oldBarCell = cellGroup.getChildByName('progress-bar') as Group;\n // cell.replaceChild(newBarCell, oldBarCell);\n cellGroup.insertBefore(newBarCell, oldBarCell);\n cellGroup.removeChild(oldBarCell);\n oldBarCell.removeAllChild();\n oldBarCell.release();\n } else if (type === 'sparkline') {\n // 目前先采用重新生成节点的方案\n cellGroup.removeAllChild();\n const headerStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', headerStyle, col, row, scene.table));\n createSparkLineCellGroup(\n cellGroup,\n cellGroup.parent,\n cellGroup.attribute.x,\n cellGroup.attribute.y,\n col,\n row,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n padding,\n scene.table,\n getStyleTheme(headerStyle, scene.table, col, row, getProp).theme\n );\n } else if (type === 'image' || type === 'video') {\n // // 只更新背景边框\n // const rect = cell.firstChild as Rect;\n // rect.setAttribute('width', cell.attribute.width);\n updateImageCellContentWhileResize(cellGroup, col, row, scene.table);\n } else if (cellGroup.firstChild?.name === 'axis') {\n // recreate axis component\n const axisConfig = scene.table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);\n if (axisConfig) {\n const axis = new CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, scene.table);\n cellGroup.clear();\n cellGroup.appendChild(axis.component);\n axis.overlap();\n }\n } else {\n // 处理文字\n const style = scene.table._getCellStyle(col, row);\n isHeightChange = updateCellContentWidth(\n cellGroup,\n distWidth,\n detaX,\n autoRowHeight,\n getQuadProps(style.padding as number),\n style.textAlign,\n style.textBaseline,\n scene\n );\n }\n\n return isHeightChange;\n}\n\n/**\n * @description: 重置指定行行高\n * @param {Scenegraph} scene\n * @param {number} row\n * @return {*}\n */\nfunction resetRowHeight(scene: Scenegraph, row: number) {\n let maxHeight = 0;\n // 获取高度\n for (let col = 0; col < scene.table.colCount; col++) {\n const cell = scene.highPerformanceGetCell(col, row);\n let cellHeight = getCleanCellHeight(cell, scene);\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n cellHeight = cellHeight / (mergeInfo.end.row - mergeInfo.start.row + 1);\n }\n maxHeight = Math.max(maxHeight, cellHeight);\n }\n\n // 更新高度\n for (let col = 0; col < scene.table.colCount; col++) {\n let distHeight = maxHeight;\n const cell = scene.highPerformanceGetCell(col, row);\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n for (let rowIndex = mergeInfo.start.row; rowIndex <= mergeInfo.end.row; rowIndex++) {\n if (rowIndex !== row) {\n distHeight += scene.table.getRowHeight(rowIndex);\n }\n }\n }\n updateCellHeightForRow(scene, cell, col, row, distHeight, 0, scene.table.isHeader(col, row));\n }\n\n // 更新table行高存储\n scene.table.setRowHeight(row, maxHeight, true);\n}\n\nfunction getCleanCellHeight(cell: Group, scene: Scenegraph) {\n let maxHeight = 0;\n cell.forEachChildren((child: Icon) => {\n if (\n child.role === 'icon-left' ||\n child.role === 'icon-right' ||\n child.name === 'text' ||\n child.name === 'content'\n ) {\n maxHeight = Math.max(maxHeight, child.AABBBounds.height());\n }\n });\n\n const padding = getQuadProps(scene.table._getCellStyle(cell.col, cell.row).padding as number);\n return maxHeight + padding[0] + padding[2];\n}\n"]}
|
|
@@ -239,7 +239,7 @@ class Scenegraph {
|
|
|
239
239
|
return cell || empty_group_1.emptyGroup;
|
|
240
240
|
}
|
|
241
241
|
highPerformanceGetCell(col, row, getShadow) {
|
|
242
|
-
return this.
|
|
242
|
+
return this.proxy.highPerformanceGetCell(col, row, getShadow);
|
|
243
243
|
}
|
|
244
244
|
getColGroup(col, isCornerOrColHeader = !1) {
|
|
245
245
|
let element;
|
|
@@ -575,7 +575,8 @@ class Scenegraph {
|
|
|
575
575
|
this.colHeaderGroup.setDeltaWidth(colHeaderX - this.colHeaderGroup.attribute.width),
|
|
576
576
|
this.rowHeaderGroup.setDeltaWidth(rowHeaderX - this.rowHeaderGroup.attribute.width),
|
|
577
577
|
this.bodyGroup.setDeltaWidth(bodyX - this.bodyGroup.attribute.width), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width),
|
|
578
|
-
this.
|
|
578
|
+
this.bottomFrozenGroup.setAttribute("x", this.rowHeaderGroup.attribute.width), this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width),
|
|
579
|
+
this.updateTableSize();
|
|
579
580
|
const oldHorizontalBarPos = this.table.stateManeger.scroll.horizontalBarPos, oldVerticalBarPos = this.table.stateManeger.scroll.verticalBarPos;
|
|
580
581
|
this.component.updateScrollBar(), this.table.stateManeger.setScrollLeft(oldHorizontalBarPos),
|
|
581
582
|
this.table.stateManeger.setScrollTop(oldVerticalBarPos), this.updateNextFrame();
|