@visactor/vtable 0.9.3-alpha.7 → 0.10.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.js +6 -5
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotTable.js +2 -2
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/components/axis/axis.d.ts +1 -0
- package/cjs/components/axis/axis.js +10 -1
- package/cjs/components/axis/axis.js.map +1 -1
- package/cjs/components/legend/legend.js +5 -3
- package/cjs/components/legend/legend.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +4 -2
- package/cjs/core/BaseTable.js +33 -16
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/event/drill.d.ts +2 -0
- package/cjs/event/drill.js +15 -2
- package/cjs/event/drill.js.map +1 -1
- package/cjs/event/event.js +2 -1
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/pivot-chart/axis-click.js +3 -2
- package/cjs/event/pivot-chart/axis-click.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 +5 -5
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/chart-helper/get-chart-spec.js +2 -2
- package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/cjs/layout/pivot-layout.js +4 -2
- package/cjs/layout/pivot-layout.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.d.ts +8 -0
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +66 -0
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -0
- package/cjs/scenegraph/graphic/contributions/chart-render.js +9 -35
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +2 -1
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +1 -1
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +3 -3
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/init-scenegraph.d.ts +2 -0
- package/cjs/scenegraph/group-creater/init-scenegraph.js +61 -0
- package/cjs/scenegraph/group-creater/init-scenegraph.js.map +1 -0
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +7 -2
- 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 -0
- package/cjs/scenegraph/group-creater/progress/proxy.js +9 -5
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +35 -44
- 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.js +3 -17
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/update-auto-column.d.ts +2 -0
- package/cjs/scenegraph/group-creater/progress/update-position/update-auto-column.js +37 -0
- package/cjs/scenegraph/group-creater/progress/update-position/update-auto-column.js.map +1 -0
- package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/util.d.ts +8 -0
- package/cjs/scenegraph/group-creater/progress/update-position/util.js +70 -0
- package/cjs/scenegraph/group-creater/progress/update-position/util.js.map +1 -0
- package/cjs/scenegraph/layout/frozen.d.ts +2 -0
- package/cjs/scenegraph/layout/frozen.js +139 -6
- package/cjs/scenegraph/layout/frozen.js.map +1 -1
- package/cjs/scenegraph/layout/update-height.js +2 -1
- package/cjs/scenegraph/layout/update-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +39 -64
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.js +8 -6
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +9 -4
- package/cjs/scenegraph/scenegraph.js +35 -97
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/style/corner-cell.d.ts +2 -2
- package/cjs/scenegraph/style/corner-cell.js +8 -9
- package/cjs/scenegraph/style/corner-cell.js.map +1 -1
- package/cjs/state/hover/update-position.js +1 -1
- package/cjs/state/hover/update-position.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +7 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +1 -1
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/dist/vtable.js +1086 -689
- package/dist/vtable.min.js +3 -3
- package/es/ListTable.js +6 -5
- package/es/ListTable.js.map +1 -1
- package/es/PivotTable.js +2 -2
- package/es/PivotTable.js.map +1 -1
- package/es/components/axis/axis.d.ts +1 -0
- package/es/components/axis/axis.js +10 -1
- package/es/components/axis/axis.js.map +1 -1
- package/es/components/legend/legend.js +5 -3
- package/es/components/legend/legend.js.map +1 -1
- package/es/core/BaseTable.d.ts +4 -2
- package/es/core/BaseTable.js +27 -9
- package/es/core/BaseTable.js.map +1 -1
- package/es/event/drill.d.ts +2 -0
- package/es/event/drill.js +13 -0
- package/es/event/drill.js.map +1 -1
- package/es/event/event.js +3 -3
- package/es/event/event.js.map +1 -1
- package/es/event/pivot-chart/axis-click.js +3 -2
- package/es/event/pivot-chart/axis-click.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 +5 -5
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/chart-helper/get-chart-spec.js +2 -2
- package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/es/layout/pivot-layout.js +4 -2
- package/es/layout/pivot-layout.js.map +1 -1
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render-helper.d.ts +8 -0
- package/es/scenegraph/graphic/contributions/chart-render-helper.js +61 -0
- package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -0
- package/es/scenegraph/graphic/contributions/chart-render.js +9 -34
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +2 -1
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.js +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +1 -1
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.js +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.js +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +3 -3
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/group-creater/init-scenegraph.d.ts +2 -0
- package/es/scenegraph/group-creater/init-scenegraph.js +55 -0
- package/es/scenegraph/group-creater/init-scenegraph.js.map +1 -0
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +6 -2
- 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 -0
- package/es/scenegraph/group-creater/progress/proxy.js +10 -3
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +36 -44
- 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.js +2 -17
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/update-auto-column.d.ts +2 -0
- package/es/scenegraph/group-creater/progress/update-position/update-auto-column.js +29 -0
- package/es/scenegraph/group-creater/progress/update-position/update-auto-column.js.map +1 -0
- package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/util.d.ts +8 -0
- package/es/scenegraph/group-creater/progress/update-position/util.js +60 -0
- package/es/scenegraph/group-creater/progress/update-position/util.js.map +1 -0
- package/es/scenegraph/layout/frozen.d.ts +2 -0
- package/es/scenegraph/layout/frozen.js +137 -3
- package/es/scenegraph/layout/frozen.js.map +1 -1
- package/es/scenegraph/layout/update-height.js +2 -1
- package/es/scenegraph/layout/update-height.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +39 -64
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.js +9 -5
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +9 -4
- package/es/scenegraph/scenegraph.js +35 -100
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/style/corner-cell.d.ts +2 -2
- package/es/scenegraph/style/corner-cell.js +4 -7
- package/es/scenegraph/style/corner-cell.js.map +1 -1
- package/es/state/hover/update-position.js +1 -1
- package/es/state/hover/update-position.js.map +1 -1
- package/es/ts-types/base-table.d.ts +7 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +1 -1
- package/es/ts-types/table-engine.js.map +1 -1
- package/package.json +2 -2
|
@@ -4,8 +4,6 @@ import { IconFuncTypeEnum } from "../ts-types";
|
|
|
4
4
|
|
|
5
5
|
import { isArray, isString } from "@visactor/vutils";
|
|
6
6
|
|
|
7
|
-
import { Group } from "./graphic/group";
|
|
8
|
-
|
|
9
7
|
import { getCellMergeInfo } from "./utils/get-cell-merge";
|
|
10
8
|
|
|
11
9
|
import { updateColWidth } from "./layout/update-width";
|
|
@@ -52,11 +50,11 @@ import { computeRowsHeight } from "./layout/compute-row-height";
|
|
|
52
50
|
|
|
53
51
|
import { emptyGroup } from "./utils/empty-group";
|
|
54
52
|
|
|
55
|
-
import {
|
|
53
|
+
import { dealBottomFrozen, dealFrozen, dealRightFrozen, resetFrozen } from "./layout/frozen";
|
|
56
54
|
|
|
57
|
-
import {
|
|
55
|
+
import { updateChartSize, updateChartState } from "./refresh-node/update-chart";
|
|
58
56
|
|
|
59
|
-
import {
|
|
57
|
+
import { initSceneGraph } from "./group-creater/init-scenegraph";
|
|
60
58
|
|
|
61
59
|
container.load(splitModule);
|
|
62
60
|
|
|
@@ -104,93 +102,14 @@ export class Scenegraph {
|
|
|
104
102
|
return this.transpose || this.isPivot ? this.table.rowCount - 1 : null !== (_a = this.proxy.rowEnd) && void 0 !== _a ? _a : 0;
|
|
105
103
|
}
|
|
106
104
|
initSceneGraph() {
|
|
107
|
-
this.isPivot = this.table.isPivotTable(), this.transpose = this.table.options.transpose
|
|
108
|
-
|
|
109
|
-
this.tableGroup = new Group({
|
|
110
|
-
x: 0,
|
|
111
|
-
y: 0,
|
|
112
|
-
width: width,
|
|
113
|
-
height: height,
|
|
114
|
-
clip: !0,
|
|
115
|
-
pickable: !1
|
|
116
|
-
}), this.tableGroup.role = "table";
|
|
117
|
-
const colHeaderGroup = new Group({
|
|
118
|
-
x: 0,
|
|
119
|
-
y: 0,
|
|
120
|
-
width: 0,
|
|
121
|
-
height: 0,
|
|
122
|
-
clip: !1,
|
|
123
|
-
pickable: !1
|
|
124
|
-
});
|
|
125
|
-
colHeaderGroup.role = "col-header", this.colHeaderGroup = colHeaderGroup;
|
|
126
|
-
const cornerHeaderGroup = new Group({
|
|
127
|
-
x: 0,
|
|
128
|
-
y: 0,
|
|
129
|
-
width: 0,
|
|
130
|
-
height: 0,
|
|
131
|
-
clip: !1,
|
|
132
|
-
pickable: !1
|
|
133
|
-
});
|
|
134
|
-
cornerHeaderGroup.role = "corner-header", this.cornerHeaderGroup = cornerHeaderGroup;
|
|
135
|
-
const rowHeaderGroup = new Group({
|
|
136
|
-
x: 0,
|
|
137
|
-
y: 0,
|
|
138
|
-
width: 0,
|
|
139
|
-
height: 0,
|
|
140
|
-
clip: !1,
|
|
141
|
-
pickable: !1
|
|
142
|
-
});
|
|
143
|
-
rowHeaderGroup.role = "row-header", this.rowHeaderGroup = rowHeaderGroup;
|
|
144
|
-
const bodyGroup = new Group({
|
|
145
|
-
x: 0,
|
|
146
|
-
y: 0,
|
|
147
|
-
width: width,
|
|
148
|
-
height: 0,
|
|
149
|
-
clip: !1,
|
|
150
|
-
pickable: !1
|
|
151
|
-
});
|
|
152
|
-
bodyGroup.role = "body", this.bodyGroup = bodyGroup;
|
|
153
|
-
const rightFrozenGroup = new Group({
|
|
154
|
-
x: 0,
|
|
155
|
-
y: 0,
|
|
156
|
-
width: width,
|
|
157
|
-
height: 0,
|
|
158
|
-
clip: !1,
|
|
159
|
-
pickable: !1
|
|
160
|
-
});
|
|
161
|
-
rightFrozenGroup.role = "right-frozen", this.rightFrozenGroup = rightFrozenGroup;
|
|
162
|
-
const bottomFrozenGroup = new Group({
|
|
163
|
-
x: 0,
|
|
164
|
-
y: 0,
|
|
165
|
-
width: width,
|
|
166
|
-
height: 0,
|
|
167
|
-
clip: !1,
|
|
168
|
-
pickable: !1
|
|
169
|
-
});
|
|
170
|
-
bottomFrozenGroup.role = "bottom-frozen", this.bottomFrozenGroup = bottomFrozenGroup;
|
|
171
|
-
const componentGroup = new Group({
|
|
172
|
-
x: 0,
|
|
173
|
-
y: 0,
|
|
174
|
-
width: 0,
|
|
175
|
-
height: 0,
|
|
176
|
-
clip: !1,
|
|
177
|
-
pickable: !1,
|
|
178
|
-
childrenPickable: !0
|
|
179
|
-
});
|
|
180
|
-
componentGroup.role = "component", this.componentGroup = componentGroup, this.rightTopCellGroup = createCornerCell(this.table.theme.cornerRightTopCellStyle || this.table.theme.cornerHeaderStyle),
|
|
181
|
-
this.leftBottomCellGroup = createCornerCell(this.table.theme.cornerLeftBottomCellStyle || this.table.theme.cornerHeaderStyle),
|
|
182
|
-
this.rightBottomCellGroup = createCornerCell(this.table.theme.cornerRightBottomCellStyle || this.table.theme.cornerHeaderStyle),
|
|
183
|
-
this.tableGroup.addChild(bodyGroup), this.tableGroup.addChild(rightFrozenGroup),
|
|
184
|
-
this.tableGroup.addChild(bottomFrozenGroup), this.tableGroup.addChild(rowHeaderGroup),
|
|
185
|
-
this.tableGroup.addChild(colHeaderGroup), this.tableGroup.addChild(this.rightBottomCellGroup),
|
|
186
|
-
this.tableGroup.addChild(this.rightTopCellGroup), this.tableGroup.addChild(this.leftBottomCellGroup),
|
|
187
|
-
this.tableGroup.addChild(cornerHeaderGroup), this.tableGroup.addChild(componentGroup);
|
|
105
|
+
this.isPivot = this.table.isPivotTable(), this.transpose = this.table.options.transpose,
|
|
106
|
+
initSceneGraph(this);
|
|
188
107
|
}
|
|
189
108
|
clearCells() {
|
|
190
109
|
this.clear = !0, this.hasFrozen = !1, this.mergeMap.clear(), this.colHeaderGroup.clear(),
|
|
191
110
|
this.rowHeaderGroup.clear(), this.cornerHeaderGroup.clear(), this.bodyGroup.clear(),
|
|
192
|
-
this.bottomFrozenGroup.clear(), this.rightFrozenGroup.clear(), this.
|
|
193
|
-
this.
|
|
111
|
+
this.bottomFrozenGroup.clear(), this.rightFrozenGroup.clear(), this.rightTopCornerGroup.clear(),
|
|
112
|
+
this.rightBottomCornerGroup.clear(), this.leftBottomCornerGroup.clear(), this.colHeaderGroup.setAttributes({
|
|
194
113
|
x: 0,
|
|
195
114
|
y: 0,
|
|
196
115
|
width: 0,
|
|
@@ -220,19 +139,19 @@ export class Scenegraph {
|
|
|
220
139
|
y: 0,
|
|
221
140
|
width: 0,
|
|
222
141
|
height: 0
|
|
223
|
-
}), this.
|
|
142
|
+
}), this.rightTopCornerGroup.setAttributes({
|
|
224
143
|
x: 0,
|
|
225
144
|
y: 0,
|
|
226
145
|
width: 0,
|
|
227
146
|
height: 0,
|
|
228
147
|
visible: !1
|
|
229
|
-
}), this.
|
|
148
|
+
}), this.leftBottomCornerGroup.setAttributes({
|
|
230
149
|
x: 0,
|
|
231
150
|
y: 0,
|
|
232
151
|
width: 0,
|
|
233
152
|
height: 0,
|
|
234
153
|
visible: !1
|
|
235
|
-
}), this.
|
|
154
|
+
}), this.rightBottomCornerGroup.setAttributes({
|
|
236
155
|
x: 0,
|
|
237
156
|
y: 0,
|
|
238
157
|
width: 0,
|
|
@@ -275,9 +194,9 @@ export class Scenegraph {
|
|
|
275
194
|
element || void 0;
|
|
276
195
|
}
|
|
277
196
|
getCell(col, row, getShadow) {
|
|
278
|
-
var _a, _b, _c;
|
|
197
|
+
var _a, _b, _c, _d, _e, _f;
|
|
279
198
|
let cell;
|
|
280
|
-
if (cell = this.table.rightFrozenColCount > 0 && col > this.table.colCount - 1 - this.table.rightFrozenColCount ? null === (
|
|
199
|
+
if (cell = this.table.rightFrozenColCount > 0 && col >= this.table.colCount - this.table.rightFrozenColCount && row < this.table.frozenRowCount ? null === (_a = this.rightBottomCornerGroup.getColGroup(col)) || void 0 === _a ? void 0 : _a.getRowGroup(row) : this.table.bottomFrozenRowCount > 0 && row >= this.table.rowCount - this.table.bottomFrozenRowCount && col < this.table.frozenColCount ? null === (_b = this.leftBottomCornerGroup.getColGroup(col)) || void 0 === _b ? void 0 : _b.getRowGroup(row) : this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0 && col >= this.table.colCount - this.table.rightFrozenColCount && row >= this.table.rowCount - this.table.bottomFrozenRowCount ? null === (_c = this.rightBottomCornerGroup.getColGroup(col)) || void 0 === _c ? void 0 : _c.getRowGroup(row) : this.table.rightFrozenColCount > 0 && col > this.table.colCount - 1 - this.table.rightFrozenColCount ? null === (_d = this.rightFrozenGroup.getColGroup(col)) || void 0 === _d ? void 0 : _d.getRowGroup(row) : this.table.bottomFrozenRowCount > 0 && row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount ? null === (_e = this.bottomFrozenGroup.getColGroup(col)) || void 0 === _e ? void 0 : _e.getRowGroup(row) : null === (_f = this.getColGroup(col, row < this.frozenRowCount)) || void 0 === _f ? void 0 : _f.getRowGroup(row),
|
|
281
200
|
cell && "shadow-cell" === cell.role && !getShadow) {
|
|
282
201
|
const range = this.table.getCellRange(col, row);
|
|
283
202
|
range.start.col === col && range.start.row === row || (cell = this.getCell(range.start.col, range.start.row));
|
|
@@ -295,6 +214,15 @@ export class Scenegraph {
|
|
|
295
214
|
getColGroupInBottom(col) {
|
|
296
215
|
if (this.table.bottomFrozenRowCount > 0) return this.bottomFrozenGroup.getColGroup(col);
|
|
297
216
|
}
|
|
217
|
+
getColGroupInLeftBottomCorner(col) {
|
|
218
|
+
if (this.table.bottomFrozenRowCount > 0) return this.leftBottomCornerGroup.getColGroup(col);
|
|
219
|
+
}
|
|
220
|
+
getColGroupInRightTopCorner(col) {
|
|
221
|
+
if (this.table.rightFrozenColCount > 0) return this.rightTopCornerGroup.getColGroup(col);
|
|
222
|
+
}
|
|
223
|
+
getColGroupInRightBottomCorner(col) {
|
|
224
|
+
if (this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0) return this.rightBottomCornerGroup.getColGroup(col);
|
|
225
|
+
}
|
|
298
226
|
getCellSize(col, row) {
|
|
299
227
|
const cell = this.getCell(col, row), mergeInfo = getCellMergeInfo(this.table, col, row);
|
|
300
228
|
let width = cell.attribute.width, height = cell.attribute.height;
|
|
@@ -439,28 +367,28 @@ export class Scenegraph {
|
|
|
439
367
|
updateTableSize() {
|
|
440
368
|
var _a, _b;
|
|
441
369
|
this.tableGroup.setAttributes({
|
|
442
|
-
width: Math.min(this.table.tableNoFrameWidth, Math.max(this.colHeaderGroup.attribute.width, this.bodyGroup.attribute.width, 0) + Math.max(this.cornerHeaderGroup.attribute.width, this.rowHeaderGroup.attribute.width, 0) + this.
|
|
370
|
+
width: Math.min(this.table.tableNoFrameWidth, Math.max(this.colHeaderGroup.attribute.width, this.bodyGroup.attribute.width, 0) + Math.max(this.cornerHeaderGroup.attribute.width, this.rowHeaderGroup.attribute.width, 0) + this.rightBottomCornerGroup.attribute.width),
|
|
443
371
|
height: Math.min(this.table.tableNoFrameHeight, (null !== (_a = this.colHeaderGroup.attribute.height) && void 0 !== _a ? _a : 0) + (null !== (_b = this.bodyGroup.attribute.height) && void 0 !== _b ? _b : 0) + this.bottomFrozenGroup.attribute.height)
|
|
444
372
|
}), this.tableGroup.border && this.tableGroup.border.setAttributes({
|
|
445
373
|
width: this.tableGroup.attribute.width + this.tableGroup.border.attribute.lineWidth,
|
|
446
374
|
height: this.tableGroup.attribute.height + this.tableGroup.border.attribute.lineWidth
|
|
447
375
|
}), this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenGroup.setAttribute("y", this.tableGroup.attribute.height - this.bottomFrozenGroup.attribute.height),
|
|
448
|
-
this.
|
|
376
|
+
this.leftBottomCornerGroup.setAttributes({
|
|
449
377
|
visible: !0,
|
|
450
378
|
y: this.tableGroup.attribute.height - this.bottomFrozenGroup.attribute.height,
|
|
451
379
|
height: this.bottomFrozenGroup.attribute.height,
|
|
452
380
|
width: this.table.getFrozenColsWidth()
|
|
453
|
-
}), this.
|
|
381
|
+
}), this.rightBottomCornerGroup.setAttributes({
|
|
454
382
|
visible: !0,
|
|
455
383
|
y: this.tableGroup.attribute.height - this.bottomFrozenGroup.attribute.height,
|
|
456
384
|
height: this.bottomFrozenGroup.attribute.height
|
|
457
385
|
})), this.table.rightFrozenColCount > 0 && (this.rightFrozenGroup.setAttribute("x", this.tableGroup.attribute.width - this.rightFrozenGroup.attribute.width),
|
|
458
|
-
this.
|
|
386
|
+
this.rightTopCornerGroup.setAttributes({
|
|
459
387
|
visible: !0,
|
|
460
388
|
x: this.tableGroup.attribute.width - this.rightFrozenGroup.attribute.width,
|
|
461
389
|
width: this.rightFrozenGroup.attribute.width,
|
|
462
390
|
height: this.table.getFrozenRowsHeight()
|
|
463
|
-
}), this.
|
|
391
|
+
}), this.rightBottomCornerGroup.setAttributes({
|
|
464
392
|
visible: !0,
|
|
465
393
|
x: this.tableGroup.attribute.width - this.rightFrozenGroup.attribute.width,
|
|
466
394
|
width: this.rightFrozenGroup.attribute.width
|
|
@@ -476,8 +404,9 @@ export class Scenegraph {
|
|
|
476
404
|
this.updateNextFrame();
|
|
477
405
|
}
|
|
478
406
|
updateContainerHeight(row, detaY) {
|
|
479
|
-
row < this.frozenRowCount ? (this.colHeaderGroup.setDeltaHeight(detaY), this.cornerHeaderGroup.setDeltaHeight(detaY),
|
|
480
|
-
this.rowHeaderGroup.setDeltaY(detaY), this.bodyGroup.setDeltaY(detaY)) : (this.
|
|
407
|
+
row < this.table.frozenRowCount ? (this.colHeaderGroup.setDeltaHeight(detaY), this.cornerHeaderGroup.setDeltaHeight(detaY),
|
|
408
|
+
this.rowHeaderGroup.setDeltaY(detaY), this.bodyGroup.setDeltaY(detaY)) : row >= this.table.rowCount - this.table.bottomFrozenRowCount ? (this.leftBottomCornerGroup.setDeltaHeight(detaY),
|
|
409
|
+
this.bottomFrozenGroup.setDeltaHeight(detaY), this.rightBottomCornerGroup.setDeltaHeight(detaY)) : (this.rowHeaderGroup.setDeltaHeight(detaY),
|
|
481
410
|
this.bodyGroup.setDeltaHeight(detaY)), this.updateTableSize(), this.component.updateScrollBar(),
|
|
482
411
|
this.updateNextFrame();
|
|
483
412
|
}
|
|
@@ -665,6 +594,12 @@ export class Scenegraph {
|
|
|
665
594
|
updateFrozen() {
|
|
666
595
|
this.clear || (this.resetFrozen(), this.dealFrozen(), this.component.updateScrollBar());
|
|
667
596
|
}
|
|
597
|
+
dealWidthRightFrozen(rightFrozenColCount) {
|
|
598
|
+
this.clear ? this.table.internalProps.rightFrozenColCount = rightFrozenColCount : dealRightFrozen(rightFrozenColCount, this);
|
|
599
|
+
}
|
|
600
|
+
dealWidthBottomFrozen(bottomFrozenRowCount) {
|
|
601
|
+
this.clear ? this.table.internalProps.bottomFrozenRowCount = bottomFrozenRowCount : dealBottomFrozen(bottomFrozenRowCount, this);
|
|
602
|
+
}
|
|
668
603
|
updateBorderSizeAndPosition() {
|
|
669
604
|
this.bodyGroup.border && (this.bodyGroup.appendChild(this.bodyGroup.border), updateFrameBorderSize(this.bodyGroup),
|
|
670
605
|
0 === this.rowHeaderGroup.attribute.width ? updateFrameBorder(this.bodyGroup, this.table.theme.bodyStyle.frameStyle, [ !0, !0, !0, !0 ]) : updateFrameBorder(this.bodyGroup, this.table.theme.bodyStyle.frameStyle, [ !0, !0, !0, !1 ])),
|