@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
|
@@ -7,14 +7,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
const compute_col_width_1 = require("../../layout/compute-col-width"), compute_row_height_1 = require("../../layout/compute-row-height"), column_1 = require("../column");
|
|
8
8
|
|
|
9
9
|
function createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, proxy) {
|
|
10
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
10
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
11
11
|
const {table: table} = proxy, {leftBottomCornerGroup: leftBottomCornerGroup, rightTopCornerGroup: rightTopCornerGroup, rightBottomCornerGroup: rightBottomCornerGroup} = table.scenegraph;
|
|
12
12
|
let distCol, distRow, distColForCompute, distRowForCompute;
|
|
13
13
|
proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode || table.isAutoRowHeight(table.columnHeaderLevelCount)) ? (distColForCompute = table.colCount - 1,
|
|
14
14
|
distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1)) : distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1),
|
|
15
15
|
"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),
|
|
16
16
|
0 === table.internalProps._widthResizedColMap.size && (0, compute_col_width_1.computeColsWidth)(table, 0, null != distColForCompute ? distColForCompute : distCol),
|
|
17
|
-
0 === table.internalProps._heightResizedRowMap.size && (0, compute_row_height_1.computeRowsHeight)(table, 0, "auto" === table.options.canvasHeight ? table.rowCount - 1 : null != distRowForCompute ? distRowForCompute : distRow),
|
|
17
|
+
0 === table.internalProps._heightResizedRowMap.size && (0, compute_row_height_1.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),
|
|
18
18
|
distCol < table.colCount - table.rightFrozenColCount && table.colCount - table.rightFrozenColCount <= table.colCount - 1 && (0,
|
|
19
19
|
compute_col_width_1.computeColsWidth)(table, table.colCount - table.rightFrozenColCount, table.colCount - 1),
|
|
20
20
|
distRow < table.rowCount - table.bottomFrozenRowCount && table.rowCount - table.bottomFrozenRowCount <= table.rowCount - 1 && (0,
|
|
@@ -41,9 +41,9 @@ function createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderG
|
|
|
41
41
|
(0, column_1.createColGroup)(rightFrozenGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, table.isPivotChart() ? "rowHeader" : "body", table)),
|
|
42
42
|
table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0 && (0, column_1.createColGroup)(rightBottomCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table),
|
|
43
43
|
distCol - table.rightFrozenColCount >= table.frozenColCount && (0, column_1.createColGroup)(bodyGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "body", table),
|
|
44
|
-
bodyGroup.firstChild || colHeaderGroup.firstChild || cornerHeaderGroup.firstChild || rowHeaderGroup.firstChild ? (proxy.currentRow = null !== (
|
|
44
|
+
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,
|
|
45
45
|
proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2),
|
|
46
|
-
proxy.currentCol = null !== (
|
|
46
|
+
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,
|
|
47
47
|
proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2),
|
|
48
48
|
proxy.progress()) : (proxy.currentRow = proxy.totalRow, proxy.rowEnd = proxy.currentRow,
|
|
49
49
|
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,sEAAkE;AAClE,wEAAoE;AACpE,sCAA2C;AAG3C,SAAgB,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,GAAG,CAAC,EAAE,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;KACvE;SAAM;QACL,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC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AAC;KACvF;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;AArVD,8DAqVC","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,sEAAkE;AAClE,wEAAoE;AACpE,sCAA2C;AAG3C,SAAgB,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,GA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K,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;QAGtF,KAAK,CAAC,QAAQ,EAAE,CAAC;KAClB;AACH,CAAC;AAvVD,8DAuVC","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"]}
|
|
@@ -422,30 +422,35 @@ class Scenegraph {
|
|
|
422
422
|
(0, compute_row_height_1.computeRowsHeight)(table, this.proxy.rowStart, this.proxy.rowEnd, !0, !0));
|
|
423
423
|
}
|
|
424
424
|
resize() {
|
|
425
|
+
var _a, _b;
|
|
425
426
|
this.proxy.resize(), ("adaptive" === this.table.widthMode || this.table.autoFillWidth) && (0 === this.table.internalProps._widthResizedColMap.size ? this.recalculateColWidths() : this.dealWidthMode()),
|
|
426
427
|
"adaptive" === this.table.heightMode ? 0 === this.table.internalProps._heightResizedRowMap.size ? this.recalculateRowHeights() : this.dealHeightMode() : this.table.autoFillHeight && this.dealHeightMode(),
|
|
427
428
|
this.resetFrozen(), this.updateTableSize(), this.updateBorderSizeAndPosition(),
|
|
428
|
-
this.component.updateScrollBar(), ("adaptive" === this.table.widthMode || "adaptive" === this.table.heightMode || this.table.autoFillWidth || this.table.autoFillHeight) && this.updateChartSizeForResizeColWidth(-1),
|
|
429
|
+
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),
|
|
429
430
|
this.proxy.progress(), this.updateNextFrame();
|
|
430
431
|
}
|
|
431
432
|
updateTableSize() {
|
|
432
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
433
|
-
|
|
433
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
434
|
+
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);
|
|
435
|
+
let tableWidth = contentWidth, tableHeight = contentHeight;
|
|
436
|
+
if (tableWidth = (null === (_a = this.table.containerFit) || void 0 === _a ? void 0 : _a.width) ? this.table.tableNoFrameWidth : Math.min(this.table.tableNoFrameWidth, contentWidth),
|
|
437
|
+
tableHeight = (null === (_b = this.table.containerFit) || void 0 === _b ? void 0 : _b.height) ? this.table.tableNoFrameHeight : Math.min(this.table.tableNoFrameHeight, contentHeight),
|
|
438
|
+
this.tableGroup.setAttributes({
|
|
434
439
|
x: this.table.tableX,
|
|
435
440
|
y: this.table.tableY,
|
|
436
|
-
width:
|
|
437
|
-
height:
|
|
441
|
+
width: tableWidth,
|
|
442
|
+
height: tableHeight
|
|
438
443
|
}), this.tableGroup.border) {
|
|
439
|
-
const rectAttributes = null === (
|
|
444
|
+
const rectAttributes = null === (_c = this.tableGroup.border) || void 0 === _c ? void 0 : _c.attribute;
|
|
440
445
|
let borderTop, borderRight, borderBottom, borderLeft;
|
|
441
|
-
(null == rectAttributes ? void 0 : rectAttributes.strokeArrayWidth) ? (borderTop = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[0] : null !== (
|
|
442
|
-
borderRight = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[1] : null !== (
|
|
443
|
-
borderBottom = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[2] : null !== (
|
|
444
|
-
borderLeft = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[3] : null !== (
|
|
445
|
-
borderRight = null !== (
|
|
446
|
-
borderBottom = null !== (
|
|
447
|
-
borderLeft = null !== (
|
|
448
|
-
"rect" === this.tableGroup.border.type ? (null === (
|
|
446
|
+
(null == rectAttributes ? void 0 : rectAttributes.strokeArrayWidth) ? (borderTop = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[0] : null !== (_d = rectAttributes.lineWidth) && void 0 !== _d ? _d : 0,
|
|
447
|
+
borderRight = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[1] : null !== (_e = rectAttributes.lineWidth) && void 0 !== _e ? _e : 0,
|
|
448
|
+
borderBottom = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[2] : null !== (_f = rectAttributes.lineWidth) && void 0 !== _f ? _f : 0,
|
|
449
|
+
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,
|
|
450
|
+
borderRight = null !== (_j = null == rectAttributes ? void 0 : rectAttributes.lineWidth) && void 0 !== _j ? _j : 0,
|
|
451
|
+
borderBottom = null !== (_k = null == rectAttributes ? void 0 : rectAttributes.lineWidth) && void 0 !== _k ? _k : 0,
|
|
452
|
+
borderLeft = null !== (_l = null == rectAttributes ? void 0 : rectAttributes.lineWidth) && void 0 !== _l ? _l : 0),
|
|
453
|
+
"rect" === this.tableGroup.border.type ? (null === (_m = this.table.theme.frameStyle) || void 0 === _m ? void 0 : _m.innerBorder) ? this.tableGroup.border.setAttributes({
|
|
449
454
|
x: this.table.tableX + borderLeft / 2,
|
|
450
455
|
y: this.table.tableY + borderTop / 2,
|
|
451
456
|
width: this.tableGroup.attribute.width - borderLeft / 2 - borderRight / 2,
|
|
@@ -455,12 +460,12 @@ class Scenegraph {
|
|
|
455
460
|
y: this.table.tableY - borderTop / 2,
|
|
456
461
|
width: this.tableGroup.attribute.width + borderLeft / 2 + borderRight / 2,
|
|
457
462
|
height: this.tableGroup.attribute.height + borderTop / 2 + borderBottom / 2
|
|
458
|
-
}) : "group" === this.tableGroup.border.type && ((null === (
|
|
463
|
+
}) : "group" === this.tableGroup.border.type && ((null === (_o = this.table.theme.frameStyle) || void 0 === _o ? void 0 : _o.innerBorder) ? (this.tableGroup.border.setAttributes({
|
|
459
464
|
x: this.table.tableX + borderLeft / 2,
|
|
460
465
|
y: this.table.tableY + borderTop / 2,
|
|
461
466
|
width: this.tableGroup.attribute.width - borderLeft / 2 - borderRight / 2,
|
|
462
467
|
height: this.tableGroup.attribute.height - borderTop / 2 - borderBottom / 2
|
|
463
|
-
}), null === (
|
|
468
|
+
}), null === (_p = this.tableGroup.border.firstChild) || void 0 === _p || _p.setAttributes({
|
|
464
469
|
x: 0,
|
|
465
470
|
y: 0,
|
|
466
471
|
width: this.tableGroup.attribute.width - borderLeft / 2 - borderRight / 2,
|
|
@@ -470,7 +475,7 @@ class Scenegraph {
|
|
|
470
475
|
y: this.table.tableY - borderTop / 2,
|
|
471
476
|
width: this.tableGroup.attribute.width + borderLeft / 2 + borderRight / 2,
|
|
472
477
|
height: this.tableGroup.attribute.height + borderTop / 2 + borderBottom / 2
|
|
473
|
-
}), null === (
|
|
478
|
+
}), null === (_q = this.tableGroup.border.firstChild) || void 0 === _q || _q.setAttributes({
|
|
474
479
|
x: borderLeft / 2,
|
|
475
480
|
y: borderTop / 2,
|
|
476
481
|
width: this.tableGroup.attribute.width,
|