@visactor/vtable 0.18.0-alpha.2 → 0.18.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.
Files changed (127) hide show
  1. package/cjs/ListTable.d.ts +1 -0
  2. package/cjs/ListTable.js +50 -2
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotChart.js +102 -83
  5. package/cjs/PivotChart.js.map +1 -1
  6. package/cjs/core/BaseTable.js +4 -4
  7. package/cjs/core/BaseTable.js.map +1 -1
  8. package/cjs/data/DataSource.d.ts +3 -1
  9. package/cjs/data/DataSource.js +27 -7
  10. package/cjs/data/DataSource.js.map +1 -1
  11. package/cjs/event/pivot-chart/axis-click.js +2 -2
  12. package/cjs/event/pivot-chart/axis-click.js.map +1 -1
  13. package/cjs/index.d.ts +1 -1
  14. package/cjs/index.js +1 -1
  15. package/cjs/index.js.map +1 -1
  16. package/cjs/layout/chart-helper/get-axis-config.js +5 -5
  17. package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
  18. package/cjs/layout/chart-helper/get-chart-spec.d.ts +3 -0
  19. package/cjs/layout/chart-helper/get-chart-spec.js +43 -7
  20. package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
  21. package/cjs/layout/pivot-header-layout.d.ts +4 -3
  22. package/cjs/layout/pivot-header-layout.js +43 -23
  23. package/cjs/layout/pivot-header-layout.js.map +1 -1
  24. package/cjs/scenegraph/component/custom.d.ts +5 -0
  25. package/cjs/scenegraph/component/custom.js +20 -3
  26. package/cjs/scenegraph/component/custom.js.map +1 -1
  27. package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +1 -1
  28. package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
  29. package/cjs/scenegraph/group-creater/cell-helper.d.ts +6 -3
  30. package/cjs/scenegraph/group-creater/cell-helper.js +38 -36
  31. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  32. package/cjs/scenegraph/group-creater/cell-type/text-cell.d.ts +2 -1
  33. package/cjs/scenegraph/group-creater/cell-type/text-cell.js +6 -2
  34. package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  35. package/cjs/scenegraph/group-creater/column-helper.js +11 -7
  36. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  37. package/cjs/scenegraph/group-creater/progress/update-position/sort-horizontal.js +12 -5
  38. package/cjs/scenegraph/group-creater/progress/update-position/sort-horizontal.js.map +1 -1
  39. package/cjs/scenegraph/group-creater/progress/update-position/sort-vertical.js +19 -14
  40. package/cjs/scenegraph/group-creater/progress/update-position/sort-vertical.js.map +1 -1
  41. package/cjs/scenegraph/layout/move-cell.d.ts +2 -1
  42. package/cjs/scenegraph/layout/move-cell.js +15 -27
  43. package/cjs/scenegraph/layout/move-cell.js.map +1 -1
  44. package/cjs/scenegraph/layout/update-height.js +21 -17
  45. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  46. package/cjs/scenegraph/layout/update-width.js +40 -17
  47. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  48. package/cjs/scenegraph/scenegraph.d.ts +2 -2
  49. package/cjs/scenegraph/scenegraph.js +10 -7
  50. package/cjs/scenegraph/scenegraph.js.map +1 -1
  51. package/cjs/scenegraph/utils/get-cell-merge.js +4 -0
  52. package/cjs/scenegraph/utils/get-cell-merge.js.map +1 -1
  53. package/cjs/scenegraph/utils/text-icon-layout.d.ts +3 -3
  54. package/cjs/scenegraph/utils/text-icon-layout.js +12 -10
  55. package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
  56. package/cjs/state/cell-move/index.js +4 -2
  57. package/cjs/state/cell-move/index.js.map +1 -1
  58. package/cjs/state/state.js +1 -1
  59. package/cjs/state/state.js.map +1 -1
  60. package/cjs/ts-types/table-engine.d.ts +5 -1
  61. package/cjs/ts-types/table-engine.js.map +1 -1
  62. package/cjs/vrender.js.map +1 -1
  63. package/dist/vtable.js +1565 -1207
  64. package/dist/vtable.min.js +2 -2
  65. package/es/ListTable.d.ts +1 -0
  66. package/es/ListTable.js +49 -2
  67. package/es/ListTable.js.map +1 -1
  68. package/es/PivotChart.js +102 -83
  69. package/es/PivotChart.js.map +1 -1
  70. package/es/core/BaseTable.js +4 -4
  71. package/es/core/BaseTable.js.map +1 -1
  72. package/es/data/DataSource.d.ts +3 -1
  73. package/es/data/DataSource.js +27 -7
  74. package/es/data/DataSource.js.map +1 -1
  75. package/es/event/pivot-chart/axis-click.js +2 -2
  76. package/es/event/pivot-chart/axis-click.js.map +1 -1
  77. package/es/index.d.ts +1 -1
  78. package/es/index.js +1 -1
  79. package/es/index.js.map +1 -1
  80. package/es/layout/chart-helper/get-axis-config.js +5 -5
  81. package/es/layout/chart-helper/get-axis-config.js.map +1 -1
  82. package/es/layout/chart-helper/get-chart-spec.d.ts +3 -0
  83. package/es/layout/chart-helper/get-chart-spec.js +38 -4
  84. package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
  85. package/es/layout/pivot-header-layout.d.ts +4 -3
  86. package/es/layout/pivot-header-layout.js +38 -23
  87. package/es/layout/pivot-header-layout.js.map +1 -1
  88. package/es/scenegraph/component/custom.d.ts +5 -0
  89. package/es/scenegraph/component/custom.js +18 -0
  90. package/es/scenegraph/component/custom.js.map +1 -1
  91. package/es/scenegraph/graphic/contributions/chart-render-helper.js +1 -1
  92. package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
  93. package/es/scenegraph/group-creater/cell-helper.d.ts +6 -3
  94. package/es/scenegraph/group-creater/cell-helper.js +36 -35
  95. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  96. package/es/scenegraph/group-creater/cell-type/text-cell.d.ts +2 -1
  97. package/es/scenegraph/group-creater/cell-type/text-cell.js +6 -2
  98. package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  99. package/es/scenegraph/group-creater/column-helper.js +11 -6
  100. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  101. package/es/scenegraph/group-creater/progress/update-position/sort-horizontal.js +12 -5
  102. package/es/scenegraph/group-creater/progress/update-position/sort-horizontal.js.map +1 -1
  103. package/es/scenegraph/group-creater/progress/update-position/sort-vertical.js +19 -14
  104. package/es/scenegraph/group-creater/progress/update-position/sort-vertical.js.map +1 -1
  105. package/es/scenegraph/layout/move-cell.d.ts +2 -1
  106. package/es/scenegraph/layout/move-cell.js +12 -20
  107. package/es/scenegraph/layout/move-cell.js.map +1 -1
  108. package/es/scenegraph/layout/update-height.js +20 -16
  109. package/es/scenegraph/layout/update-height.js.map +1 -1
  110. package/es/scenegraph/layout/update-width.js +39 -16
  111. package/es/scenegraph/layout/update-width.js.map +1 -1
  112. package/es/scenegraph/scenegraph.d.ts +2 -2
  113. package/es/scenegraph/scenegraph.js +9 -6
  114. package/es/scenegraph/scenegraph.js.map +1 -1
  115. package/es/scenegraph/utils/get-cell-merge.js +4 -0
  116. package/es/scenegraph/utils/get-cell-merge.js.map +1 -1
  117. package/es/scenegraph/utils/text-icon-layout.d.ts +3 -3
  118. package/es/scenegraph/utils/text-icon-layout.js +10 -10
  119. package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
  120. package/es/state/cell-move/index.js +4 -1
  121. package/es/state/cell-move/index.js.map +1 -1
  122. package/es/state/state.js +1 -1
  123. package/es/state/state.js.map +1 -1
  124. package/es/ts-types/table-engine.d.ts +5 -1
  125. package/es/ts-types/table-engine.js.map +1 -1
  126. package/es/vrender.js.map +1 -1
  127. package/package.json +3 -3
