@visactor/vtable 1.18.7 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ListTable.d.ts +3 -1
- package/cjs/ListTable.js +4 -4
- package/cjs/ListTable.js.map +1 -1
- package/cjs/body-helper/style/ButtonStyle.d.ts +1 -1
- package/cjs/body-helper/style/ButtonStyle.js +2 -2
- package/cjs/body-helper/style/ButtonStyle.js.map +1 -1
- package/cjs/body-helper/style/SwitchStyle.d.ts +1 -1
- package/cjs/body-helper/style/SwitchStyle.js +2 -2
- package/cjs/body-helper/style/SwitchStyle.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +12 -0
- package/cjs/core/BaseTable.js +68 -32
- package/cjs/core/BaseTable.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/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +4 -4
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +22 -17
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +9 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/vrender.d.ts +3 -3
- package/cjs/vrender.js +4 -21
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +4327 -3558
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +3 -1
- package/es/ListTable.js +2 -1
- package/es/ListTable.js.map +1 -1
- package/es/body-helper/style/ButtonStyle.d.ts +1 -1
- package/es/body-helper/style/ButtonStyle.js +1 -1
- package/es/body-helper/style/ButtonStyle.js.map +1 -1
- package/es/body-helper/style/SwitchStyle.d.ts +1 -1
- package/es/body-helper/style/SwitchStyle.js +1 -1
- package/es/body-helper/style/SwitchStyle.js.map +1 -1
- package/es/core/BaseTable.d.ts +12 -0
- package/es/core/BaseTable.js +68 -32
- package/es/core/BaseTable.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/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +1 -1
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +4 -4
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/es/scenegraph/scenegraph.js +22 -17
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/ts-types/base-table.d.ts +9 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/vrender.d.ts +3 -3
- package/es/vrender.js +2 -4
- package/es/vrender.js.map +1 -1
- package/package.json +7 -6
|
@@ -5,14 +5,14 @@ import { computeRowsHeight } from "../../layout/compute-row-height";
|
|
|
5
5
|
import { createColGroup } from "../column";
|
|
6
6
|
|
|
7
7
|
export function createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, proxy) {
|
|
8
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
8
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
9
9
|
const {table: table} = proxy, {leftBottomCornerGroup: leftBottomCornerGroup, rightTopCornerGroup: rightTopCornerGroup, rightBottomCornerGroup: rightBottomCornerGroup} = table.scenegraph;
|
|
10
10
|
let distCol, distRow, distColForCompute, distRowForCompute;
|
|
11
11
|
proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode || table.isAutoRowHeight(table.columnHeaderLevelCount)) ? (distColForCompute = table.colCount - 1,
|
|
12
12
|
distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1)) : distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1),
|
|
13
13
|
"adaptive" === table.heightMode ? (distRowForCompute = table.rowCount - 1, distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1)) : distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1),
|
|
14
14
|
0 === table.internalProps._widthResizedColMap.size && computeColsWidth(table, 0, null != distColForCompute ? distColForCompute : distCol),
|
|
15
|
-
0 === table.internalProps._heightResizedRowMap.size && computeRowsHeight(table, 0, "auto" === table.options.canvasHeight ? table.rowCount - 1 : null != distRowForCompute ? distRowForCompute : distRow),
|
|
15
|
+
0 === table.internalProps._heightResizedRowMap.size && computeRowsHeight(table, 0, "auto" === table.options.canvasHeight || (null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a.forceComputeAllRowHeight) ? table.rowCount - 1 : null != distRowForCompute ? distRowForCompute : distRow),
|
|
16
16
|
distCol < table.colCount - table.rightFrozenColCount && table.colCount - table.rightFrozenColCount <= table.colCount - 1 && computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1),
|
|
17
17
|
distRow < table.rowCount - table.bottomFrozenRowCount && table.rowCount - table.bottomFrozenRowCount <= table.rowCount - 1 && computeRowsHeight(table, table.rowCount - table.bottomFrozenRowCount, table.rowCount - 1),
|
|
18
18
|
table.scenegraph.colHeaderGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rowHeaderGroup.setAttribute("y", table.getFrozenRowsHeight()),
|
|
@@ -34,9 +34,9 @@ export function createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, row
|
|
|
34
34
|
createColGroup(rightFrozenGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, table.isPivotChart() ? "rowHeader" : "body", table)),
|
|
35
35
|
table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0 && createColGroup(rightBottomCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table),
|
|
36
36
|
distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bodyGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "body", table),
|
|
37
|
-
bodyGroup.firstChild || colHeaderGroup.firstChild || cornerHeaderGroup.firstChild || rowHeaderGroup.firstChild ? (proxy.currentRow = null !== (
|
|
37
|
+
bodyGroup.firstChild || colHeaderGroup.firstChild || cornerHeaderGroup.firstChild || rowHeaderGroup.firstChild ? (proxy.currentRow = null !== (_e = null !== (_c = null === (_b = bodyGroup.firstChild) || void 0 === _b ? void 0 : _b.rowNumber) && void 0 !== _c ? _c : null === (_d = rowHeaderGroup.firstChild) || void 0 === _d ? void 0 : _d.rowNumber) && void 0 !== _e ? _e : proxy.totalRow,
|
|
38
38
|
proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2),
|
|
39
|
-
proxy.currentCol = null !== (
|
|
39
|
+
proxy.currentCol = null !== (_o = null !== (_l = null !== (_j = null !== (_g = null === (_f = bodyGroup.lastChild) || void 0 === _f ? void 0 : _f.col) && void 0 !== _g ? _g : null === (_h = colHeaderGroup.lastChild) || void 0 === _h ? void 0 : _h.col) && void 0 !== _j ? _j : null === (_k = rowHeaderGroup.lastChild) || void 0 === _k ? void 0 : _k.col) && void 0 !== _l ? _l : null === (_m = cornerHeaderGroup.lastChild) || void 0 === _m ? void 0 : _m.col) && void 0 !== _o ? _o : proxy.totalCol,
|
|
40
40
|
proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2),
|
|
41
41
|
proxy.progress()) : (proxy.currentRow = proxy.totalRow, proxy.rowEnd = proxy.currentRow,
|
|
42
42
|
proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/group-creater/progress/create-group-for-first-screen.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3C,MAAM,UAAU,yBAAyB,CACvC,iBAAwB,EACxB,cAAqB,EACrB,cAAqB,EACrB,gBAAuB,EACvB,iBAAwB,EACxB,SAAgB,EAChB,OAAe,EACf,OAAe,EACf,KAAiB;;IAEjB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IACxB,MAAM,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC;IAGhG,KAAK,CAAC,eAAe,EAAE,CAAC;IACxB,KAAK,CAAC,kBAAkB,EAAE,CAAC;IAE3B,IAAI,OAAO,CAAC;IACZ,IAAI,OAAO,CAAC;IACZ,IAAI,iBAAiB,CAAC;IACtB,IAAI,iBAAiB,CAAC;IACtB,IACE,KAAK,CAAC,SAAS,KAAK,UAAU;QAC9B,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY;YACzB,CAAC,KAAK,CAAC,UAAU,KAAK,UAAU,IAAI,KAAK,CAAC,eAAe,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAC3F;QAIA,iBAAiB,GAAG,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC;QACvC,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,mBAAmB,GAA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F;SAAM;QACL,KAAK,CAAC,UAAU;YACd,MAAA,MAAA,MAAC,SAAS,CAAC,UAAoB,0CAAE,SAAS,mCAAI,MAAC,cAAc,CAAC,UAAoB,0CAAE,SAAS,mCAAI,KAAK,CAAC,QAAQ,CAAC;QAClH,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC;QAChC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QACtC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;QAEtF,KAAK,CAAC,UAAU;YACd,MAAA,MAAA,MAAA,MAAA,MAAC,SAAS,CAAC,SAAmB,0CAAE,GAAG,mCACnC,MAAC,cAAc,CAAC,SAAmB,0CAAE,GAAG,mCACxC,MAAC,cAAc,CAAC,SAAmB,0CAAE,GAAG,mCACxC,MAAC,iBAAiB,CAAC,SAAmB,0CAAE,GAAG,mCAC3C,KAAK,CAAC,QAAQ,CAAC;QACjB,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC;QAChC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QACtC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;QAGtF,KAAK,CAAC,QAAQ,EAAE,CAAC;KAClB;AACH,CAAC","file":"create-group-for-first-screen.js","sourcesContent":["import type { ListTable } from '../../../ListTable';\nimport { ListTableAPI } from '../../../ts-types';\nimport type { Group } from '../../graphic/group';\nimport { computeColsWidth } from '../../layout/compute-col-width';\nimport { computeRowsHeight } from '../../layout/compute-row-height';\nimport { createColGroup } from '../column';\nimport type { SceneProxy } from './proxy';\n\nexport function createGroupForFirstScreen(\n cornerHeaderGroup: Group,\n colHeaderGroup: Group,\n rowHeaderGroup: Group,\n rightFrozenGroup: Group,\n bottomFrozenGroup: Group,\n bodyGroup: Group,\n xOrigin: number,\n yOrigin: number,\n proxy: SceneProxy\n) {\n const { table } = proxy;\n const { leftBottomCornerGroup, rightTopCornerGroup, rightBottomCornerGroup } = table.scenegraph;\n\n // compute parameters\n proxy.setParamsForRow();\n proxy.setParamsForColumn();\n\n let distCol;\n let distRow;\n let distColForCompute;\n let distRowForCompute;\n if (\n table.widthMode === 'adaptive' ||\n (table.options.autoWrapText &&\n (table.heightMode === 'adaptive' || table.isAutoRowHeight(table.columnHeaderLevelCount)))\n ) {\n // distCol = table.colCount - 1;\n // proxy.colEnd = distCol;\n\n distColForCompute = table.colCount - 1;\n distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1);\n } else {\n distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1);\n }\n if (table.heightMode === 'adaptive') {\n // distRow = table.rowCount - 1;\n // proxy.rowEnd = distRow;\n\n distRowForCompute = table.rowCount - 1;\n distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1);\n } else {\n distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1);\n }\n if (table.internalProps._widthResizedColMap.size === 0) {\n // compute colums width in first screen\n computeColsWidth(table, 0, distColForCompute ?? distCol);\n }\n\n if (table.internalProps._heightResizedRowMap.size === 0) {\n // compute rows height in first screen\n computeRowsHeight(\n table,\n 0,\n table.options.canvasHeight === 'auto' ? table.rowCount - 1 : distRowForCompute ?? distRow\n ); //如果配置了 canvasHeight为 'auto', 则一次性将所有行高都计算出来才能满足后续赋值表格高度的使用\n }\n\n if (distCol < table.colCount - table.rightFrozenColCount) {\n // compute right frozen row height\n if (table.colCount - table.rightFrozenColCount <= table.colCount - 1) {\n computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1);\n }\n }\n if (distRow < table.rowCount - table.bottomFrozenRowCount) {\n // compute bottom frozen row height\n if (table.rowCount - table.bottomFrozenRowCount <= table.rowCount - 1) {\n computeRowsHeight(table, table.rowCount - table.bottomFrozenRowCount, table.rowCount - 1);\n }\n }\n\n // update colHeaderGroup rowHeaderGroup bodyGroup position\n table.scenegraph.colHeaderGroup.setAttribute('x', table.getFrozenColsWidth());\n table.scenegraph.rowHeaderGroup.setAttribute('y', table.getFrozenRowsHeight());\n table.scenegraph.bottomFrozenGroup.setAttribute('x', table.getFrozenColsWidth());\n table.scenegraph.rightFrozenGroup.setAttribute('y', table.getFrozenRowsHeight());\n table.scenegraph.bodyGroup.setAttributes({\n x: table.getFrozenColsWidth(),\n y: table.getFrozenRowsHeight()\n });\n\n // create cornerHeaderGroup\n createColGroup(\n cornerHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.frozenColCount - 1, // colEnd\n 0, // rowStart\n table.frozenRowCount - 1, // rowEnd\n table.isListTable() ? 'columnHeader' : 'cornerHeader', // CellType\n table\n );\n\n // create colHeaderGroup\n distCol - table.rightFrozenColCount >= table.frozenColCount &&\n createColGroup(\n colHeaderGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n // Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n distCol - table.rightFrozenColCount,\n 0, // rowStart\n table.frozenRowCount - 1, // rowEnd\n 'columnHeader', // isHeader\n table\n );\n\n // create rowHeaderGroup\n if (table.frozenColCount > 0) {\n if (table.leftRowSeriesNumberCount > 0) {\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.leftRowSeriesNumberCount - 1, // colEnd\n table.frozenRowCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n 'rowHeader', // isHeader\n table\n );\n }\n if (table.frozenColCount > table.leftRowSeriesNumberCount) {\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n table.leftRowSeriesNumberCount, // colStart\n Math.min(table.frozenColCount - 1, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount - 1), // colEnd\n table.frozenRowCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n 'rowHeader', // isHeader\n table\n );\n }\n if (table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount) {\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, // colStart\n table.frozenColCount - 1, // colEnd\n table.frozenRowCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n 'body',\n table\n );\n }\n }\n\n if (table.bottomFrozenRowCount > 0) {\n // if (!table.isPivotChart()) {\n // create left bottom frozen\n // if (table.rowHeaderLevelCount > 0) {\n // createColGroup(\n // leftBottomCornerGroup,\n // xOrigin,\n // yOrigin,\n // 0, // colStart\n // table.rowHeaderLevelCount - 1, // colEnd\n // table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n // table.rowCount - 1, // rowEnd\n // 'rowHeader', // isHeader\n // table\n // );\n // }\n // if (table.frozenColCount > table.rowHeaderLevelCount) {\n // createColGroup(\n // leftBottomCornerGroup,\n // xOrigin,\n // yOrigin,\n // table.rowHeaderLevelCount, // colStart\n // table.frozenColCount - 1, // colEnd\n // table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n // table.rowCount - 1, // rowEnd\n // 'body',\n // table\n // );\n // }\n\n if (table.frozenColCount > 0) {\n if (table.leftRowSeriesNumberCount > 0) {\n createColGroup(\n leftBottomCornerGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.leftRowSeriesNumberCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n 'rowHeader', // isHeader\n table\n );\n }\n if (table.rowHeaderLevelCount > 0) {\n createColGroup(\n leftBottomCornerGroup,\n xOrigin,\n yOrigin,\n table.leftRowSeriesNumberCount, // colStart\n table.leftRowSeriesNumberCount + table.rowHeaderLevelCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n 'rowHeader', // isHeader\n table\n );\n }\n if (table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount) {\n createColGroup(\n leftBottomCornerGroup,\n xOrigin,\n yOrigin,\n table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, // colStart\n table.frozenColCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n 'body',\n table\n );\n }\n }\n // }\n // create bottomFrozenGroup\n distCol - table.rightFrozenColCount >= table.frozenColCount &&\n createColGroup(\n bottomFrozenGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n // Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n distCol - table.rightFrozenColCount,\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n table.isPivotChart() ? 'rowHeader' : 'body', // isHeader\n table\n );\n }\n\n if (table.rightFrozenColCount > 0) {\n // if (!table.isPivotChart()) {\n // create right top frozen Group\n createColGroup(\n rightTopCornerGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n 0, // rowStart\n table.frozenRowCount - 1, // rowEnd\n 'columnHeader', // isHeader\n table\n );\n // }\n // create rightFrozenGroup\n createColGroup(\n rightFrozenGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n table.frozenRowCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n table.isPivotChart() ? 'rowHeader' : 'body', // isHeader\n table\n );\n }\n\n if (table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0) {\n // create right bottom frozen Group\n createColGroup(\n rightBottomCornerGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n 'body', // isHeader\n table\n );\n }\n\n // create bodyGroup\n distCol - table.rightFrozenColCount >= table.frozenColCount &&\n createColGroup(\n bodyGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n // Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n distCol - table.rightFrozenColCount,\n table.frozenRowCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n 'body', // isHeader\n table\n );\n\n // update progress information\n if (\n !bodyGroup.firstChild &&\n !colHeaderGroup.firstChild &&\n !cornerHeaderGroup.firstChild &&\n !rowHeaderGroup.firstChild\n ) {\n // 无数据\n proxy.currentRow = proxy.totalRow;\n proxy.rowEnd = proxy.currentRow;\n proxy.rowUpdatePos = proxy.rowEnd + 1;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n\n proxy.currentCol = proxy.totalCol;\n proxy.colEnd = proxy.currentCol;\n proxy.colUpdatePos = proxy.colEnd + 1;\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n } else {\n proxy.currentRow =\n (bodyGroup.firstChild as Group)?.rowNumber ?? (rowHeaderGroup.firstChild as Group)?.rowNumber ?? proxy.totalRow;\n proxy.rowEnd = proxy.currentRow;\n proxy.rowUpdatePos = proxy.rowEnd + 1;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n\n proxy.currentCol =\n (bodyGroup.lastChild as Group)?.col ??\n (colHeaderGroup.lastChild as Group)?.col ??\n (rowHeaderGroup.lastChild as Group)?.col ??\n (cornerHeaderGroup.lastChild as Group)?.col ??\n proxy.totalCol;\n proxy.colEnd = proxy.currentCol;\n proxy.colUpdatePos = proxy.colEnd + 1;\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n\n // 开始异步任务\n proxy.progress();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/scenegraph/group-creater/progress/create-group-for-first-screen.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3C,MAAM,UAAU,yBAAyB,CACvC,iBAAwB,EACxB,cAAqB,EACrB,cAAqB,EACrB,gBAAuB,EACvB,iBAAwB,EACxB,SAAgB,EAChB,OAAe,EACf,OAAe,EACf,KAAiB;;IAEjB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IACxB,MAAM,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC;IAGhG,KAAK,CAAC,eAAe,EAAE,CAAC;IACxB,KAAK,CAAC,kBAAkB,EAAE,CAAC;IAE3B,IAAI,OAAO,CAAC;IACZ,IAAI,OAAO,CAAC;IACZ,IAAI,iBAAiB,CAAC;IACtB,IAAI,iBAAiB,CAAC;IACtB,IACE,KAAK,CAAC,SAAS,KAAK,UAAU;QAC9B,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY;YACzB,CAAC,KAAK,CAAC,UAAU,KAAK,UAAU,IA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CAAC,CAAC,CAAC;QAGtF,KAAK,CAAC,QAAQ,EAAE,CAAC;KAClB;AACH,CAAC","file":"create-group-for-first-screen.js","sourcesContent":["import type { ListTable } from '../../../ListTable';\nimport { ListTableAPI } from '../../../ts-types';\nimport type { Group } from '../../graphic/group';\nimport { computeColsWidth } from '../../layout/compute-col-width';\nimport { computeRowsHeight } from '../../layout/compute-row-height';\nimport { createColGroup } from '../column';\nimport type { SceneProxy } from './proxy';\n\nexport function createGroupForFirstScreen(\n cornerHeaderGroup: Group,\n colHeaderGroup: Group,\n rowHeaderGroup: Group,\n rightFrozenGroup: Group,\n bottomFrozenGroup: Group,\n bodyGroup: Group,\n xOrigin: number,\n yOrigin: number,\n proxy: SceneProxy\n) {\n const { table } = proxy;\n const { leftBottomCornerGroup, rightTopCornerGroup, rightBottomCornerGroup } = table.scenegraph;\n\n // compute parameters\n proxy.setParamsForRow();\n proxy.setParamsForColumn();\n\n let distCol;\n let distRow;\n let distColForCompute;\n let distRowForCompute;\n if (\n table.widthMode === 'adaptive' ||\n (table.options.autoWrapText &&\n (table.heightMode === 'adaptive' || table.isAutoRowHeight(table.columnHeaderLevelCount)))\n ) {\n // distCol = table.colCount - 1;\n // proxy.colEnd = distCol;\n\n distColForCompute = table.colCount - 1;\n distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1);\n } else {\n distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1);\n }\n if (table.heightMode === 'adaptive') {\n // distRow = table.rowCount - 1;\n // proxy.rowEnd = distRow;\n\n distRowForCompute = table.rowCount - 1;\n distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1);\n } else {\n distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1);\n }\n if (table.internalProps._widthResizedColMap.size === 0) {\n // compute colums width in first screen\n computeColsWidth(table, 0, distColForCompute ?? distCol);\n }\n\n if (table.internalProps._heightResizedRowMap.size === 0) {\n // compute rows height in first screen\n computeRowsHeight(\n table,\n 0,\n table.options.canvasHeight === 'auto' || table.options.customConfig?.forceComputeAllRowHeight\n ? table.rowCount - 1\n : distRowForCompute ?? distRow\n ); //如果配置了 canvasHeight为 'auto', 则一次性将所有行高都计算出来才能满足后续赋值表格高度的使用\n }\n\n if (distCol < table.colCount - table.rightFrozenColCount) {\n // compute right frozen row height\n if (table.colCount - table.rightFrozenColCount <= table.colCount - 1) {\n computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1);\n }\n }\n if (distRow < table.rowCount - table.bottomFrozenRowCount) {\n // compute bottom frozen row height\n if (table.rowCount - table.bottomFrozenRowCount <= table.rowCount - 1) {\n computeRowsHeight(table, table.rowCount - table.bottomFrozenRowCount, table.rowCount - 1);\n }\n }\n\n // update colHeaderGroup rowHeaderGroup bodyGroup position\n table.scenegraph.colHeaderGroup.setAttribute('x', table.getFrozenColsWidth());\n table.scenegraph.rowHeaderGroup.setAttribute('y', table.getFrozenRowsHeight());\n table.scenegraph.bottomFrozenGroup.setAttribute('x', table.getFrozenColsWidth());\n table.scenegraph.rightFrozenGroup.setAttribute('y', table.getFrozenRowsHeight());\n table.scenegraph.bodyGroup.setAttributes({\n x: table.getFrozenColsWidth(),\n y: table.getFrozenRowsHeight()\n });\n\n // create cornerHeaderGroup\n createColGroup(\n cornerHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.frozenColCount - 1, // colEnd\n 0, // rowStart\n table.frozenRowCount - 1, // rowEnd\n table.isListTable() ? 'columnHeader' : 'cornerHeader', // CellType\n table\n );\n\n // create colHeaderGroup\n distCol - table.rightFrozenColCount >= table.frozenColCount &&\n createColGroup(\n colHeaderGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n // Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n distCol - table.rightFrozenColCount,\n 0, // rowStart\n table.frozenRowCount - 1, // rowEnd\n 'columnHeader', // isHeader\n table\n );\n\n // create rowHeaderGroup\n if (table.frozenColCount > 0) {\n if (table.leftRowSeriesNumberCount > 0) {\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.leftRowSeriesNumberCount - 1, // colEnd\n table.frozenRowCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n 'rowHeader', // isHeader\n table\n );\n }\n if (table.frozenColCount > table.leftRowSeriesNumberCount) {\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n table.leftRowSeriesNumberCount, // colStart\n Math.min(table.frozenColCount - 1, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount - 1), // colEnd\n table.frozenRowCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n 'rowHeader', // isHeader\n table\n );\n }\n if (table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount) {\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, // colStart\n table.frozenColCount - 1, // colEnd\n table.frozenRowCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n 'body',\n table\n );\n }\n }\n\n if (table.bottomFrozenRowCount > 0) {\n // if (!table.isPivotChart()) {\n // create left bottom frozen\n // if (table.rowHeaderLevelCount > 0) {\n // createColGroup(\n // leftBottomCornerGroup,\n // xOrigin,\n // yOrigin,\n // 0, // colStart\n // table.rowHeaderLevelCount - 1, // colEnd\n // table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n // table.rowCount - 1, // rowEnd\n // 'rowHeader', // isHeader\n // table\n // );\n // }\n // if (table.frozenColCount > table.rowHeaderLevelCount) {\n // createColGroup(\n // leftBottomCornerGroup,\n // xOrigin,\n // yOrigin,\n // table.rowHeaderLevelCount, // colStart\n // table.frozenColCount - 1, // colEnd\n // table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n // table.rowCount - 1, // rowEnd\n // 'body',\n // table\n // );\n // }\n\n if (table.frozenColCount > 0) {\n if (table.leftRowSeriesNumberCount > 0) {\n createColGroup(\n leftBottomCornerGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.leftRowSeriesNumberCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n 'rowHeader', // isHeader\n table\n );\n }\n if (table.rowHeaderLevelCount > 0) {\n createColGroup(\n leftBottomCornerGroup,\n xOrigin,\n yOrigin,\n table.leftRowSeriesNumberCount, // colStart\n table.leftRowSeriesNumberCount + table.rowHeaderLevelCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n 'rowHeader', // isHeader\n table\n );\n }\n if (table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount) {\n createColGroup(\n leftBottomCornerGroup,\n xOrigin,\n yOrigin,\n table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, // colStart\n table.frozenColCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n 'body',\n table\n );\n }\n }\n // }\n // create bottomFrozenGroup\n distCol - table.rightFrozenColCount >= table.frozenColCount &&\n createColGroup(\n bottomFrozenGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n // Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n distCol - table.rightFrozenColCount,\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n table.isPivotChart() ? 'rowHeader' : 'body', // isHeader\n table\n );\n }\n\n if (table.rightFrozenColCount > 0) {\n // if (!table.isPivotChart()) {\n // create right top frozen Group\n createColGroup(\n rightTopCornerGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n 0, // rowStart\n table.frozenRowCount - 1, // rowEnd\n 'columnHeader', // isHeader\n table\n );\n // }\n // create rightFrozenGroup\n createColGroup(\n rightFrozenGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n table.frozenRowCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n table.isPivotChart() ? 'rowHeader' : 'body', // isHeader\n table\n );\n }\n\n if (table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0) {\n // create right bottom frozen Group\n createColGroup(\n rightBottomCornerGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n 'body', // isHeader\n table\n );\n }\n\n // create bodyGroup\n distCol - table.rightFrozenColCount >= table.frozenColCount &&\n createColGroup(\n bodyGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n // Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n distCol - table.rightFrozenColCount,\n table.frozenRowCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n 'body', // isHeader\n table\n );\n\n // update progress information\n if (\n !bodyGroup.firstChild &&\n !colHeaderGroup.firstChild &&\n !cornerHeaderGroup.firstChild &&\n !rowHeaderGroup.firstChild\n ) {\n // 无数据\n proxy.currentRow = proxy.totalRow;\n proxy.rowEnd = proxy.currentRow;\n proxy.rowUpdatePos = proxy.rowEnd + 1;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n\n proxy.currentCol = proxy.totalCol;\n proxy.colEnd = proxy.currentCol;\n proxy.colUpdatePos = proxy.colEnd + 1;\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n } else {\n proxy.currentRow =\n (bodyGroup.firstChild as Group)?.rowNumber ?? (rowHeaderGroup.firstChild as Group)?.rowNumber ?? proxy.totalRow;\n proxy.rowEnd = proxy.currentRow;\n proxy.rowUpdatePos = proxy.rowEnd + 1;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n\n proxy.currentCol =\n (bodyGroup.lastChild as Group)?.col ??\n (colHeaderGroup.lastChild as Group)?.col ??\n (rowHeaderGroup.lastChild as Group)?.col ??\n (cornerHeaderGroup.lastChild as Group)?.col ??\n proxy.totalCol;\n proxy.colEnd = proxy.currentCol;\n proxy.colUpdatePos = proxy.colEnd + 1;\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n\n // 开始异步任务\n proxy.progress();\n }\n}\n"]}
|
|
@@ -456,30 +456,35 @@ export class Scenegraph {
|
|
|
456
456
|
computeRowsHeight(table, this.proxy.rowStart, this.proxy.rowEnd, !0, !0));
|
|
457
457
|
}
|
|
458
458
|
resize() {
|
|
459
|
+
var _a, _b;
|
|
459
460
|
this.proxy.resize(), ("adaptive" === this.table.widthMode || this.table.autoFillWidth) && (0 === this.table.internalProps._widthResizedColMap.size ? this.recalculateColWidths() : this.dealWidthMode()),
|
|
460
461
|
"adaptive" === this.table.heightMode ? 0 === this.table.internalProps._heightResizedRowMap.size ? this.recalculateRowHeights() : this.dealHeightMode() : this.table.autoFillHeight && this.dealHeightMode(),
|
|
461
462
|
this.resetFrozen(), this.updateTableSize(), this.updateBorderSizeAndPosition(),
|
|
462
|
-
this.component.updateScrollBar(), ("adaptive" === this.table.widthMode || "adaptive" === this.table.heightMode || this.table.autoFillWidth || this.table.autoFillHeight) && this.updateChartSizeForResizeColWidth(-1),
|
|
463
|
+
this.component.updateScrollBar(), ("adaptive" === this.table.widthMode || "adaptive" === this.table.heightMode || this.table.autoFillWidth || this.table.autoFillHeight || (null === (_a = this.table.containerFit) || void 0 === _a ? void 0 : _a.width) || (null === (_b = this.table.containerFit) || void 0 === _b ? void 0 : _b.height)) && this.updateChartSizeForResizeColWidth(-1),
|
|
463
464
|
this.proxy.progress(), this.updateNextFrame();
|
|
464
465
|
}
|
|
465
466
|
updateTableSize() {
|
|
466
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
467
|
-
|
|
467
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
468
|
+
const contentWidth = Math.max(this.colHeaderGroup.attribute.width, this.bodyGroup.attribute.width, this.bottomFrozenGroup.attribute.width, 0) + Math.max(this.cornerHeaderGroup.attribute.width, this.rowHeaderGroup.attribute.width, this.leftBottomCornerGroup.attribute.width, 0) + Math.max(this.rightTopCornerGroup.attribute.width, this.rightFrozenGroup.attribute.width, this.rightBottomCornerGroup.attribute.width, 0), contentHeight = Math.max(this.colHeaderGroup.attribute.height, this.cornerHeaderGroup.attribute.height, this.rightTopCornerGroup.attribute.height, 0) + Math.max(this.rowHeaderGroup.attribute.height, this.bodyGroup.attribute.height, this.rightFrozenGroup.attribute.height, 0) + Math.max(this.leftBottomCornerGroup.attribute.height, this.bottomFrozenGroup.attribute.height, this.rightBottomCornerGroup.attribute.height, 0);
|
|
469
|
+
let tableWidth = contentWidth, tableHeight = contentHeight;
|
|
470
|
+
if (tableWidth = (null === (_a = this.table.containerFit) || void 0 === _a ? void 0 : _a.width) ? this.table.tableNoFrameWidth : Math.min(this.table.tableNoFrameWidth, contentWidth),
|
|
471
|
+
tableHeight = (null === (_b = this.table.containerFit) || void 0 === _b ? void 0 : _b.height) ? this.table.tableNoFrameHeight : Math.min(this.table.tableNoFrameHeight, contentHeight),
|
|
472
|
+
this.tableGroup.setAttributes({
|
|
468
473
|
x: this.table.tableX,
|
|
469
474
|
y: this.table.tableY,
|
|
470
|
-
width:
|
|
471
|
-
height:
|
|
475
|
+
width: tableWidth,
|
|
476
|
+
height: tableHeight
|
|
472
477
|
}), this.tableGroup.border) {
|
|
473
|
-
const rectAttributes = null === (
|
|
478
|
+
const rectAttributes = null === (_c = this.tableGroup.border) || void 0 === _c ? void 0 : _c.attribute;
|
|
474
479
|
let borderTop, borderRight, borderBottom, borderLeft;
|
|
475
|
-
(null == rectAttributes ? void 0 : rectAttributes.strokeArrayWidth) ? (borderTop = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[0] : null !== (
|
|
476
|
-
borderRight = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[1] : null !== (
|
|
477
|
-
borderBottom = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[2] : null !== (
|
|
478
|
-
borderLeft = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[3] : null !== (
|
|
479
|
-
borderRight = null !== (
|
|
480
|
-
borderBottom = null !== (
|
|
481
|
-
borderLeft = null !== (
|
|
482
|
-
"rect" === this.tableGroup.border.type ? (null === (
|
|
480
|
+
(null == rectAttributes ? void 0 : rectAttributes.strokeArrayWidth) ? (borderTop = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[0] : null !== (_d = rectAttributes.lineWidth) && void 0 !== _d ? _d : 0,
|
|
481
|
+
borderRight = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[1] : null !== (_e = rectAttributes.lineWidth) && void 0 !== _e ? _e : 0,
|
|
482
|
+
borderBottom = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[2] : null !== (_f = rectAttributes.lineWidth) && void 0 !== _f ? _f : 0,
|
|
483
|
+
borderLeft = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[3] : null !== (_g = rectAttributes.lineWidth) && void 0 !== _g ? _g : 0) : (borderTop = null !== (_h = null == rectAttributes ? void 0 : rectAttributes.lineWidth) && void 0 !== _h ? _h : 0,
|
|
484
|
+
borderRight = null !== (_j = null == rectAttributes ? void 0 : rectAttributes.lineWidth) && void 0 !== _j ? _j : 0,
|
|
485
|
+
borderBottom = null !== (_k = null == rectAttributes ? void 0 : rectAttributes.lineWidth) && void 0 !== _k ? _k : 0,
|
|
486
|
+
borderLeft = null !== (_l = null == rectAttributes ? void 0 : rectAttributes.lineWidth) && void 0 !== _l ? _l : 0),
|
|
487
|
+
"rect" === this.tableGroup.border.type ? (null === (_m = this.table.theme.frameStyle) || void 0 === _m ? void 0 : _m.innerBorder) ? this.tableGroup.border.setAttributes({
|
|
483
488
|
x: this.table.tableX + borderLeft / 2,
|
|
484
489
|
y: this.table.tableY + borderTop / 2,
|
|
485
490
|
width: this.tableGroup.attribute.width - borderLeft / 2 - borderRight / 2,
|
|
@@ -489,12 +494,12 @@ export class Scenegraph {
|
|
|
489
494
|
y: this.table.tableY - borderTop / 2,
|
|
490
495
|
width: this.tableGroup.attribute.width + borderLeft / 2 + borderRight / 2,
|
|
491
496
|
height: this.tableGroup.attribute.height + borderTop / 2 + borderBottom / 2
|
|
492
|
-
}) : "group" === this.tableGroup.border.type && ((null === (
|
|
497
|
+
}) : "group" === this.tableGroup.border.type && ((null === (_o = this.table.theme.frameStyle) || void 0 === _o ? void 0 : _o.innerBorder) ? (this.tableGroup.border.setAttributes({
|
|
493
498
|
x: this.table.tableX + borderLeft / 2,
|
|
494
499
|
y: this.table.tableY + borderTop / 2,
|
|
495
500
|
width: this.tableGroup.attribute.width - borderLeft / 2 - borderRight / 2,
|
|
496
501
|
height: this.tableGroup.attribute.height - borderTop / 2 - borderBottom / 2
|
|
497
|
-
}), null === (
|
|
502
|
+
}), null === (_p = this.tableGroup.border.firstChild) || void 0 === _p || _p.setAttributes({
|
|
498
503
|
x: 0,
|
|
499
504
|
y: 0,
|
|
500
505
|
width: this.tableGroup.attribute.width - borderLeft / 2 - borderRight / 2,
|
|
@@ -504,7 +509,7 @@ export class Scenegraph {
|
|
|
504
509
|
y: this.table.tableY - borderTop / 2,
|
|
505
510
|
width: this.tableGroup.attribute.width + borderLeft / 2 + borderRight / 2,
|
|
506
511
|
height: this.tableGroup.attribute.height + borderTop / 2 + borderBottom / 2
|
|
507
|
-
}), null === (
|
|
512
|
+
}), null === (_q = this.tableGroup.border.firstChild) || void 0 === _q || _q.setAttributes({
|
|
508
513
|
x: borderLeft / 2,
|
|
509
514
|
y: borderTop / 2,
|
|
510
515
|
width: this.tableGroup.attribute.width,
|