@@ -1,33 +1,19 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: !0
5
- }), exports.moveHeaderPosition = void 0;
6
-
7
- const get_cell_merge_1 = require("../utils/get-cell-merge");
8
-
9
- function moveHeaderPosition(colSource, rowSource, colTarget, rowTarget, table) {
3
+ function moveHeaderPosition(colSource, rowSource, colTarget, rowTarget, sourceMergeInfo, targetMergeInfo, table) {
10
4
  const scene = table.scenegraph, cellLocation = table.getCellLocation(colTarget, rowTarget), direction = "columnHeader" === cellLocation ? "column" : "rowHeader" === cellLocation ? "row" : void 0;
11
5
  let sourceColStart = 0, sourceRowStart = 0, sourceColEnd = 0, sourceRowEnd = 0, targetColStart = 0, targetRowStart = 0, targetColEnd = 0, targetRowEnd = 0;
12
- if ("column" === direction) {
13
- const sourceMergeInfo = (0, get_cell_merge_1.getCellMergeInfo)(table, colSource, rowSource), targetMergeInfo = (0,
14
- get_cell_merge_1.getCellMergeInfo)(table, colTarget, rowTarget);
15
- sourceMergeInfo && targetMergeInfo ? (sourceColStart = sourceMergeInfo.start.col,
16
- sourceColEnd = sourceMergeInfo.end.col, targetColStart = targetMergeInfo.start.col,
17
- targetColEnd = targetMergeInfo.end.col, sourceRowStart = sourceMergeInfo.start.row,
18
- targetRowStart = targetMergeInfo.start.row) : (sourceColStart = colSource, sourceColEnd = colSource,
19
- targetColStart = colTarget, targetColEnd = colTarget, sourceRowStart = rowSource,
20
- targetRowStart = rowTarget), sourceRowEnd = table.rowCount - 1, targetRowEnd = table.rowCount - 1;
21
- } else if ("row" === direction) {
22
- const sourceMergeInfo = (0, get_cell_merge_1.getCellMergeInfo)(table, colSource, rowSource), targetMergeInfo = (0,
23
- get_cell_merge_1.getCellMergeInfo)(table, colTarget, rowTarget);
24
- sourceMergeInfo && targetMergeInfo ? (sourceRowStart = sourceMergeInfo.start.row,
25
- sourceRowEnd = sourceMergeInfo.end.row, targetRowStart = targetMergeInfo.start.row,
26
- targetRowEnd = targetMergeInfo.end.row, sourceColStart = sourceMergeInfo.start.col,
27
- targetColStart = targetMergeInfo.start.col) : (sourceRowStart = rowSource, sourceRowEnd = rowSource,
28
- targetRowStart = rowTarget, targetRowEnd = rowTarget, sourceColStart = colSource,
29
- targetColStart = colTarget), sourceColEnd = table.colCount - 1, targetColEnd = table.colCount - 1;
30
- }
6
+ "column" === direction ? (sourceMergeInfo && targetMergeInfo ? (sourceColStart = sourceMergeInfo.start.col,
7
+ sourceColEnd = sourceMergeInfo.end.col, targetColStart = targetMergeInfo.start.col,
8
+ targetColEnd = targetMergeInfo.end.col, sourceRowStart = sourceMergeInfo.start.row,
9
+ targetRowStart = targetMergeInfo.start.row) : (sourceColStart = colSource, sourceColEnd = colSource,
10
+ targetColStart = colTarget, targetColEnd = colTarget, sourceRowStart = rowSource,
11
+ targetRowStart = rowTarget), sourceRowEnd = table.rowCount - 1, targetRowEnd = table.rowCount - 1) : "row" === direction && (sourceMergeInfo && targetMergeInfo ? (sourceRowStart = sourceMergeInfo.start.row,
12
+ sourceRowEnd = sourceMergeInfo.end.row, targetRowStart = targetMergeInfo.start.row,
13
+ targetRowEnd = targetMergeInfo.end.row, sourceColStart = sourceMergeInfo.start.col,
14
+ targetColStart = targetMergeInfo.start.col) : (sourceRowStart = rowSource, sourceRowEnd = rowSource,
15
+ targetRowStart = rowTarget, targetRowEnd = rowTarget, sourceColStart = colSource,
16
+ targetColStart = colTarget), sourceColEnd = table.colCount - 1, targetColEnd = table.colCount - 1);
31
17
  const updateColStart = Math.min(sourceColStart, targetColStart), updateColEnd = Math.max(sourceColEnd, targetColEnd), updateRowStart = Math.min(sourceRowStart, targetRowStart), updateRowEnd = Math.max(sourceRowEnd, targetRowEnd);
32
18
  for (let col = updateColStart; col <= updateColEnd; col++) {
33
19
  const columnWidth = table.getColWidth(col), columnHeaderGroup = table.scenegraph.getColGroup(col, !0), columnGroup = table.scenegraph.getColGroup(col), columnBottomGroup = table.scenegraph.getColGroupInBottom(col);
@@ -65,5 +51,7 @@ function moveHeaderPosition(colSource, rowSource, colTarget, rowTarget, table) {
65
51
  }
66
52
  }
67
53
 
68
- exports.moveHeaderPosition = moveHeaderPosition;
54
+ Object.defineProperty(exports, "__esModule", {
55
+ value: !0
56
+ }), exports.moveHeaderPosition = void 0, exports.moveHeaderPosition = moveHeaderPosition;
69
57
  //# sourceMappingURL=move-cell.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/layout/move-cell.ts"],"names":[],"mappings":";;;AACA,4DAA2D;AAE3D,SAAgB,kBAAkB,CA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ent":["import type { Group } from './../../vrender';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nexport function moveHeaderPosition(\n colSource: number,\n rowSource: number,\n colTarget: number,\n rowTarget: number,\n table: BaseTableAPI\n) {\n const scene = table.scenegraph;\n\n // 判断方向\n const cellLocation = table.getCellLocation(colTarget, rowTarget);\n const direction = cellLocation === 'columnHeader' ? 'column' : cellLocation === 'rowHeader' ? 'row' : undefined;\n\n let sourceColStart = 0;\n let sourceRowStart = 0;\n let sourceColEnd = 0;\n let sourceRowEnd = 0;\n let targetColStart = 0;\n let targetRowStart = 0;\n let targetColEnd = 0;\n let targetRowEnd = 0;\n if (direction === 'column') {\n const sourceMergeInfo = getCellMergeInfo(table, colSource, rowSource);\n const targetMergeInfo = getCellMergeInfo(table, colTarget, rowTarget);\n if (sourceMergeInfo && targetMergeInfo) {\n sourceColStart = sourceMergeInfo.start.col;\n sourceColEnd = sourceMergeInfo.end.col;\n targetColStart = targetMergeInfo.start.col;\n targetColEnd = targetMergeInfo.end.col;\n\n sourceRowStart = sourceMergeInfo.start.row;\n targetRowStart = targetMergeInfo.start.row;\n } else {\n sourceColStart = colSource;\n sourceColEnd = colSource;\n targetColStart = colTarget;\n targetColEnd = colTarget;\n\n sourceRowStart = rowSource;\n targetRowStart = rowTarget;\n }\n // sourceRowStart = rowSource;\n sourceRowEnd = table.rowCount - 1;\n // targetRowStart = rowTarget;\n targetRowEnd = table.rowCount - 1;\n } else if (direction === 'row') {\n const sourceMergeInfo = getCellMergeInfo(table, colSource, rowSource);\n const targetMergeInfo = getCellMergeInfo(table, colTarget, rowTarget);\n if (sourceMergeInfo && targetMergeInfo) {\n sourceRowStart = sourceMergeInfo.start.row;\n sourceRowEnd = sourceMergeInfo.end.row;\n targetRowStart = targetMergeInfo.start.row;\n targetRowEnd = targetMergeInfo.end.row;\n\n sourceColStart = sourceMergeInfo.start.col;\n targetColStart = targetMergeInfo.start.col;\n } else {\n sourceRowStart = rowSource;\n sourceRowEnd = rowSource;\n targetRowStart = rowTarget;\n targetRowEnd = rowTarget;\n\n sourceColStart = colSource;\n targetColStart = colTarget;\n }\n // sourceColStart = colSource;\n sourceColEnd = table.colCount - 1;\n // targetColStart = colTarget;\n targetColEnd = table.colCount - 1;\n }\n\n const updateColStart = Math.min(sourceColStart, targetColStart);\n const updateColEnd = Math.max(sourceColEnd, targetColEnd);\n const updateRowStart = Math.min(sourceRowStart, targetRowStart);\n const updateRowEnd = Math.max(sourceRowEnd, targetRowEnd);\n\n // 更新columnGroup列宽\n for (let col = updateColStart; col <= updateColEnd; col++) {\n const columnWidth = table.getColWidth(col);\n const columnHeaderGroup = table.scenegraph.getColGroup(col, true);\n const columnGroup = table.scenegraph.getColGroup(col);\n const columnBottomGroup = table.scenegraph.getColGroupInBottom(col);\n if (columnHeaderGroup) {\n columnHeaderGroup.setAttribute('width', columnWidth);\n columnHeaderGroup.forEachChildren((child: Group) => {\n child.setAttribute('width', columnWidth);\n });\n }\n if (columnGroup) {\n columnGroup.setAttribute('width', columnWidth);\n columnGroup.forEachChildren((child: Group) => {\n child.setAttribute('width', columnWidth);\n });\n }\n if (columnBottomGroup) {\n columnBottomGroup.setAttribute('width', columnWidth);\n columnBottomGroup.forEachChildren((child: Group) => {\n child.setAttribute('width', columnWidth);\n });\n }\n }\n\n // 更新容器尺寸\n // scene.updateContainerAttrWidthAndX();\n scene.updateContainer();\n\n if (direction === 'column') {\n for (let col = updateColStart; col <= updateColEnd; col++) {\n // 将该列的chartInstance清除掉\n const columnGroup = table.scenegraph.getColGroup(col);\n columnGroup?.setAttribute('chartInstance', undefined);\n\n // 将上下表头 和中间body部分分别更新\n for (let row = 0; row <= table.frozenRowCount - 1; row++) {\n scene.updateCellContent(col, row);\n }\n for (let row = scene.bodyRowStart; row <= scene.bodyRowEnd; row++) {\n scene.updateCellContent(col, row);\n }\n for (let row = table.rowCount - table.bottomFrozenRowCount; row <= table.rowCount - 1; row++) {\n scene.updateCellContent(col, row);\n }\n }\n } else {\n // 将左侧冻结列or行表头的单元格更新\n for (let col = 0; col <= table.frozenColCount - 1; col++) {\n // 将该列的chartInstance清除掉\n const columnGroup = table.scenegraph.getColGroup(col);\n columnGroup?.setAttribute('chartInstance', undefined);\n for (let row = updateRowStart; row <= updateRowEnd; row++) {\n scene.updateCellContent(col, row);\n }\n }\n // 将中间body的单元格更新\n for (let col = scene.bodyColStart; col <= scene.bodyColEnd; col++) {\n // 将该列的chartInstance清除掉\n const columnGroup = table.scenegraph.getColGroup(col);\n columnGroup?.setAttribute('chartInstance', undefined);\n for (let row = updateRowStart; row <= updateRowEnd; row++) {\n scene.updateCellContent(col, row);\n }\n }\n // 将右侧冻结列的单元格更新\n for (let col = table.colCount - table.rightFrozenColCount; col <= table.colCount - 1; col++) {\n // 将该列的chartInstance清除掉\n const columnGroup = table.scenegraph.getColGroup(col);\n columnGroup?.setAttribute('chartInstance', undefined);\n for (let row = updateRowStart; row <= updateRowEnd; row++) {\n scene.updateCellContent(col, row);\n }\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/scenegraph/layout/move-cell.ts"],"names":[],"mappings":";;;AAGA,SAAgB,kBAAkB,CAChC,SAAiB,EACjB,SAAiB,EACjB,SAAiB,EACjB,SAAiB,EACjB,eAAkC,EAClC,eAAkC,EAClC,KAAmB;IAEnB,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC;IAG/B,MAAM,YAAY,GAAG,KAAK,CAAC,eAAe,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACjE,MAAM,SAAS,GAAG,YAAY,KAAK,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IAEhH,IAAI,cAAc,GAAG,CAAC,CAAC;IACvB,IAAI,cAAc,GAAG,CAAC,CAAC;IACvB,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,IAAI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AAQ,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE;YAE3F,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;YACtD,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,YAAY,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;YACtD,KAAK,IAAI,GAAG,GAAG,cAAc,EAAE,GAAG,IAAI,YAAY,EAAE,GAAG,EAAE,EAAE;gBACzD,KAAK,CAAC,iBAAiB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;aACnC;SACF;KACF;AACH,CAAC;AAtJD,gDAsJC","file":"move-cell.js","sourcesContent":["import type { Group } from './../../vrender';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport type { CellRange } from '../../ts-types';\nexport function moveHeaderPosition(\n colSource: number,\n rowSource: number,\n colTarget: number,\n rowTarget: number,\n sourceMergeInfo: false | CellRange,\n targetMergeInfo: false | CellRange,\n table: BaseTableAPI\n) {\n const scene = table.scenegraph;\n\n // 判断方向\n const cellLocation = table.getCellLocation(colTarget, rowTarget);\n const direction = cellLocation === 'columnHeader' ? 'column' : cellLocation === 'rowHeader' ? 'row' : undefined;\n\n let sourceColStart = 0;\n let sourceRowStart = 0;\n let sourceColEnd = 0;\n let sourceRowEnd = 0;\n let targetColStart = 0;\n let targetRowStart = 0;\n let targetColEnd = 0;\n let targetRowEnd = 0;\n if (direction === 'column') {\n if (sourceMergeInfo && targetMergeInfo) {\n sourceColStart = sourceMergeInfo.start.col;\n sourceColEnd = sourceMergeInfo.end.col;\n targetColStart = targetMergeInfo.start.col;\n targetColEnd = targetMergeInfo.end.col;\n\n sourceRowStart = sourceMergeInfo.start.row;\n targetRowStart = targetMergeInfo.start.row;\n } else {\n sourceColStart = colSource;\n sourceColEnd = colSource;\n targetColStart = colTarget;\n targetColEnd = colTarget;\n\n sourceRowStart = rowSource;\n targetRowStart = rowTarget;\n }\n // sourceRowStart = rowSource;\n sourceRowEnd = table.rowCount - 1;\n // targetRowStart = rowTarget;\n targetRowEnd = table.rowCount - 1;\n } else if (direction === 'row') {\n if (sourceMergeInfo && targetMergeInfo) {\n sourceRowStart = sourceMergeInfo.start.row;\n sourceRowEnd = sourceMergeInfo.end.row;\n targetRowStart = targetMergeInfo.start.row;\n targetRowEnd = targetMergeInfo.end.row;\n\n sourceColStart = sourceMergeInfo.start.col;\n targetColStart = targetMergeInfo.start.col;\n } else {\n sourceRowStart = rowSource;\n sourceRowEnd = rowSource;\n targetRowStart = rowTarget;\n targetRowEnd = rowTarget;\n\n sourceColStart = colSource;\n targetColStart = colTarget;\n }\n // sourceColStart = colSource;\n sourceColEnd = table.colCount - 1;\n // targetColStart = colTarget;\n targetColEnd = table.colCount - 1;\n }\n\n const updateColStart = Math.min(sourceColStart, targetColStart);\n const updateColEnd = Math.max(sourceColEnd, targetColEnd);\n const updateRowStart = Math.min(sourceRowStart, targetRowStart);\n const updateRowEnd = Math.max(sourceRowEnd, targetRowEnd);\n\n // 更新columnGroup列宽\n for (let col = updateColStart; col <= updateColEnd; col++) {\n const columnWidth = table.getColWidth(col);\n const columnHeaderGroup = table.scenegraph.getColGroup(col, true);\n const columnGroup = table.scenegraph.getColGroup(col);\n const columnBottomGroup = table.scenegraph.getColGroupInBottom(col);\n if (columnHeaderGroup) {\n columnHeaderGroup.setAttribute('width', columnWidth);\n columnHeaderGroup.forEachChildren((child: Group) => {\n child.setAttribute('width', columnWidth);\n });\n }\n if (columnGroup) {\n columnGroup.setAttribute('width', columnWidth);\n columnGroup.forEachChildren((child: Group) => {\n child.setAttribute('width', columnWidth);\n });\n }\n if (columnBottomGroup) {\n columnBottomGroup.setAttribute('width', columnWidth);\n columnBottomGroup.forEachChildren((child: Group) => {\n child.setAttribute('width', columnWidth);\n });\n }\n }\n\n // 更新容器尺寸\n // scene.updateContainerAttrWidthAndX();\n scene.updateContainer();\n\n if (direction === 'column') {\n for (let col = updateColStart; col <= updateColEnd; col++) {\n // 将该列的chartInstance清除掉\n const columnGroup = table.scenegraph.getColGroup(col);\n columnGroup?.setAttribute('chartInstance', undefined);\n\n // 将上下表头 和中间body部分分别更新\n for (let row = 0; row <= table.frozenRowCount - 1; row++) {\n scene.updateCellContent(col, row);\n }\n for (let row = scene.bodyRowStart; row <= scene.bodyRowEnd; row++) {\n scene.updateCellContent(col, row);\n }\n for (let row = table.rowCount - table.bottomFrozenRowCount; row <= table.rowCount - 1; row++) {\n scene.updateCellContent(col, row);\n }\n }\n } else {\n // 将左侧冻结列or行表头的单元格更新\n for (let col = 0; col <= table.frozenColCount - 1; col++) {\n // 将该列的chartInstance清除掉\n const columnGroup = table.scenegraph.getColGroup(col);\n columnGroup?.setAttribute('chartInstance', undefined);\n for (let row = updateRowStart; row <= updateRowEnd; row++) {\n scene.updateCellContent(col, row);\n }\n }\n // 将中间body的单元格更新\n for (let col = scene.bodyColStart; col <= scene.bodyColEnd; col++) {\n // 将该列的chartInstance清除掉\n const columnGroup = table.scenegraph.getColGroup(col);\n columnGroup?.setAttribute('chartInstance', undefined);\n for (let row = updateRowStart; row <= updateRowEnd; row++) {\n scene.updateCellContent(col, row);\n }\n }\n // 将右侧冻结列的单元格更新\n for (let col = table.colCount - table.rightFrozenColCount; col <= table.colCount - 1; col++) {\n // 将该列的chartInstance清除掉\n const columnGroup = table.scenegraph.getColGroup(col);\n columnGroup?.setAttribute('chartInstance', undefined);\n for (let row = updateRowStart; row <= updateRowEnd; row++) {\n scene.updateCellContent(col, row);\n }\n }\n }\n}\n"]}
@@ -9,7 +9,9 @@ const progress_bar_cell_1 = require("../group-creater/cell-type/progress-bar-cel
9
9
  function updateRowHeight(scene, row, detaY, skipTableHeightMap) {
10
10
  skipTableHeightMap || scene.table._setRowHeight(row, scene.table.getRowHeight(row) + detaY, !0);
11
11
  for (let col = 0; col < scene.table.colCount; col++) {
12
- const cell = scene.getCell(col, row), mergeInfo = (0, get_cell_merge_1.getCellMergeInfo)(scene.table, col, row);
12
+ const cell = scene.getCell(col, row);
13
+ if ("empty" === cell.role) continue;
14
+ const mergeInfo = (0, get_cell_merge_1.getCellMergeInfo)(scene.table, col, row);
13
15
  if (mergeInfo && mergeInfo.start.col !== col) continue;
14
16
  updateCellHeightForRow(scene, cell, col, row, cell.attribute.height + detaY, detaY, scene.table.isHeader(col, row)),
15
17
  scene.updateCellContentWhileResize(col, row);
@@ -52,23 +54,25 @@ function updateCellHeight(scene, cell, col, row, distHeight, detaY, isHeader) {
52
54
  let renderDefault = !0;
53
55
  const customContainer = cell.getChildByName("custom-container");
54
56
  if (customContainer) {
55
- let customElementsGroup, customRender, customLayout;
56
- customContainer.removeAllChild(), cell.removeChild(customContainer);
57
- if ("body" !== scene.table.getCellLocation(col, row)) {
58
- const define = scene.table.getHeaderDefine(col, row);
59
- customRender = null == define ? void 0 : define.headerCustomRender, customLayout = null == define ? void 0 : define.headerCustomLayout;
60
- } else {
61
- const define = scene.table.getBodyColumnDefine(col, row);
62
- customRender = (null == define ? void 0 : define.customRender) || scene.table.customRender,
63
- customLayout = null == define ? void 0 : define.customLayout;
64
- }
65
- if (customLayout || customRender) {
66
- const style = scene.table._getCellStyle(col, row), padding = (0, padding_1.getQuadProps)((0,
67
- get_prop_1.getProp)("padding", style, col, row, scene.table)), customResult = (0,
68
- custom_1.dealWithCustom)(customLayout, customRender, col, row, cell.attribute.width, cell.attribute.height, !1, "autoHeight" === scene.table.heightMode, padding, scene.table);
69
- customElementsGroup = customResult.elementsGroup, renderDefault = customResult.renderDefault;
57
+ let customElementsGroup;
58
+ if (customContainer.removeAllChild(), cell.removeChild(customContainer), !(0, custom_1.getCustomCellMergeCustom)(col, row, cell, scene.table)) {
59
+ let customRender, customLayout;
60
+ if ("body" !== scene.table.getCellLocation(col, row)) {
61
+ const define = scene.table.getHeaderDefine(col, row);
62
+ customRender = null == define ? void 0 : define.headerCustomRender, customLayout = null == define ? void 0 : define.headerCustomLayout;
63
+ } else {
64
+ const define = scene.table.getBodyColumnDefine(col, row);
65
+ customRender = (null == define ? void 0 : define.customRender) || scene.table.customRender,
66
+ customLayout = null == define ? void 0 : define.customLayout;
67
+ }
68
+ if (customLayout || customRender) {
69
+ const style = scene.table._getCellStyle(col, row), padding = (0, padding_1.getQuadProps)((0,
70
+ get_prop_1.getProp)("padding", style, col, row, scene.table)), customResult = (0,
71
+ custom_1.dealWithCustom)(customLayout, customRender, col, row, cell.attribute.width, cell.attribute.height, !1, "autoHeight" === scene.table.heightMode, padding, scene.table);
72
+ customElementsGroup = customResult.elementsGroup, renderDefault = customResult.renderDefault;
73
+ }
74
+ cell.childrenCount > 0 && customElementsGroup ? cell.insertBefore(customElementsGroup, cell.firstChild) : customElementsGroup && cell.appendChild(customElementsGroup);
70
75
  }
71
- cell.childrenCount > 0 ? cell.insertBefore(customElementsGroup, cell.firstChild) : cell.appendChild(customElementsGroup);
72
76
  }
73
77
  if (renderDefault) {
74
78
  const style = scene.table._getCellStyle(col, row);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/layout/update-height.ts"],"names":[],"mappings":";;;AAEA,oFAAqF;AACrF,gFAAsF;AAEtF,4DAA2D;AAC3D,gDAA4C;AAC5C,8CAAgD;AAChD,gEAAoE;AAEpE,gDAAqD;AACrD,sEAA0F;AAC1F,wDAAuD;AACvD,sEAAgE;AAEhE,kEAAiE;AAGjE,SAAgB,eAAe,CAAC,KAAiB,EAAE,GAAW,EAAE,KAAa,EAAE,kBAA4B;IAEzG,IAAI,CAAC,kBAAkB,EAAE;QACvB,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC;KAC7E;IAED,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE;QACnD,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CA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,EAAE;gBAC3E,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;gBAC3D,eAAe,CAAC,eAAe,CAAC,CAAC,KAAe,EAAE,EAAE;oBAClD,KAAK,CAAC,aAAa,CAAC;wBAClB,EAAE,EAAE,CAAC;wBACL,EAAE,EAAE,CAAC;qBACN,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;gBACH,IAAA,0CAAuB,EAAC,eAAe,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;gBAC7G,MAAM,WAAW,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;gBAC5C,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;gBAG1C,eAAe,CAAC,aAAa,GAAG,UAAU,CAAC;gBAE3C,MAAM,EAAE,WAAW,EAAE,GAAG,IAAA,+BAAe,EACrC,eAAe,EACf,UAAU,EACV,WAAW,EACX;oBACE,KAAK,EAAE;wBACL,GAAG,EAAE,SAAS,CAAC,aAAa;wBAC5B,GAAG,EAAE,SAAS,CAAC,aAAa;qBAC7B;oBACD,GAAG,EAAE;wBACH,GAAG,EAAE,SAAS,CAAC,WAAW;wBAC1B,GAAG,EAAE,SAAS,CAAC,WAAW;qBAC3B;iBACF,EACD,KAAK,CACN,CAAC;gBAEF,IAAI,WAAW,EAAE;oBACf,eAAe,CAAC,eAAe,GAAG,IAAI,CAAC;iBACxC;aACF;SACF;KACF;SAAM;QACL,IAAA,0CAAuB,EAAC,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;KACxG;AACH,CAAC","file":"update-height.js","sourcesContent":["import type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport type { Group } from '../graphic/group';\nimport { createProgressBarCell } from '../group-creater/cell-type/progress-bar-cell';\nimport { createSparkLineCellGroup } from '../group-creater/cell-type/spark-line-cell';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport { getProp } from '../utils/get-prop';\nimport { getQuadProps } from '../utils/padding';\nimport { updateCellContentHeight } from '../utils/text-icon-layout';\nimport type { IProgressbarColumnBodyDefine } from '../../ts-types/list-table/define/progressbar-define';\nimport { dealWithCustom } from '../component/custom';\nimport { updateImageCellContentWhileResize } from '../group-creater/cell-type/image-cell';\nimport { getStyleTheme } from '../../core/tableHelper';\nimport { isMergeCellGroup } from '../utils/is-merge-cell-group';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport { resizeCellGroup } from '../group-creater/column-helper';\nimport type { IGraphic } from './../../vrender';\n\nexport function updateRowHeight(scene: Scenegraph, row: number, detaY: number, skipTableHeightMap?: boolean) {\n // 更新table行高存储\n if (!skipTableHeightMap) {\n scene.table._setRowHeight(row, scene.table.getRowHeight(row) + detaY, true);\n }\n\n for (let col = 0; col < scene.table.colCount; col++) {\n const cell = scene.getCell(col, row);\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n if (mergeInfo && mergeInfo.start.col !== col) {\n continue;\n }\n const height = cell.attribute.height;\n // cell.setAttribute('height', height);\n // (cell.firstChild as Rect).setAttribute('height', cell.attribute.height);\n updateCellHeightForRow(scene, cell, col, row, height + detaY, detaY, scene.table.isHeader(col, row));\n\n scene.updateCellContentWhileResize(col, row);\n }\n\n let rowStart = 0;\n let rowEnd = 0;\n // 更新header 高度\n if (row < scene.table.columnHeaderLevelCount) {\n // scene.colHeaderGroup.setAttribute('height', scene.colHeaderGroup.attribute.height + detaY);\n // scene.rowHeaderGroup.setAttribute('y', scene.rowHeaderGroup.attribute.y + detaY);\n // scene.bodyGroup.setAttribute('y', scene.bodyGroup.attribute.y + detaY);\n\n rowStart = row + 1;\n rowEnd = scene.table.columnHeaderLevelCount - 1;\n } else {\n rowStart = row + 1;\n // rowEnd = scene.table.rowCount - 1;\n rowEnd = scene.bodyRowEnd; //- scene.table.bottomFrozenRowCount;\n }\n\n // 更新以下行位置\n for (let rowIndex = rowStart; rowIndex <= rowEnd; rowIndex++) {\n for (let colIndex = 0; colIndex < scene.table.colCount; colIndex++) {\n const cellGroup = scene.getCell(colIndex, rowIndex);\n if (cellGroup.role === 'cell') {\n cellGroup.setAttribute('y', cellGroup.attribute.y + detaY);\n }\n }\n }\n}\n\n/**\n * @description: 更新单个单元格高度\n * @return {*}\n */\nexport function updateCellHeightForRow(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n height: number,\n detaY: number,\n isHeader: boolean\n // autoRowHeight: boolean\n) {\n // cell.setAttribute('height', height);\n const cellGroup = cell;\n const distHeight = height;\n\n if (!cellGroup) {\n // 合并单元格非主单元格,不处理\n return;\n }\n\n updateCellHeight(scene, cellGroup, col, row, distHeight, detaY, isHeader);\n}\n\nexport function updateCellHeightForColumn(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n height: number,\n detaY: number,\n isHeader: boolean\n) {\n // cell.setAttribute('height', height);\n const cellGroup = cell;\n updateCellHeight(scene, cellGroup, col, row, height, 0, isHeader);\n}\n\nexport function updateCellHeight(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n distHeight: number,\n detaY: number,\n isHeader: boolean\n) {\n if (cell.attribute.height === distHeight && !cell.needUpdateHeight) {\n return;\n }\n cell.needUpdateHeight = false;\n\n cell.setAttribute('height', distHeight);\n\n // 更新单元格布局\n const type = scene.table.isHeader(col, row)\n ? scene.table._getHeaderLayoutMap(col, row).headerType\n : scene.table.getBodyColumnType(col, row);\n if (type === 'progressbar') {\n // 目前先采用重新生成节点的方案\n const columnDefine = scene.table.getBodyColumnDefine(col, row) as IProgressbarColumnBodyDefine;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const value = scene.table.getCellValue(col, row);\n const dataValue = scene.table.getCellOriginValue(col, row);\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n\n const newBarCell = createProgressBarCell(\n columnDefine,\n style,\n cell.attribute.width,\n // cell.attribute.height,\n value,\n dataValue,\n col,\n row,\n padding,\n scene.table\n );\n\n const oldBarCell = cell.getChildByName('progress-bar') as Group;\n // cell.replaceChild(newBarCell, oldBarCell);\n cell.insertBefore(newBarCell, oldBarCell);\n cell.removeChild(oldBarCell);\n oldBarCell.removeAllChild();\n oldBarCell.release();\n } else if (type === 'sparkline') {\n // 目前先采用重新生成节点的方案\n cell.removeAllChild();\n const headerStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', headerStyle, col, row, scene.table));\n createSparkLineCellGroup(\n cell,\n cell.parent,\n cell.attribute.x,\n cell.attribute.y,\n col,\n row,\n cell.attribute.width,\n cell.attribute.height,\n padding,\n scene.table,\n getStyleTheme(headerStyle, scene.table, col, row, getProp).theme\n );\n } else if (type === 'image' || type === 'video') {\n updateImageCellContentWhileResize(cell, col, row, scene.table);\n } else if (cell.firstChild?.name === 'axis') {\n (cell.firstChild as any)?.originAxis.resize(cell.attribute.width, cell.attribute.height);\n } else {\n let renderDefault = true;\n const customContainer = cell.getChildByName('custom-container') as Group;\n if (customContainer) {\n let customElementsGroup;\n customContainer.removeAllChild();\n cell.removeChild(customContainer);\n\n let customRender;\n let customLayout;\n const cellLocation = scene.table.getCellLocation(col, row);\n if (cellLocation !== 'body') {\n const define = scene.table.getHeaderDefine(col, row);\n customRender = define?.headerCustomRender;\n customLayout = define?.headerCustomLayout;\n } else {\n const define = scene.table.getBodyColumnDefine(col, row);\n customRender = define?.customRender || scene.table.customRender;\n customLayout = define?.customLayout;\n }\n\n if (customLayout || customRender) {\n // const { autoRowHeight } = table.internalProps;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n const customResult = dealWithCustom(\n customLayout,\n customRender,\n col,\n row,\n cell.attribute.width,\n cell.attribute.height,\n false,\n scene.table.heightMode === 'autoHeight',\n padding,\n scene.table\n );\n customElementsGroup = customResult.elementsGroup;\n renderDefault = customResult.renderDefault;\n }\n\n if (cell.childrenCount > 0) {\n cell.insertBefore(customElementsGroup, cell.firstChild);\n } else {\n cell.appendChild(customElementsGroup);\n }\n }\n\n if (renderDefault) {\n // 处理文字\n const style = scene.table._getCellStyle(col, row);\n updateMergeCellContentHeight(\n cell,\n distHeight,\n detaY,\n // scene.table.internalProps.autoRowHeight,\n scene.table.heightMode === 'autoHeight',\n getQuadProps(style.padding as number),\n style.textAlign,\n style.textBaseline,\n scene.table\n );\n }\n }\n}\n\nfunction updateMergeCellContentHeight(\n cellGroup: Group,\n distHeight: number,\n detaY: number,\n autoRowHeight: boolean,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n table: BaseTableAPI\n) {\n if (isMergeCellGroup(cellGroup)) {\n distHeight = 0;\n for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {\n distHeight += table.getRowHeight(row);\n }\n for (let col = cellGroup.mergeStartCol; col <= cellGroup.mergeEndCol; col++) {\n for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {\n const singleCellGroup = table.scenegraph.getCell(col, row);\n singleCellGroup.forEachChildren((child: IGraphic) => {\n child.setAttributes({\n dx: 0,\n dy: 0\n });\n });\n updateCellContentHeight(singleCellGroup, distHeight, detaY, autoRowHeight, padding, textAlign, textBaseline);\n const rangeHeight = table.getRowHeight(row);\n const rangeWidth = table.getColWidth(col);\n\n // const { height: contentHeight } = cellGroup.attribute;\n singleCellGroup.contentHeight = distHeight;\n\n const { widthChange } = resizeCellGroup(\n singleCellGroup,\n rangeWidth,\n rangeHeight,\n {\n start: {\n col: cellGroup.mergeStartCol,\n row: cellGroup.mergeStartRow\n },\n end: {\n col: cellGroup.mergeEndCol,\n row: cellGroup.mergeEndRow\n }\n },\n table\n );\n\n if (widthChange) {\n singleCellGroup.needUpdateWidth = true;\n }\n }\n }\n } else {\n updateCellContentHeight(cellGroup, distHeight, detaY, autoRowHeight, padding, textAlign, textBaseline);\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/scenegraph/layout/update-height.ts"],"names":[],"mappings":";;;AAEA,oFAAqF;AACrF,gFAAsF;AAEtF,4DAA2D;AAC3D,gDAA4C;AAC5C,8CAAgD;AAChD,gEAAoE;AAEpE,gDAA+E;AAC/E,sEAA0F;AAC1F,wDAAuD;AACvD,sEAAgE;AAEhE,kEAAiE;AAGjE,SAAgB,eAAe,CAAC,KAAiB,EAAE,GAAW,EAAE,KAAa,EAAE,kBAA4B;IAEzG,IAAI,CAAC,kBAAkB,EAAE;QACvB,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC;KAC7E;IAED,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE;QACnD,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACrC,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE;YACzB,SAAS;SACV;QACD,MAAM,SAAS,GAAG,IAAA,iCAAgB,EAAC,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QAC1D,IAAI,SAAS,IAAI,SAAS,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE;YAC5C,SAAS;SACV;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;QAGrC,sBAAsB,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,GAAG,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,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C,CAAC;gBACH,IAAA,0CAAuB,EAAC,eAAe,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;gBAC7G,MAAM,WAAW,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;gBAC5C,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;gBAG1C,eAAe,CAAC,aAAa,GAAG,UAAU,CAAC;gBAE3C,MAAM,EAAE,WAAW,EAAE,GAAG,IAAA,+BAAe,EACrC,eAAe,EACf,UAAU,EACV,WAAW,EACX;oBACE,KAAK,EAAE;wBACL,GAAG,EAAE,SAAS,CAAC,aAAa;wBAC5B,GAAG,EAAE,SAAS,CAAC,aAAa;qBAC7B;oBACD,GAAG,EAAE;wBACH,GAAG,EAAE,SAAS,CAAC,WAAW;wBAC1B,GAAG,EAAE,SAAS,CAAC,WAAW;qBAC3B;iBACF,EACD,KAAK,CACN,CAAC;gBAEF,IAAI,WAAW,EAAE;oBACf,eAAe,CAAC,eAAe,GAAG,IAAI,CAAC;iBACxC;aACF;SACF;KACF;SAAM;QACL,IAAA,0CAAuB,EAAC,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;KACxG;AACH,CAAC","file":"update-height.js","sourcesContent":["import type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport type { Group } from '../graphic/group';\nimport { createProgressBarCell } from '../group-creater/cell-type/progress-bar-cell';\nimport { createSparkLineCellGroup } from '../group-creater/cell-type/spark-line-cell';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport { getProp } from '../utils/get-prop';\nimport { getQuadProps } from '../utils/padding';\nimport { updateCellContentHeight } from '../utils/text-icon-layout';\nimport type { IProgressbarColumnBodyDefine } from '../../ts-types/list-table/define/progressbar-define';\nimport { dealWithCustom, getCustomCellMergeCustom } from '../component/custom';\nimport { updateImageCellContentWhileResize } from '../group-creater/cell-type/image-cell';\nimport { getStyleTheme } from '../../core/tableHelper';\nimport { isMergeCellGroup } from '../utils/is-merge-cell-group';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport { resizeCellGroup } from '../group-creater/column-helper';\nimport type { IGraphic } from './../../vrender';\n\nexport function updateRowHeight(scene: Scenegraph, row: number, detaY: number, skipTableHeightMap?: boolean) {\n // 更新table行高存储\n if (!skipTableHeightMap) {\n scene.table._setRowHeight(row, scene.table.getRowHeight(row) + detaY, true);\n }\n\n for (let col = 0; col < scene.table.colCount; col++) {\n const cell = scene.getCell(col, row);\n if (cell.role === 'empty') {\n continue;\n }\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n if (mergeInfo && mergeInfo.start.col !== col) {\n continue;\n }\n const height = cell.attribute.height;\n // cell.setAttribute('height', height);\n // (cell.firstChild as Rect).setAttribute('height', cell.attribute.height);\n updateCellHeightForRow(scene, cell, col, row, height + detaY, detaY, scene.table.isHeader(col, row));\n\n scene.updateCellContentWhileResize(col, row);\n }\n\n let rowStart = 0;\n let rowEnd = 0;\n // 更新header 高度\n if (row < scene.table.columnHeaderLevelCount) {\n // scene.colHeaderGroup.setAttribute('height', scene.colHeaderGroup.attribute.height + detaY);\n // scene.rowHeaderGroup.setAttribute('y', scene.rowHeaderGroup.attribute.y + detaY);\n // scene.bodyGroup.setAttribute('y', scene.bodyGroup.attribute.y + detaY);\n\n rowStart = row + 1;\n rowEnd = scene.table.columnHeaderLevelCount - 1;\n } else {\n rowStart = row + 1;\n // rowEnd = scene.table.rowCount - 1;\n rowEnd = scene.bodyRowEnd; //- scene.table.bottomFrozenRowCount;\n }\n\n // 更新以下行位置\n for (let rowIndex = rowStart; rowIndex <= rowEnd; rowIndex++) {\n for (let colIndex = 0; colIndex < scene.table.colCount; colIndex++) {\n const cellGroup = scene.getCell(colIndex, rowIndex);\n if (cellGroup.role === 'cell') {\n cellGroup.setAttribute('y', cellGroup.attribute.y + detaY);\n }\n }\n }\n}\n\n/**\n * @description: 更新单个单元格高度\n * @return {*}\n */\nexport function updateCellHeightForRow(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n height: number,\n detaY: number,\n isHeader: boolean\n // autoRowHeight: boolean\n) {\n // cell.setAttribute('height', height);\n const cellGroup = cell;\n const distHeight = height;\n\n if (!cellGroup) {\n // 合并单元格非主单元格,不处理\n return;\n }\n\n updateCellHeight(scene, cellGroup, col, row, distHeight, detaY, isHeader);\n}\n\nexport function updateCellHeightForColumn(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n height: number,\n detaY: number,\n isHeader: boolean\n) {\n // cell.setAttribute('height', height);\n const cellGroup = cell;\n updateCellHeight(scene, cellGroup, col, row, height, 0, isHeader);\n}\n\nexport function updateCellHeight(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n distHeight: number,\n detaY: number,\n isHeader: boolean\n) {\n if (cell.attribute.height === distHeight && !cell.needUpdateHeight) {\n return;\n }\n cell.needUpdateHeight = false;\n\n cell.setAttribute('height', distHeight);\n\n // 更新单元格布局\n const type = scene.table.isHeader(col, row)\n ? scene.table._getHeaderLayoutMap(col, row).headerType\n : scene.table.getBodyColumnType(col, row);\n if (type === 'progressbar') {\n // 目前先采用重新生成节点的方案\n const columnDefine = scene.table.getBodyColumnDefine(col, row) as IProgressbarColumnBodyDefine;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const value = scene.table.getCellValue(col, row);\n const dataValue = scene.table.getCellOriginValue(col, row);\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n\n const newBarCell = createProgressBarCell(\n columnDefine,\n style,\n cell.attribute.width,\n // cell.attribute.height,\n value,\n dataValue,\n col,\n row,\n padding,\n scene.table\n );\n\n const oldBarCell = cell.getChildByName('progress-bar') as Group;\n // cell.replaceChild(newBarCell, oldBarCell);\n cell.insertBefore(newBarCell, oldBarCell);\n cell.removeChild(oldBarCell);\n oldBarCell.removeAllChild();\n oldBarCell.release();\n } else if (type === 'sparkline') {\n // 目前先采用重新生成节点的方案\n cell.removeAllChild();\n const headerStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', headerStyle, col, row, scene.table));\n createSparkLineCellGroup(\n cell,\n cell.parent,\n cell.attribute.x,\n cell.attribute.y,\n col,\n row,\n cell.attribute.width,\n cell.attribute.height,\n padding,\n scene.table,\n getStyleTheme(headerStyle, scene.table, col, row, getProp).theme\n );\n } else if (type === 'image' || type === 'video') {\n updateImageCellContentWhileResize(cell, col, row, scene.table);\n } else if (cell.firstChild?.name === 'axis') {\n (cell.firstChild as any)?.originAxis.resize(cell.attribute.width, cell.attribute.height);\n } else {\n let renderDefault = true;\n const customContainer = cell.getChildByName('custom-container') as Group;\n if (customContainer) {\n let customElementsGroup;\n customContainer.removeAllChild();\n cell.removeChild(customContainer);\n\n if (!getCustomCellMergeCustom(col, row, cell, scene.table)) {\n let customRender;\n let customLayout;\n const cellLocation = scene.table.getCellLocation(col, row);\n if (cellLocation !== 'body') {\n const define = scene.table.getHeaderDefine(col, row);\n customRender = define?.headerCustomRender;\n customLayout = define?.headerCustomLayout;\n } else {\n const define = scene.table.getBodyColumnDefine(col, row);\n customRender = define?.customRender || scene.table.customRender;\n customLayout = define?.customLayout;\n }\n\n if (customLayout || customRender) {\n // const { autoRowHeight } = table.internalProps;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n const customResult = dealWithCustom(\n customLayout,\n customRender,\n col,\n row,\n cell.attribute.width,\n cell.attribute.height,\n false,\n scene.table.heightMode === 'autoHeight',\n padding,\n scene.table\n );\n customElementsGroup = customResult.elementsGroup;\n renderDefault = customResult.renderDefault;\n }\n\n if (cell.childrenCount > 0 && customElementsGroup) {\n cell.insertBefore(customElementsGroup, cell.firstChild);\n } else if (customElementsGroup) {\n cell.appendChild(customElementsGroup);\n }\n }\n }\n if (renderDefault) {\n // 处理文字\n const style = scene.table._getCellStyle(col, row);\n updateMergeCellContentHeight(\n cell,\n distHeight,\n detaY,\n // scene.table.internalProps.autoRowHeight,\n scene.table.heightMode === 'autoHeight',\n getQuadProps(style.padding as number),\n style.textAlign,\n style.textBaseline,\n scene.table\n );\n }\n }\n}\n\nfunction updateMergeCellContentHeight(\n cellGroup: Group,\n distHeight: number,\n detaY: number,\n autoRowHeight: boolean,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n table: BaseTableAPI\n) {\n if (isMergeCellGroup(cellGroup)) {\n distHeight = 0;\n for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {\n distHeight += table.getRowHeight(row);\n }\n for (let col = cellGroup.mergeStartCol; col <= cellGroup.mergeEndCol; col++) {\n for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {\n const singleCellGroup = table.scenegraph.getCell(col, row);\n singleCellGroup.forEachChildren((child: IGraphic) => {\n child.setAttributes({\n dx: 0,\n dy: 0\n });\n });\n updateCellContentHeight(singleCellGroup, distHeight, detaY, autoRowHeight, padding, textAlign, textBaseline);\n const rangeHeight = table.getRowHeight(row);\n const rangeWidth = table.getColWidth(col);\n\n // const { height: contentHeight } = cellGroup.attribute;\n singleCellGroup.contentHeight = distHeight;\n\n const { widthChange } = resizeCellGroup(\n singleCellGroup,\n rangeWidth,\n rangeHeight,\n {\n start: {\n col: cellGroup.mergeStartCol,\n row: cellGroup.mergeStartRow\n },\n end: {\n col: cellGroup.mergeEndCol,\n row: cellGroup.mergeEndRow\n }\n },\n table\n );\n\n if (widthChange) {\n singleCellGroup.needUpdateWidth = true;\n }\n }\n }\n } else {\n updateCellContentHeight(cellGroup, distHeight, detaY, autoRowHeight, padding, textAlign, textBaseline);\n }\n}\n"]}
@@ -64,6 +64,27 @@ function updateColunmWidth(columnGroup, detaX, autoRowHeight, mode, scene) {
64
64
  })), newTotalHeight = y;
65
65
  }
66
66
  scene.updateContainerHeight(row, newTotalHeight - oldContainerHeight);
67
+ for (let col = 0; col < scene.table.frozenColCount; col++) {
68
+ const leftBottomFrozenColumnGroup = scene.getColGroupInLeftBottomCorner(col);
69
+ let y = 0;
70
+ leftBottomFrozenColumnGroup.forEachChildren((cellGroup => {
71
+ cellGroup.setAttribute("y", y), y += scene.table.getRowHeight(cellGroup.row);
72
+ }));
73
+ }
74
+ for (let col = scene.table.colCount - scene.table.rightFrozenColCount; col < scene.table.colCount; col++) {
75
+ const rightBottomFrozenColumnGroup = scene.getColGroupInRightBottomCorner(col);
76
+ let y = 0;
77
+ rightBottomFrozenColumnGroup.forEachChildren((cellGroup => {
78
+ cellGroup.setAttribute("y", y), y += scene.table.getRowHeight(cellGroup.row);
79
+ }));
80
+ }
81
+ for (let col = scene.table.frozenColCount; col < scene.table.colCount - scene.table.rightFrozenColCount; col++) {
82
+ const rightBottomFrozenColumnGroup = scene.getColGroupInBottom(col);
83
+ let y = 0;
84
+ rightBottomFrozenColumnGroup.forEachChildren((cellGroup => {
85
+ cellGroup.setAttribute("y", y), y += scene.table.getRowHeight(cellGroup.row);
86
+ }));
87
+ }
67
88
  }
68
89
  }
69
90
 
@@ -98,24 +119,26 @@ function updateCellWidth(scene, cell, col, row, oldWidth, distWidth, detaX, isHe
98
119
  let renderDefault = !0;
99
120
  const customContainer = cell.getChildByName("custom-container");
100
121
  if (customContainer) {
101
- let customElementsGroup, customRender, customLayout;
102
- customContainer.removeAllChild(), cell.removeChild(customContainer);
103
- if ("body" !== scene.table.getCellLocation(col, row)) {
104
- const define = scene.table.getHeaderDefine(col, row);
105
- customRender = null == define ? void 0 : define.headerCustomRender, customLayout = null == define ? void 0 : define.headerCustomLayout;
106
- } else {
107
- const define = scene.table.getBodyColumnDefine(col, row);
108
- customRender = (null == define ? void 0 : define.customRender) || scene.table.customRender,
109
- customLayout = null == define ? void 0 : define.customLayout;
110
- }
111
- if (customLayout || customRender) {
112
- const style = scene.table._getCellStyle(col, row), padding = (0, padding_1.getQuadProps)((0,
113
- get_prop_1.getProp)("padding", style, col, row, scene.table)), customResult = (0,
114
- custom_1.dealWithCustom)(customLayout, customRender, col, row, cellGroup.attribute.width, cellGroup.attribute.height, !1, "autoHeight" === scene.table.heightMode, padding, scene.table);
115
- customElementsGroup = customResult.elementsGroup, renderDefault = customResult.renderDefault,
116
- isHeightChange = !0;
122
+ let customElementsGroup;
123
+ if (customContainer.removeAllChild(), cell.removeChild(customContainer), !(0, custom_1.getCustomCellMergeCustom)(col, row, cell, scene.table)) {
124
+ let customRender, customLayout;
125
+ if ("body" !== scene.table.getCellLocation(col, row)) {
126
+ const define = scene.table.getHeaderDefine(col, row);
127
+ customRender = null == define ? void 0 : define.headerCustomRender, customLayout = null == define ? void 0 : define.headerCustomLayout;
128
+ } else {
129
+ const define = scene.table.getBodyColumnDefine(col, row);
130
+ customRender = (null == define ? void 0 : define.customRender) || scene.table.customRender,
131
+ customLayout = null == define ? void 0 : define.customLayout;
132
+ }
133
+ if (customLayout || customRender) {
134
+ const style = scene.table._getCellStyle(col, row), padding = (0, padding_1.getQuadProps)((0,
135
+ get_prop_1.getProp)("padding", style, col, row, scene.table)), customResult = (0,
136
+ custom_1.dealWithCustom)(customLayout, customRender, col, row, cellGroup.attribute.width, cellGroup.attribute.height, !1, "autoHeight" === scene.table.heightMode, padding, scene.table);
137
+ customElementsGroup = customResult.elementsGroup, renderDefault = customResult.renderDefault,
138
+ isHeightChange = !0;
139
+ }
140
+ cell.childrenCount > 0 && customElementsGroup ? cell.insertBefore(customElementsGroup, cell.firstChild) : customElementsGroup && cell.appendChild(customElementsGroup);
117
141
  }
118
- cell.childrenCount > 0 ? cell.insertBefore(customElementsGroup, cell.firstChild) : cell.appendChild(customElementsGroup);
119
142
  }
120
143
  if (renderDefault) {
121
144
  const style = scene.table._getCellStyle(col, row);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/layout/update-width.ts"],"names":[],"mappings":";;;AAEA,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GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IAGhD,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE;QACnD,MAAM,UAAU,GAAG,SAAS,CAAC;QAC7B,MAAM,IAAI,GAAG,KAAK,CAAC,sBAAsB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACpD,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE;YACzB,OAAO;SACR;QAED,IAAA,sCAAsB,EACpB,KAAK,EACL,IAAI,EACJ,GAAG,EACH,GAAG,EACH,UAAU,EACV,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAClC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAC/B,CAAC;KACH;AACH,CAAC","file":"update-width.js","sourcesContent":["import type { IGraphic } from './../../vrender';\nimport type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport { CartesianAxis } from '../../components/axis/axis';\nimport { getStyleTheme } from '../../core/tableHelper';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport type { IProgressbarColumnBodyDefine } from '../../ts-types/list-table/define/progressbar-define';\nimport { dealWithCustom } from '../component/custom';\nimport type { Group } from '../graphic/group';\nimport type { Icon } from '../graphic/icon';\nimport { updateImageCellContentWhileResize } from '../group-creater/cell-type/image-cell';\nimport { createProgressBarCell } from '../group-creater/cell-type/progress-bar-cell';\nimport { createSparkLineCellGroup } from '../group-creater/cell-type/spark-line-cell';\nimport { resizeCellGroup } from '../group-creater/column-helper';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport { getProp } from '../utils/get-prop';\nimport { isMergeCellGroup } from '../utils/is-merge-cell-group';\nimport { getQuadProps } from '../utils/padding';\nimport { updateCellContentWidth } from '../utils/text-icon-layout';\nimport { computeRowHeight, computeRowsHeight } from './compute-row-height';\nimport { updateCellHeightForRow } from './update-height';\nimport { getHierarchyOffset } from '../utils/get-hierarchy-offset';\n// import { updateAutoRowHeight } from './auto-height';\n\n/**\n * @description: 更新指定列列宽,在拖拽调整列宽中使用\n * @param {Scenegraph} scene\n * @param {number} col\n * @param {number} detaX\n * @return {*}\n */\nexport function updateColWidth(scene: Scenegraph, col: number, detaX: number, skipTableWidthMap?: boolean) {\n if (!skipTableWidthMap) {\n scene.table._setColWidth(col, scene.table.getColWidth(col) + detaX, true);\n }\n\n const autoRowHeight = scene.table.heightMode === 'autoHeight';\n // deal with corner header or column header\n const colOrCornerHeaderColumn = scene.getColGroup(col, true) as Group;\n const rightTopColumn = scene.getColGroupInRightTopCorner(col);\n if (colOrCornerHeaderColumn && !rightTopColumn) {\n updateColunmWidth(colOrCornerHeaderColumn, detaX, autoRowHeight, 'col-corner', scene);\n }\n // deal with right bottom frozen cells\n if (rightTopColumn) {\n updateColunmWidth(rightTopColumn, detaX, autoRowHeight, 'right-top', scene);\n }\n\n // deal with row header or body or right frozen cells\n const rowHeaderOrBodyColumn = scene.getColGroup(col) as Group;\n if (rowHeaderOrBodyColumn) {\n updateColunmWidth(rowHeaderOrBodyColumn, detaX, autoRowHeight, 'row-body', scene);\n }\n\n const leftBottomColumn = scene.getColGroupInLeftBottomCorner(col);\n // deal with left bottom frozen cells\n if (leftBottomColumn) {\n updateColunmWidth(leftBottomColumn, detaX, autoRowHeight, 'left-bottom', scene);\n }\n // deal with bottom frozen cells\n const bottomColumn = scene.getColGroupInBottom(col);\n if (bottomColumn) {\n updateColunmWidth(bottomColumn, detaX, autoRowHeight, 'bottom', scene);\n }\n // deal with right bottom frozen cells\n const rightBottomColumn = scene.getColGroupInRightBottomCorner(col);\n if (rightBottomColumn) {\n updateColunmWidth(rightBottomColumn, detaX, autoRowHeight, 'right-bottom', scene);\n }\n\n // 更新剩余列位置\n if (col < scene.frozenColCount) {\n scene.cornerHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.rowHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n } else {\n scene.colHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.bodyGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n\n if (leftBottomColumn) {\n scene.leftBottomCornerGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n if (bottomColumn) {\n scene.bottomFrozenGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n if (rightBottomColumn) {\n scene.rightBottomCornerGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n\n // scene.table.setColWidth(col, rowHeaderOrBodyColumn.attribute.width, true);\n}\n\nfunction updateColunmWidth(\n columnGroup: Group,\n detaX: number,\n autoRowHeight: boolean,\n mode: 'col-corner' | 'row-body' | 'bottom' | 'left-bottom' | 'right-top' | 'right-bottom',\n scene: Scenegraph\n) {\n let needRerangeRow = false;\n // const colOrCornerHeaderColumn = scene.getColGroup(col, true) as Group;\n const oldColumnWidth = columnGroup?.attribute.width ?? 0;\n columnGroup?.setAttribute('width', oldColumnWidth + detaX);\n // 更新单元格宽度\n columnGroup?.forEachChildren((cell: Group, index: number) => {\n const isHeightChange = updateCellWidth(\n scene,\n cell,\n cell.col,\n cell.row,\n oldColumnWidth,\n oldColumnWidth + detaX,\n detaX,\n mode === 'row-body' ? cell.col < scene.table.rowHeaderLevelCount : true,\n autoRowHeight\n );\n if (isHeightChange) {\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n resetRowHeight(scene, row);\n }\n } else {\n resetRowHeight(scene, cell.row);\n }\n needRerangeRow = true;\n }\n });\n\n if (needRerangeRow) {\n let newTotalHeight = 0;\n let colGroup;\n let oldContainerHeight;\n let row;\n for (let col = 0; col < scene.table.colCount; col++) {\n // const colGroup = scene.getColGroup(col, true);\n if (mode === 'col-corner') {\n row = 0;\n colGroup = scene.getColGroup(col, true);\n oldContainerHeight = scene.colHeaderGroup.attribute.height ?? 0;\n } else if (mode === 'row-body') {\n row = scene.table.frozenRowCount;\n colGroup = scene.getColGroup(col, false);\n oldContainerHeight = scene.bodyGroup.attribute.height ?? 0;\n } else if (mode === 'bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInBottom(col);\n oldContainerHeight = scene.bottomFrozenGroup.attribute.height ?? 0;\n } else if (mode === 'left-bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInLeftBottomCorner(col);\n oldContainerHeight = scene.leftBottomCornerGroup.attribute.height ?? 0;\n } else if (mode === 'right-top') {\n row = 0;\n colGroup = scene.getColGroupInRightTopCorner(col);\n oldContainerHeight = scene.rightTopCornerGroup.attribute.height ?? 0;\n } else if (mode === 'right-bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInRightBottomCorner(col);\n oldContainerHeight = scene.rightBottomCornerGroup.attribute.height ?? 0;\n }\n if (!colGroup) {\n continue;\n }\n let y = 0;\n colGroup.forEachChildren((cellGroup: Group) => {\n // if (cellGroup.role !== 'cell') {\n // cellGroup.setAttribute('y', y);\n // y += scene.table.getRowHeight(cellGroup.row) ?? 0;\n // return;\n // }\n // y += cellGroup.attribute.height ?? 0;\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row) ?? 0;\n });\n newTotalHeight = y;\n }\n scene.updateContainerHeight(row, newTotalHeight - oldContainerHeight);\n }\n}\n\n/**\n * @description: 更新单个单元格宽度\n * @return {*}\n */\nfunction updateCellWidth(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n oldWidth: number, // old width, not dist\n distWidth: number, // old width, not dist\n detaX: number,\n isHeader: boolean,\n // autoColWidth: boolean,\n autoRowHeight: boolean\n): boolean {\n if (cell.attribute.width === distWidth && !cell.needUpdateWidth) {\n return false;\n }\n cell.needUpdateWidth = false;\n\n cell.setAttribute('width', distWidth);\n // const mergeInfo = getCellMergeInfo(scene.table, col, row);\n // if (mergeInfo && mergeInfo.start.row !== row) {\n // return false;\n // }\n const cellGroup = cell;\n // const distWidth = width + detaX;\n\n if (!cellGroup) {\n // 合并单元格非主单元格,不处理\n return false;\n }\n\n // 更新单元格布局\n const type = scene.table.isHeader(col, row)\n ? scene.table._getHeaderLayoutMap(col, row).headerType\n : scene.table.getBodyColumnType(col, row);\n let isHeightChange = false;\n if (type === 'progressbar') {\n // 目前先采用重新生成节点的方案\n const columnDefine = scene.table.getBodyColumnDefine(col, row) as IProgressbarColumnBodyDefine;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const value = scene.table.getCellValue(col, row);\n const dataValue = scene.table.getCellOriginValue(col, row);\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n\n const newBarCell = createProgressBarCell(\n columnDefine,\n style,\n cellGroup.attribute.width,\n // cellGroup.attribute.height,\n value,\n dataValue,\n col,\n row,\n padding,\n scene.table\n );\n\n const oldBarCell = cellGroup.getChildByName('progress-bar') as Group;\n // cell.replaceChild(newBarCell, oldBarCell);\n cellGroup.insertBefore(newBarCell, oldBarCell);\n cellGroup.removeChild(oldBarCell);\n oldBarCell.removeAllChild();\n oldBarCell.release();\n } else if (type === 'sparkline') {\n // 目前先采用重新生成节点的方案\n cellGroup.removeAllChild();\n const headerStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', headerStyle, col, row, scene.table));\n createSparkLineCellGroup(\n cellGroup,\n cellGroup.parent,\n cellGroup.attribute.x,\n cellGroup.attribute.y,\n col,\n row,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n padding,\n scene.table,\n getStyleTheme(headerStyle, scene.table, col, row, getProp).theme\n );\n } else if (type === 'image' || type === 'video') {\n // // 只更新背景边框\n // const rect = cell.firstChild as Rect;\n // rect.setAttribute('width', cell.attribute.width);\n updateImageCellContentWhileResize(cellGroup, col, row, scene.table);\n } else if (cellGroup.firstChild?.name === 'axis') {\n // recreate axis component\n const axisConfig = scene.table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);\n const cellStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', cellStyle, col, row, scene.table));\n if (axisConfig) {\n const axis = new CartesianAxis(\n axisConfig,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n padding,\n scene.table\n );\n cellGroup.clear();\n cellGroup.appendChild(axis.component);\n axis.overlap();\n }\n } else if (cell.firstChild?.name === 'axis') {\n (cell.firstChild as any)?.originAxis.resize(cell.attribute.width, cell.attribute.height);\n } else {\n let renderDefault = true;\n const customContainer = cell.getChildByName('custom-container') as Group;\n if (customContainer) {\n let customElementsGroup;\n customContainer.removeAllChild();\n cell.removeChild(customContainer);\n\n let customRender;\n let customLayout;\n const cellType = scene.table.getCellLocation(col, row);\n if (cellType !== 'body') {\n const define = scene.table.getHeaderDefine(col, row);\n customRender = define?.headerCustomRender;\n customLayout = define?.headerCustomLayout;\n } else {\n const define = scene.table.getBodyColumnDefine(col, row);\n customRender = define?.customRender || scene.table.customRender;\n customLayout = define?.customLayout;\n }\n\n if (customLayout || customRender) {\n // const { autoRowHeight } = table.internalProps;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n const customResult = dealWithCustom(\n customLayout,\n customRender,\n col,\n row,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n false,\n scene.table.heightMode === 'autoHeight',\n padding,\n scene.table\n );\n customElementsGroup = customResult.elementsGroup;\n renderDefault = customResult.renderDefault;\n isHeightChange = true;\n }\n\n if (cell.childrenCount > 0) {\n cell.insertBefore(customElementsGroup, cell.firstChild);\n } else {\n cell.appendChild(customElementsGroup);\n }\n }\n\n if (renderDefault) {\n // 处理文字\n const style = scene.table._getCellStyle(col, row);\n isHeightChange = updateMergeCellContentWidth(\n cellGroup,\n distWidth,\n detaX,\n autoRowHeight,\n getQuadProps(style.padding as number),\n style.textAlign,\n style.textBaseline,\n scene.table\n );\n }\n }\n\n return autoRowHeight ? isHeightChange : false;\n}\n\nfunction updateMergeCellContentWidth(\n cellGroup: Group,\n distWidth: number,\n detaX: number,\n autoRowHeight: boolean,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n table: BaseTableAPI\n) {\n if (isMergeCellGroup(cellGroup)) {\n distWidth = 0;\n let isHeightChange = false;\n for (let col = cellGroup.mergeStartCol; col <= cellGroup.mergeEndCol; col++) {\n distWidth += table.getColWidth(col);\n }\n let cellHeight = 0;\n for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {\n cellHeight += table.getRowHeight(row);\n }\n\n for (let col = cellGroup.mergeStartCol; col <= cellGroup.mergeEndCol; col++) {\n for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {\n const singleCellGroup = table.scenegraph.getCell(col, row);\n singleCellGroup.forEachChildren((child: IGraphic) => {\n child.setAttributes({\n dx: 0,\n dy: 0\n });\n });\n const changed = updateCellContentWidth(\n singleCellGroup,\n distWidth,\n cellHeight,\n detaX,\n autoRowHeight,\n padding,\n textAlign,\n textBaseline,\n table.scenegraph\n );\n\n // reset hierarchy offset\n const hierarchyOffset = getHierarchyOffset(singleCellGroup.col, singleCellGroup.row, table);\n if (hierarchyOffset) {\n const text = singleCellGroup.getChildByName('text');\n const icon = singleCellGroup.getChildByName('expand') || singleCellGroup.getChildByName('collapse');\n // icon-left deal with hierarchy offset, no need add to text dx\n if (icon?.role !== 'icon-left' && text) {\n text.setAttribute('dx', hierarchyOffset);\n }\n }\n\n const rangeHeight = table.getRowHeight(row);\n const rangeWidth = table.getColWidth(col);\n\n // const { width: contentWidth } = cellGroup.attribute;\n singleCellGroup.contentWidth = distWidth;\n\n const { heightChange } = resizeCellGroup(\n singleCellGroup,\n rangeWidth,\n rangeHeight,\n {\n start: {\n col: cellGroup.mergeStartCol,\n row: cellGroup.mergeStartRow\n },\n end: {\n col: cellGroup.mergeEndCol,\n row: cellGroup.mergeEndRow\n }\n },\n table\n );\n\n if (heightChange) {\n singleCellGroup.needUpdateHeight = true;\n }\n\n isHeightChange = isHeightChange || changed;\n }\n }\n return isHeightChange;\n }\n return updateCellContentWidth(\n cellGroup,\n distWidth,\n table.getRowHeight(cellGroup.row),\n detaX,\n autoRowHeight,\n padding,\n textAlign,\n textBaseline,\n table.scenegraph\n );\n}\n\n/**\n * @description: 重置指定行行高\n * @param {Scenegraph} scene\n * @param {number} row\n * @return {*}\n */\nfunction resetRowHeight(scene: Scenegraph, row: number) {\n // 获取高度\n const maxHeight = Math.round(computeRowHeight(row, 0, scene.table.colCount - 1, scene.table));\n // 更新table行高存储\n scene.table._setRowHeight(row, maxHeight, true);\n\n // 更新高度\n for (let col = 0; col < scene.table.colCount; col++) {\n const distHeight = maxHeight;\n const cell = scene.highPerformanceGetCell(col, row);\n if (cell.role === 'empty') {\n return;\n }\n\n updateCellHeightForRow(\n scene,\n cell,\n col,\n row,\n distHeight,\n distHeight - cell.attribute.height,\n scene.table.isHeader(col, row)\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/scenegraph/layout/update-width.ts"],"names":[],"mappings":";;;AAEA,qDAA2D;AAC3D,wDAAuD;AAGvD,gDAA+E;AAG/E,sEAA0F;AAC1F,oFAAqF;AACrF,gFAAsF;AACtF,kEAAiE;AAEjE,4DAA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,CAAC,UAAU,CACjB,CAAC;AACJ,CAAC;AAQD,SAAS,cAAc,CAAC,KAAiB,EAAE,GAAW;IAEpD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,qCAAgB,EAAC,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAE9F,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IAGhD,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE;QACnD,MAAM,UAAU,GAAG,SAAS,CAAC;QAC7B,MAAM,IAAI,GAAG,KAAK,CAAC,sBAAsB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACpD,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE;YACzB,OAAO;SACR;QAED,IAAA,sCAAsB,EACpB,KAAK,EACL,IAAI,EACJ,GAAG,EACH,GAAG,EACH,UAAU,EACV,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAClC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAC/B,CAAC;KACH;AACH,CAAC","file":"update-width.js","sourcesContent":["import type { IGraphic } from './../../vrender';\nimport type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport { CartesianAxis } from '../../components/axis/axis';\nimport { getStyleTheme } from '../../core/tableHelper';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport type { IProgressbarColumnBodyDefine } from '../../ts-types/list-table/define/progressbar-define';\nimport { dealWithCustom, getCustomCellMergeCustom } from '../component/custom';\nimport type { Group } from '../graphic/group';\nimport type { Icon } from '../graphic/icon';\nimport { updateImageCellContentWhileResize } from '../group-creater/cell-type/image-cell';\nimport { createProgressBarCell } from '../group-creater/cell-type/progress-bar-cell';\nimport { createSparkLineCellGroup } from '../group-creater/cell-type/spark-line-cell';\nimport { resizeCellGroup } from '../group-creater/column-helper';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport { getProp } from '../utils/get-prop';\nimport { isMergeCellGroup } from '../utils/is-merge-cell-group';\nimport { getQuadProps } from '../utils/padding';\nimport { updateCellContentWidth } from '../utils/text-icon-layout';\nimport { computeRowHeight, computeRowsHeight } from './compute-row-height';\nimport { updateCellHeightForRow } from './update-height';\nimport { getHierarchyOffset } from '../utils/get-hierarchy-offset';\n// import { updateAutoRowHeight } from './auto-height';\n\n/**\n * @description: 更新指定列列宽,在拖拽调整列宽中使用\n * @param {Scenegraph} scene\n * @param {number} col\n * @param {number} detaX\n * @return {*}\n */\nexport function updateColWidth(scene: Scenegraph, col: number, detaX: number, skipTableWidthMap?: boolean) {\n if (!skipTableWidthMap) {\n scene.table._setColWidth(col, scene.table.getColWidth(col) + detaX, true);\n }\n\n const autoRowHeight = scene.table.heightMode === 'autoHeight';\n // deal with corner header or column header\n const colOrCornerHeaderColumn = scene.getColGroup(col, true) as Group;\n const rightTopColumn = scene.getColGroupInRightTopCorner(col);\n if (colOrCornerHeaderColumn && !rightTopColumn) {\n updateColunmWidth(colOrCornerHeaderColumn, detaX, autoRowHeight, 'col-corner', scene);\n }\n // deal with right bottom frozen cells\n if (rightTopColumn) {\n updateColunmWidth(rightTopColumn, detaX, autoRowHeight, 'right-top', scene);\n }\n\n // deal with row header or body or right frozen cells\n const rowHeaderOrBodyColumn = scene.getColGroup(col) as Group;\n if (rowHeaderOrBodyColumn) {\n updateColunmWidth(rowHeaderOrBodyColumn, detaX, autoRowHeight, 'row-body', scene);\n }\n\n const leftBottomColumn = scene.getColGroupInLeftBottomCorner(col);\n // deal with left bottom frozen cells\n if (leftBottomColumn) {\n updateColunmWidth(leftBottomColumn, detaX, autoRowHeight, 'left-bottom', scene);\n }\n // deal with bottom frozen cells\n const bottomColumn = scene.getColGroupInBottom(col);\n if (bottomColumn) {\n updateColunmWidth(bottomColumn, detaX, autoRowHeight, 'bottom', scene);\n }\n // deal with right bottom frozen cells\n const rightBottomColumn = scene.getColGroupInRightBottomCorner(col);\n if (rightBottomColumn) {\n updateColunmWidth(rightBottomColumn, detaX, autoRowHeight, 'right-bottom', scene);\n }\n\n // 更新剩余列位置\n if (col < scene.frozenColCount) {\n scene.cornerHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.rowHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n } else {\n scene.colHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.bodyGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n\n if (leftBottomColumn) {\n scene.leftBottomCornerGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n if (bottomColumn) {\n scene.bottomFrozenGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n if (rightBottomColumn) {\n scene.rightBottomCornerGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n\n // scene.table.setColWidth(col, rowHeaderOrBodyColumn.attribute.width, true);\n}\n\nfunction updateColunmWidth(\n columnGroup: Group,\n detaX: number,\n autoRowHeight: boolean,\n mode: 'col-corner' | 'row-body' | 'bottom' | 'left-bottom' | 'right-top' | 'right-bottom',\n scene: Scenegraph\n) {\n let needRerangeRow = false;\n // const colOrCornerHeaderColumn = scene.getColGroup(col, true) as Group;\n const oldColumnWidth = columnGroup?.attribute.width ?? 0;\n columnGroup?.setAttribute('width', oldColumnWidth + detaX);\n // 更新单元格宽度\n columnGroup?.forEachChildren((cell: Group, index: number) => {\n const isHeightChange = updateCellWidth(\n scene,\n cell,\n cell.col,\n cell.row,\n oldColumnWidth,\n oldColumnWidth + detaX,\n detaX,\n mode === 'row-body' ? cell.col < scene.table.rowHeaderLevelCount : true,\n autoRowHeight\n );\n if (isHeightChange) {\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n resetRowHeight(scene, row);\n }\n } else {\n resetRowHeight(scene, cell.row);\n }\n needRerangeRow = true;\n }\n });\n\n if (needRerangeRow) {\n let newTotalHeight = 0;\n let colGroup;\n let oldContainerHeight;\n let row;\n for (let col = 0; col < scene.table.colCount; col++) {\n // const colGroup = scene.getColGroup(col, true);\n if (mode === 'col-corner') {\n row = 0;\n colGroup = scene.getColGroup(col, true);\n oldContainerHeight = scene.colHeaderGroup.attribute.height ?? 0;\n } else if (mode === 'row-body') {\n row = scene.table.frozenRowCount;\n colGroup = scene.getColGroup(col, false);\n oldContainerHeight = scene.bodyGroup.attribute.height ?? 0;\n } else if (mode === 'bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInBottom(col);\n oldContainerHeight = scene.bottomFrozenGroup.attribute.height ?? 0;\n } else if (mode === 'left-bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInLeftBottomCorner(col);\n oldContainerHeight = scene.leftBottomCornerGroup.attribute.height ?? 0;\n } else if (mode === 'right-top') {\n row = 0;\n colGroup = scene.getColGroupInRightTopCorner(col);\n oldContainerHeight = scene.rightTopCornerGroup.attribute.height ?? 0;\n } else if (mode === 'right-bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInRightBottomCorner(col);\n oldContainerHeight = scene.rightBottomCornerGroup.attribute.height ?? 0;\n }\n if (!colGroup) {\n continue;\n }\n let y = 0;\n colGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row) ?? 0;\n });\n newTotalHeight = y;\n }\n scene.updateContainerHeight(row, newTotalHeight - oldContainerHeight);\n //#region 修改bug:https://github.com/VisActor/VTable/issues/954 添加底部冻结行的三块区域\n for (let col = 0; col < scene.table.frozenColCount; col++) {\n const leftBottomFrozenColumnGroup = scene.getColGroupInLeftBottomCorner(col);\n // reset cell y\n let y = 0;\n leftBottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row);\n });\n }\n for (let col = scene.table.colCount - scene.table.rightFrozenColCount; col < scene.table.colCount; col++) {\n const rightBottomFrozenColumnGroup = scene.getColGroupInRightBottomCorner(col);\n // reset cell y\n let y = 0;\n rightBottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row);\n });\n }\n\n for (let col = scene.table.frozenColCount; col < scene.table.colCount - scene.table.rightFrozenColCount; col++) {\n const rightBottomFrozenColumnGroup = scene.getColGroupInBottom(col);\n // reset cell y\n let y = 0;\n rightBottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row);\n });\n }\n //#endregion\n }\n}\n\n/**\n * @description: 更新单个单元格宽度\n * @return {*}\n */\nfunction updateCellWidth(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n oldWidth: number, // old width, not dist\n distWidth: number, // old width, not dist\n detaX: number,\n isHeader: boolean,\n // autoColWidth: boolean,\n autoRowHeight: boolean\n): boolean {\n if (cell.attribute.width === distWidth && !cell.needUpdateWidth) {\n return false;\n }\n cell.needUpdateWidth = false;\n\n cell.setAttribute('width', distWidth);\n // const mergeInfo = getCellMergeInfo(scene.table, col, row);\n // if (mergeInfo && mergeInfo.start.row !== row) {\n // return false;\n // }\n const cellGroup = cell;\n // const distWidth = width + detaX;\n\n if (!cellGroup) {\n // 合并单元格非主单元格,不处理\n return false;\n }\n\n // 更新单元格布局\n const type = scene.table.isHeader(col, row)\n ? scene.table._getHeaderLayoutMap(col, row).headerType\n : scene.table.getBodyColumnType(col, row);\n let isHeightChange = false;\n if (type === 'progressbar') {\n // 目前先采用重新生成节点的方案\n const columnDefine = scene.table.getBodyColumnDefine(col, row) as IProgressbarColumnBodyDefine;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const value = scene.table.getCellValue(col, row);\n const dataValue = scene.table.getCellOriginValue(col, row);\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n\n const newBarCell = createProgressBarCell(\n columnDefine,\n style,\n cellGroup.attribute.width,\n // cellGroup.attribute.height,\n value,\n dataValue,\n col,\n row,\n padding,\n scene.table\n );\n\n const oldBarCell = cellGroup.getChildByName('progress-bar') as Group;\n // cell.replaceChild(newBarCell, oldBarCell);\n cellGroup.insertBefore(newBarCell, oldBarCell);\n cellGroup.removeChild(oldBarCell);\n oldBarCell.removeAllChild();\n oldBarCell.release();\n } else if (type === 'sparkline') {\n // 目前先采用重新生成节点的方案\n cellGroup.removeAllChild();\n const headerStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', headerStyle, col, row, scene.table));\n createSparkLineCellGroup(\n cellGroup,\n cellGroup.parent,\n cellGroup.attribute.x,\n cellGroup.attribute.y,\n col,\n row,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n padding,\n scene.table,\n getStyleTheme(headerStyle, scene.table, col, row, getProp).theme\n );\n } else if (type === 'image' || type === 'video') {\n // // 只更新背景边框\n // const rect = cell.firstChild as Rect;\n // rect.setAttribute('width', cell.attribute.width);\n updateImageCellContentWhileResize(cellGroup, col, row, scene.table);\n } else if (cellGroup.firstChild?.name === 'axis') {\n // recreate axis component\n const axisConfig = scene.table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);\n const cellStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', cellStyle, col, row, scene.table));\n if (axisConfig) {\n const axis = new CartesianAxis(\n axisConfig,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n padding,\n scene.table\n );\n cellGroup.clear();\n cellGroup.appendChild(axis.component);\n axis.overlap();\n }\n } else if (cell.firstChild?.name === 'axis') {\n (cell.firstChild as any)?.originAxis.resize(cell.attribute.width, cell.attribute.height);\n } else {\n let renderDefault = true;\n const customContainer = cell.getChildByName('custom-container') as Group;\n if (customContainer) {\n let customElementsGroup;\n customContainer.removeAllChild();\n cell.removeChild(customContainer);\n\n if (!getCustomCellMergeCustom(col, row, cell, scene.table)) {\n let customRender;\n let customLayout;\n const cellType = scene.table.getCellLocation(col, row);\n if (cellType !== 'body') {\n const define = scene.table.getHeaderDefine(col, row);\n customRender = define?.headerCustomRender;\n customLayout = define?.headerCustomLayout;\n } else {\n const define = scene.table.getBodyColumnDefine(col, row);\n customRender = define?.customRender || scene.table.customRender;\n customLayout = define?.customLayout;\n }\n\n if (customLayout || customRender) {\n // const { autoRowHeight } = table.internalProps;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n const customResult = dealWithCustom(\n customLayout,\n customRender,\n col,\n row,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n false,\n scene.table.heightMode === 'autoHeight',\n padding,\n scene.table\n );\n customElementsGroup = customResult.elementsGroup;\n renderDefault = customResult.renderDefault;\n isHeightChange = true;\n }\n\n if (cell.childrenCount > 0 && customElementsGroup) {\n cell.insertBefore(customElementsGroup, cell.firstChild);\n } else if (customElementsGroup) {\n cell.appendChild(customElementsGroup);\n }\n }\n }\n\n if (renderDefault) {\n // 处理文字\n const style = scene.table._getCellStyle(col, row);\n isHeightChange = updateMergeCellContentWidth(\n cellGroup,\n distWidth,\n detaX,\n autoRowHeight,\n getQuadProps(style.padding as number),\n style.textAlign,\n style.textBaseline,\n scene.table\n );\n }\n }\n\n return autoRowHeight ? isHeightChange : false;\n}\n\nfunction updateMergeCellContentWidth(\n cellGroup: Group,\n distWidth: number,\n detaX: number,\n autoRowHeight: boolean,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n table: BaseTableAPI\n) {\n if (isMergeCellGroup(cellGroup)) {\n distWidth = 0;\n let isHeightChange = false;\n for (let col = cellGroup.mergeStartCol; col <= cellGroup.mergeEndCol; col++) {\n distWidth += table.getColWidth(col);\n }\n let cellHeight = 0;\n for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {\n cellHeight += table.getRowHeight(row);\n }\n\n for (let col = cellGroup.mergeStartCol; col <= cellGroup.mergeEndCol; col++) {\n for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {\n const singleCellGroup = table.scenegraph.getCell(col, row);\n singleCellGroup.forEachChildren((child: IGraphic) => {\n child.setAttributes({\n dx: 0,\n dy: 0\n });\n });\n const changed = updateCellContentWidth(\n singleCellGroup,\n distWidth,\n cellHeight,\n detaX,\n autoRowHeight,\n padding,\n textAlign,\n textBaseline,\n table.scenegraph\n );\n\n // reset hierarchy offset\n const hierarchyOffset = getHierarchyOffset(singleCellGroup.col, singleCellGroup.row, table);\n if (hierarchyOffset) {\n const text = singleCellGroup.getChildByName('text');\n const icon = singleCellGroup.getChildByName('expand') || singleCellGroup.getChildByName('collapse');\n // icon-left deal with hierarchy offset, no need add to text dx\n if (icon?.role !== 'icon-left' && text) {\n text.setAttribute('dx', hierarchyOffset);\n }\n }\n\n const rangeHeight = table.getRowHeight(row);\n const rangeWidth = table.getColWidth(col);\n\n // const { width: contentWidth } = cellGroup.attribute;\n singleCellGroup.contentWidth = distWidth;\n\n const { heightChange } = resizeCellGroup(\n singleCellGroup,\n rangeWidth,\n rangeHeight,\n {\n start: {\n col: cellGroup.mergeStartCol,\n row: cellGroup.mergeStartRow\n },\n end: {\n col: cellGroup.mergeEndCol,\n row: cellGroup.mergeEndRow\n }\n },\n table\n );\n\n if (heightChange) {\n singleCellGroup.needUpdateHeight = true;\n }\n\n isHeightChange = isHeightChange || changed;\n }\n }\n return isHeightChange;\n }\n return updateCellContentWidth(\n cellGroup,\n distWidth,\n table.getRowHeight(cellGroup.row),\n detaX,\n autoRowHeight,\n padding,\n textAlign,\n textBaseline,\n table.scenegraph\n );\n}\n\n/**\n * @description: 重置指定行行高\n * @param {Scenegraph} scene\n * @param {number} row\n * @return {*}\n */\nfunction resetRowHeight(scene: Scenegraph, row: number) {\n // 获取高度\n const maxHeight = Math.round(computeRowHeight(row, 0, scene.table.colCount - 1, scene.table));\n // 更新table行高存储\n scene.table._setRowHeight(row, maxHeight, true);\n\n // 更新高度\n for (let col = 0; col < scene.table.colCount; col++) {\n const distHeight = maxHeight;\n const cell = scene.highPerformanceGetCell(col, row);\n if (cell.role === 'empty') {\n return;\n }\n\n updateCellHeightForRow(\n scene,\n cell,\n col,\n row,\n distHeight,\n distHeight - cell.attribute.height,\n scene.table.isHeader(col, row)\n );\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { IStage, IRect } from './../vrender';
2
- import type { CellSubLocation } from '../ts-types';
2
+ import type { CellRange, CellSubLocation } from '../ts-types';
3
3
  import { type CellAddress, type SortOrder } from '../ts-types';
4
4
  import type { Group } from './graphic/group';
5
5
  import type { Icon } from './graphic/icon';
@@ -119,7 +119,7 @@ export declare class Scenegraph {
119
119
  dealFrozen(): void;
120
120
  resetFrozen(): void;
121
121
  updateCellLayoutWidthCertainWidth(columnGroup: Group, detaRow: number, col: number): boolean;
122
- updateHeaderPosition(colSource: number, rowSource: number, colTarget: number, rowTarget: number): void;
122
+ updateHeaderPosition(colSource: number, rowSource: number, colTarget: number, rowTarget: number, sourceMergeInfo: false | CellRange, targetMergeInfo: false | CellRange): void;
123
123
  updateContainerAttrWidthAndX(): void;
124
124
  updateContainer(): void;
125
125
  updateCellContentWhileResize(col: number, row: number): void;
@@ -389,14 +389,17 @@ class Scenegraph {
389
389
  }));
390
390
  }
391
391
  updateRowHeight(row, detaY, skipTableHeightMap) {
392
- detaY = Math.round(detaY), (0, update_height_1.updateRowHeight)(this, row, detaY, skipTableHeightMap),
393
- this.updateContainerHeight(row, detaY);
392
+ row >= this.proxy.rowStart && row <= this.proxy.rowEnd && (detaY = Math.round(detaY),
393
+ (0, update_height_1.updateRowHeight)(this, row, detaY, skipTableHeightMap), this.updateContainerHeight(row, detaY));
394
394
  }
395
395
  updateRowsHeight(rows, detaYs, skipTableHeightMap) {
396
396
  for (let i = 0; i < rows.length; i++) {
397
- const row = rows[i], detaY = detaYs[i];
398
- (0, update_height_1.updateRowHeight)(this, row, Math.round(detaY), skipTableHeightMap),
399
- this._updateContainerHeight(row, detaY);
397
+ const row = rows[i];
398
+ if (row >= this.proxy.rowStart && row <= this.proxy.rowEnd) {
399
+ const detaY = detaYs[i];
400
+ (0, update_height_1.updateRowHeight)(this, row, Math.round(detaY), skipTableHeightMap),
401
+ this._updateContainerHeight(row, detaY);
402
+ }
400
403
  }
401
404
  this.updateTableSize(), this.component.updateScrollBar(), this.updateNextFrame();
402
405
  }
@@ -553,8 +556,8 @@ class Scenegraph {
553
556
  (rowHeight === oldCellHeight || newCellHeight > rowHeight) && (isUpdate = !0));
554
557
  })), isUpdate;
555
558
  }
556
- updateHeaderPosition(colSource, rowSource, colTarget, rowTarget) {
557
- (0, move_cell_1.moveHeaderPosition)(colSource, rowSource, colTarget, rowTarget, this.table);
559
+ updateHeaderPosition(colSource, rowSource, colTarget, rowTarget, sourceMergeInfo, targetMergeInfo) {
560
+ (0, move_cell_1.moveHeaderPosition)(colSource, rowSource, colTarget, rowTarget, sourceMergeInfo, targetMergeInfo, this.table);
558
561
  }
559
562
  updateContainerAttrWidthAndX() {
560
563
  var _a, _b, _c;