@visactor/vtable 0.15.0 → 0.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (235) hide show
  1. package/cjs/ListTable.d.ts +1 -0
  2. package/cjs/ListTable.js +32 -14
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotChart.js +25 -14
  5. package/cjs/PivotChart.js.map +1 -1
  6. package/cjs/PivotTable.js +15 -7
  7. package/cjs/PivotTable.js.map +1 -1
  8. package/cjs/components/menu/dom/logic/MenuElement.js +5 -5
  9. package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -1
  10. package/cjs/components/tooltip/TooltipHandler.js +3 -3
  11. package/cjs/components/tooltip/TooltipHandler.js.map +1 -1
  12. package/cjs/components/tooltip/logic/BubbleTooltipElement.js +2 -2
  13. package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
  14. package/cjs/core/BaseTable.d.ts +7 -7
  15. package/cjs/core/BaseTable.js +52 -35
  16. package/cjs/core/BaseTable.js.map +1 -1
  17. package/cjs/event/drill.js +3 -3
  18. package/cjs/event/drill.js.map +1 -1
  19. package/cjs/event/event.d.ts +1 -1
  20. package/cjs/event/event.js +19 -19
  21. package/cjs/event/event.js.map +1 -1
  22. package/cjs/event/listener/container-dom.d.ts +2 -2
  23. package/cjs/event/listener/container-dom.js +6 -7
  24. package/cjs/event/listener/container-dom.js.map +1 -1
  25. package/cjs/event/listener/scroll-bar.d.ts +2 -2
  26. package/cjs/event/listener/scroll-bar.js +16 -16
  27. package/cjs/event/listener/scroll-bar.js.map +1 -1
  28. package/cjs/event/listener/table-group.d.ts +3 -3
  29. package/cjs/event/listener/table-group.js +77 -67
  30. package/cjs/event/listener/table-group.js.map +1 -1
  31. package/cjs/event/listener/touch.d.ts +2 -2
  32. package/cjs/event/listener/touch.js +23 -23
  33. package/cjs/event/listener/touch.js.map +1 -1
  34. package/cjs/event/pivot-chart/axis-click.js +1 -1
  35. package/cjs/event/pivot-chart/axis-click.js.map +1 -1
  36. package/cjs/event/scroll.d.ts +4 -4
  37. package/cjs/event/scroll.js.map +1 -1
  38. package/cjs/event/sparkline-event.js +3 -3
  39. package/cjs/event/sparkline-event.js.map +1 -1
  40. package/cjs/header-helper/header-helper.js +2 -2
  41. package/cjs/header-helper/header-helper.js.map +1 -1
  42. package/cjs/index.d.ts +1 -1
  43. package/cjs/index.js +1 -1
  44. package/cjs/index.js.map +1 -1
  45. package/cjs/layout/chart-helper/get-chart-spec.js +2 -6
  46. package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
  47. package/cjs/layout/pivot-header-layout.js +17 -7
  48. package/cjs/layout/pivot-header-layout.js.map +1 -1
  49. package/cjs/scenegraph/component/cell-mover.js +6 -6
  50. package/cjs/scenegraph/component/cell-mover.js.map +1 -1
  51. package/cjs/scenegraph/component/table-component.js +2 -2
  52. package/cjs/scenegraph/component/table-component.js.map +1 -1
  53. package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +12 -9
  54. package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
  55. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +1 -1
  56. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  57. package/cjs/scenegraph/group-creater/cell-helper.js +8 -7
  58. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  59. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +2 -2
  60. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
  61. package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js +7 -8
  62. package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
  63. package/cjs/scenegraph/group-creater/column-helper.js +3 -3
  64. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  65. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +3 -3
  66. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  67. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +11 -4
  68. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  69. package/cjs/scenegraph/layout/auto-height.js +1 -1
  70. package/cjs/scenegraph/layout/auto-height.js.map +1 -1
  71. package/cjs/scenegraph/layout/compute-col-width.js +7 -3
  72. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  73. package/cjs/scenegraph/layout/compute-row-height.js +12 -8
  74. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  75. package/cjs/scenegraph/layout/move-cell.js +9 -3
  76. package/cjs/scenegraph/layout/move-cell.js.map +1 -1
  77. package/cjs/scenegraph/layout/update-height.js +1 -1
  78. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  79. package/cjs/scenegraph/layout/update-width.js +11 -7
  80. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  81. package/cjs/scenegraph/scenegraph.d.ts +1 -0
  82. package/cjs/scenegraph/scenegraph.js +20 -10
  83. package/cjs/scenegraph/scenegraph.js.map +1 -1
  84. package/cjs/scenegraph/utils/render-service.js +1 -1
  85. package/cjs/scenegraph/utils/render-service.js.map +1 -1
  86. package/cjs/state/cell-move/index.d.ts +4 -4
  87. package/cjs/state/cell-move/index.js +1 -1
  88. package/cjs/state/cell-move/index.js.map +1 -1
  89. package/cjs/state/frozen/index.js.map +1 -1
  90. package/cjs/state/hover/is-cell-hover.d.ts +2 -2
  91. package/cjs/state/hover/is-cell-hover.js +2 -2
  92. package/cjs/state/hover/is-cell-hover.js.map +1 -1
  93. package/cjs/state/hover/update-position.d.ts +2 -2
  94. package/cjs/state/hover/update-position.js.map +1 -1
  95. package/cjs/state/resize/update-resize-column.d.ts +2 -2
  96. package/cjs/state/resize/update-resize-column.js.map +1 -1
  97. package/cjs/state/select/update-position.d.ts +2 -2
  98. package/cjs/state/select/update-position.js +86 -88
  99. package/cjs/state/select/update-position.js.map +1 -1
  100. package/cjs/state/sort/index.js +2 -2
  101. package/cjs/state/sort/index.js.map +1 -1
  102. package/cjs/state/state.d.ts +1 -1
  103. package/cjs/state/state.js +8 -8
  104. package/cjs/state/state.js.map +1 -1
  105. package/cjs/themes/ARCO.js +1 -2
  106. package/cjs/themes/BRIGHT.js +2 -1
  107. package/cjs/tools/LimitPromiseQueue.js +1 -1
  108. package/cjs/tools/NumberMap.js +1 -1
  109. package/cjs/tools/util.js.map +1 -1
  110. package/cjs/ts-types/base-table.d.ts +6 -6
  111. package/cjs/ts-types/base-table.js +1 -1
  112. package/cjs/ts-types/base-table.js.map +1 -1
  113. package/cjs/ts-types/common.js +1 -1
  114. package/cjs/ts-types/events.d.ts +0 -1
  115. package/cjs/ts-types/events.js.map +1 -1
  116. package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
  117. package/dist/vtable.js +588 -420
  118. package/dist/vtable.min.js +2 -2
  119. package/es/ListTable.d.ts +1 -0
  120. package/es/ListTable.js +33 -14
  121. package/es/ListTable.js.map +1 -1
  122. package/es/PivotChart.js +26 -13
  123. package/es/PivotChart.js.map +1 -1
  124. package/es/PivotTable.js +17 -6
  125. package/es/PivotTable.js.map +1 -1
  126. package/es/components/menu/dom/logic/MenuElement.js +5 -5
  127. package/es/components/menu/dom/logic/MenuElement.js.map +1 -1
  128. package/es/components/tooltip/TooltipHandler.js +3 -3
  129. package/es/components/tooltip/TooltipHandler.js.map +1 -1
  130. package/es/components/tooltip/logic/BubbleTooltipElement.js +2 -2
  131. package/es/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
  132. package/es/core/BaseTable.d.ts +7 -7
  133. package/es/core/BaseTable.js +55 -38
  134. package/es/core/BaseTable.js.map +1 -1
  135. package/es/event/drill.js +3 -3
  136. package/es/event/drill.js.map +1 -1
  137. package/es/event/event.d.ts +1 -1
  138. package/es/event/event.js +16 -16
  139. package/es/event/event.js.map +1 -1
  140. package/es/event/listener/container-dom.d.ts +2 -2
  141. package/es/event/listener/container-dom.js +6 -7
  142. package/es/event/listener/container-dom.js.map +1 -1
  143. package/es/event/listener/scroll-bar.d.ts +2 -2
  144. package/es/event/listener/scroll-bar.js +15 -15
  145. package/es/event/listener/scroll-bar.js.map +1 -1
  146. package/es/event/listener/table-group.d.ts +3 -3
  147. package/es/event/listener/table-group.js +77 -66
  148. package/es/event/listener/table-group.js.map +1 -1
  149. package/es/event/listener/touch.d.ts +2 -2
  150. package/es/event/listener/touch.js +21 -21
  151. package/es/event/listener/touch.js.map +1 -1
  152. package/es/event/pivot-chart/axis-click.js +1 -1
  153. package/es/event/pivot-chart/axis-click.js.map +1 -1
  154. package/es/event/scroll.d.ts +4 -4
  155. package/es/event/scroll.js.map +1 -1
  156. package/es/event/sparkline-event.js +3 -3
  157. package/es/event/sparkline-event.js.map +1 -1
  158. package/es/header-helper/header-helper.js +1 -1
  159. package/es/header-helper/header-helper.js.map +1 -1
  160. package/es/index.d.ts +1 -1
  161. package/es/index.js +1 -1
  162. package/es/index.js.map +1 -1
  163. package/es/layout/chart-helper/get-chart-spec.js +2 -6
  164. package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
  165. package/es/layout/pivot-header-layout.js +17 -7
  166. package/es/layout/pivot-header-layout.js.map +1 -1
  167. package/es/scenegraph/component/cell-mover.js +6 -6
  168. package/es/scenegraph/component/cell-mover.js.map +1 -1
  169. package/es/scenegraph/component/table-component.js +2 -2
  170. package/es/scenegraph/component/table-component.js.map +1 -1
  171. package/es/scenegraph/graphic/contributions/chart-render-helper.js +12 -9
  172. package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
  173. package/es/scenegraph/graphic/contributions/group-contribution-render.js +1 -1
  174. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  175. package/es/scenegraph/group-creater/cell-helper.js +7 -7
  176. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  177. package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +2 -2
  178. package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
  179. package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js +7 -6
  180. package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
  181. package/es/scenegraph/group-creater/column-helper.js +3 -3
  182. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  183. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +3 -3
  184. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  185. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +11 -4
  186. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  187. package/es/scenegraph/layout/auto-height.js +1 -1
  188. package/es/scenegraph/layout/auto-height.js.map +1 -1
  189. package/es/scenegraph/layout/compute-col-width.js +7 -3
  190. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  191. package/es/scenegraph/layout/compute-row-height.js +12 -8
  192. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  193. package/es/scenegraph/layout/move-cell.js +9 -3
  194. package/es/scenegraph/layout/move-cell.js.map +1 -1
  195. package/es/scenegraph/layout/update-height.js +1 -1
  196. package/es/scenegraph/layout/update-height.js.map +1 -1
  197. package/es/scenegraph/layout/update-width.js +11 -7
  198. package/es/scenegraph/layout/update-width.js.map +1 -1
  199. package/es/scenegraph/scenegraph.d.ts +1 -0
  200. package/es/scenegraph/scenegraph.js +20 -10
  201. package/es/scenegraph/scenegraph.js.map +1 -1
  202. package/es/scenegraph/utils/render-service.js +1 -1
  203. package/es/scenegraph/utils/render-service.js.map +1 -1
  204. package/es/state/cell-move/index.d.ts +4 -4
  205. package/es/state/cell-move/index.js +1 -1
  206. package/es/state/cell-move/index.js.map +1 -1
  207. package/es/state/frozen/index.js.map +1 -1
  208. package/es/state/hover/is-cell-hover.d.ts +2 -2
  209. package/es/state/hover/is-cell-hover.js +2 -2
  210. package/es/state/hover/is-cell-hover.js.map +1 -1
  211. package/es/state/hover/update-position.d.ts +2 -2
  212. package/es/state/hover/update-position.js.map +1 -1
  213. package/es/state/resize/update-resize-column.d.ts +2 -2
  214. package/es/state/resize/update-resize-column.js.map +1 -1
  215. package/es/state/select/update-position.d.ts +2 -2
  216. package/es/state/select/update-position.js +86 -88
  217. package/es/state/select/update-position.js.map +1 -1
  218. package/es/state/sort/index.js +2 -2
  219. package/es/state/sort/index.js.map +1 -1
  220. package/es/state/state.d.ts +1 -1
  221. package/es/state/state.js +6 -6
  222. package/es/state/state.js.map +1 -1
  223. package/es/themes/ARCO.js +1 -2
  224. package/es/themes/BRIGHT.js +2 -1
  225. package/es/tools/LimitPromiseQueue.js +1 -1
  226. package/es/tools/NumberMap.js +1 -1
  227. package/es/tools/util.js.map +1 -1
  228. package/es/ts-types/base-table.d.ts +6 -6
  229. package/es/ts-types/base-table.js +1 -1
  230. package/es/ts-types/base-table.js.map +1 -1
  231. package/es/ts-types/common.js +1 -1
  232. package/es/ts-types/events.d.ts +0 -1
  233. package/es/ts-types/events.js.map +1 -1
  234. package/es/ts-types/list-table/define/basic-define.js.map +1 -1
  235. package/package.json +5 -5
@@ -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;IAE3E,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC;IAE3E,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE;QACnD,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO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;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,IAAA,+BAAe,EACb,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;aACH;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 '@visactor/vrender';\n\nexport function updateRowHeight(scene: Scenegraph, row: number, detaY: number) {\n // 更新table行高存储\n scene.table.setRowHeight(row, scene.table.getRowHeight(row) + detaY, true);\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 // 更新单元格布局\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 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 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 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 }\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,gDAAqD;AACrD,sEAA0F;AAC1F,wDAAuD;AACvD,sEAAgE;AAEhE,kEAAiE;AAGjE,SAAgB,eAAe,CAAC,KAAiB,EAAE,GAAW,EAAE,KAAa;IAE3E,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC;IAE5E,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE;QACnD,MAAM,IAAI,GAAG,KAAK,CAAC,OA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AC;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,IAAA,+BAAe,EACb,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;aACH;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 '@visactor/vrender';\n\nexport function updateRowHeight(scene: Scenegraph, row: number, detaY: number) {\n // 更新table行高存储\n scene.table._setRowHeight(row, scene.table.getRowHeight(row) + detaY, true);\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 // 更新单元格布局\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 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 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 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 }\n } else {\n updateCellContentHeight(cellGroup, distHeight, detaY, autoRowHeight, padding, textAlign, textBaseline);\n }\n}\n"]}
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  const axis_1 = require("../../components/axis/axis"), tableHelper_1 = require("../../core/tableHelper"), custom_1 = require("../component/custom"), image_cell_1 = require("../group-creater/cell-type/image-cell"), progress_bar_cell_1 = require("../group-creater/cell-type/progress-bar-cell"), spark_line_cell_1 = require("../group-creater/cell-type/spark-line-cell"), column_helper_1 = require("../group-creater/column-helper"), get_cell_merge_1 = require("../utils/get-cell-merge"), get_prop_1 = require("../utils/get-prop"), is_merge_cell_group_1 = require("../utils/is-merge-cell-group"), padding_1 = require("../utils/padding"), text_icon_layout_1 = require("../utils/text-icon-layout"), compute_row_height_1 = require("./compute-row-height"), update_height_1 = require("./update-height"), get_hierarchy_offset_1 = require("../utils/get-hierarchy-offset");
8
8
 
9
9
  function updateColWidth(scene, col, detaX) {
10
- scene.table.setColWidth(col, scene.table.getColWidth(col) + detaX, !0);
10
+ scene.table._setColWidth(col, scene.table.getColWidth(col) + detaX, !0);
11
11
  const autoRowHeight = "autoHeight" === scene.table.heightMode, colOrCornerHeaderColumn = scene.getColGroup(col, !0);
12
12
  colOrCornerHeaderColumn && updateColunmWidth(colOrCornerHeaderColumn, detaX, autoRowHeight, "col-corner", scene);
13
13
  const rowHeaderOrBodyColumn = scene.getColGroup(col);
@@ -16,8 +16,10 @@ function updateColWidth(scene, col, detaX) {
16
16
  leftBottomColumn && updateColunmWidth(leftBottomColumn, detaX, autoRowHeight, "left-bottom", scene);
17
17
  const bottomColumn = scene.getColGroupInBottom(col);
18
18
  bottomColumn && updateColunmWidth(bottomColumn, detaX, autoRowHeight, "bottom", scene);
19
+ const rightTopColumn = scene.getColGroupInRightTopCorner(col);
20
+ rightTopColumn && updateColunmWidth(rightTopColumn, detaX, autoRowHeight, "right-top", scene);
19
21
  const rightBottomColumn = scene.getColGroupInRightBottomCorner(col);
20
- rightBottomColumn && updateColunmWidth(bottomColumn, detaX, autoRowHeight, "right-bottom", scene),
22
+ rightBottomColumn && updateColunmWidth(rightBottomColumn, detaX, autoRowHeight, "right-bottom", scene),
21
23
  col < scene.frozenColCount ? (scene.cornerHeaderGroup.forEachChildrenSkipChild(((column, index) => {
22
24
  column.col > col && column.setAttribute("x", column.attribute.x + detaX);
23
25
  })), scene.rowHeaderGroup.forEachChildrenSkipChild(((column, index) => {
@@ -36,7 +38,7 @@ function updateColWidth(scene, col, detaX) {
36
38
  }
37
39
 
38
40
  function updateColunmWidth(columnGroup, detaX, autoRowHeight, mode, scene) {
39
- var _a, _b, _c, _d, _e, _f;
41
+ var _a, _b, _c, _d, _e, _f, _g;
40
42
  let needRerangeRow = !1;
41
43
  const oldColumnWidth = null !== (_a = null == columnGroup ? void 0 : columnGroup.attribute.width) && void 0 !== _a ? _a : 0;
42
44
  if (null == columnGroup || columnGroup.setAttribute("width", oldColumnWidth + detaX),
@@ -49,11 +51,13 @@ function updateColunmWidth(columnGroup, detaX, autoRowHeight, mode, scene) {
49
51
  })), needRerangeRow) {
50
52
  let colGroup, oldContainerHeight, row, newTotalHeight = 0;
51
53
  for (let col = 0; col < scene.table.colCount; col++) {
52
- "col-corner" === mode ? (row = 0, colGroup = scene.getColGroup(col, !0), oldContainerHeight = null !== (_b = scene.colHeaderGroup.attribute.height) && void 0 !== _b ? _b : 0) : "row-body" === mode ? (row = scene.table.frozenRowCount,
54
+ if ("col-corner" === mode ? (row = 0, colGroup = scene.getColGroup(col, !0), oldContainerHeight = null !== (_b = scene.colHeaderGroup.attribute.height) && void 0 !== _b ? _b : 0) : "row-body" === mode ? (row = scene.table.frozenRowCount,
53
55
  colGroup = scene.getColGroup(col, !1), oldContainerHeight = null !== (_c = scene.bodyGroup.attribute.height) && void 0 !== _c ? _c : 0) : "bottom" === mode ? (row = scene.table.rowCount - scene.table.bottomFrozenRowCount,
54
56
  colGroup = scene.getColGroupInBottom(col), oldContainerHeight = null !== (_d = scene.bottomFrozenGroup.attribute.height) && void 0 !== _d ? _d : 0) : "left-bottom" === mode ? (row = scene.table.rowCount - scene.table.bottomFrozenRowCount,
55
- colGroup = scene.getColGroupInLeftBottomCorner(col), oldContainerHeight = null !== (_e = scene.leftBottomCornerGroup.attribute.height) && void 0 !== _e ? _e : 0) : "right-bottom" === mode && (row = scene.table.rowCount - scene.table.bottomFrozenRowCount,
56
- colGroup = scene.getColGroupInRightBottomCorner(col), oldContainerHeight = null !== (_f = scene.rightBottomCornerGroup.attribute.height) && void 0 !== _f ? _f : 0);
57
+ colGroup = scene.getColGroupInLeftBottomCorner(col), oldContainerHeight = null !== (_e = scene.leftBottomCornerGroup.attribute.height) && void 0 !== _e ? _e : 0) : "right-top" === mode ? (row = 0,
58
+ colGroup = scene.getColGroupInRightTopCorner(col), oldContainerHeight = null !== (_f = scene.rightTopCornerGroup.attribute.height) && void 0 !== _f ? _f : 0) : "right-bottom" === mode && (row = scene.table.rowCount - scene.table.bottomFrozenRowCount,
59
+ colGroup = scene.getColGroupInRightBottomCorner(col), oldContainerHeight = null !== (_g = scene.rightBottomCornerGroup.attribute.height) && void 0 !== _g ? _g : 0),
60
+ !colGroup) continue;
57
61
  let y = 0;
58
62
  colGroup.forEachChildren((cellGroup => {
59
63
  var _a;
@@ -160,7 +164,7 @@ function updateMergeCellContentWidth(cellGroup, distWidth, detaX, autoRowHeight,
160
164
 
161
165
  function resetRowHeight(scene, row) {
162
166
  const maxHeight = (0, compute_row_height_1.computeRowHeight)(row, 0, scene.table.colCount - 1, scene.table);
163
- scene.table.setRowHeight(row, maxHeight, !0);
167
+ scene.table._setRowHeight(row, maxHeight, !0);
164
168
  for (let col = 0; col < scene.table.colCount; col++) {
165
169
  const distHeight = maxHeight, cell = scene.highPerformanceGetCell(col, row);
166
170
  if ("empty" === cell.role) return;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/layout/update-width.ts"],"names":[],"mappings":";;;AAEA,qDAA2D;AAC3D,wDAAuD;AAGvD,gDAAqD;AAGrD,sEAA0F;AAC1F,oFAAqF;AACrF,gFAAsF;AACtF,kEAAiE;AAEjE,4DAA2D;AAC3D,gDAA4C;AAC5C,sEAAgE;AAChE,8CAAgD;AAChD,gEAAmE;AACnE,6DAA2E;AAC3E,mDAAyD;AACzD,wEAAmE;AAUnE,SAAgB,cAAc,CAAC,KAAiB,EAAE,GAAW,EAAE,KAAa;IAC1E,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC;IAEzE,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC,UAAU,KAAK,YAAY,CAAC;IAE9D,MAAM,uBAAuB,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,CAAU,CAAC;IACtE,IAAI,uBAAuB,EAAE;QAC3B,iBAAiB,CAAC,uBAAuB,EAAE,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,K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D,KAAK,CACN,CAAC;gBACF,cAAc,GAAG,cAAc,IAAI,OAAO,CAAC;aAC5C;SACF;QACD,OAAO,cAAc,CAAC;KACvB;IACD,OAAO,IAAA,yCAAsB,EAC3B,SAAS,EACT,SAAS,EACT,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,EACjC,KAAK,EACL,aAAa,EACb,OAAO,EACP,SAAS,EACT,YAAY,EACZ,KAAK,CAAC,UAAU,CACjB,CAAC;AACJ,CAAC;AAQD,SAAS,cAAc,CAAC,KAAiB,EAAE,GAAW;IAEpD,MAAM,SAAS,GAAG,IAAA,qCAAgB,EAAC,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IAElF,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IAG/C,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 '@visactor/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) {\n scene.table.setColWidth(col, scene.table.getColWidth(col) + detaX, true);\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 if (colOrCornerHeaderColumn) {\n updateColunmWidth(colOrCornerHeaderColumn, detaX, autoRowHeight, 'col-corner', scene);\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(bottomColumn, 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-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-bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInRightBottomCorner(col);\n oldContainerHeight = scene.rightBottomCornerGroup.attribute.height ?? 0;\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) {\n return false;\n }\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 if (axisConfig) {\n const axis = new CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, scene.table);\n cellGroup.clear();\n cellGroup.appendChild(axis.component);\n axis.overlap();\n }\n } else 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 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 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 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 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 = 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,gDAAqD;AAGrD,sEAA0F;AAC1F,oFAAqF;AACrF,gFAAsF;AACtF,kEAAiE;AAEjE,4DAA2D;AAC3D,gDAA4C;AAC5C,sEAAgE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,SAAS,EACT,YAAY,EACZ,KAAK,CAAC,UAAU,CACjB,CAAC;AACJ,CAAC;AAQD,SAAS,cAAc,CAAC,KAAiB,EAAE,GAAW;IAEpD,MAAM,SAAS,GAAG,IAAA,qCAAgB,EAAC,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IAElF,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 '@visactor/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) {\n scene.table._setColWidth(col, scene.table.getColWidth(col) + detaX, true);\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 if (colOrCornerHeaderColumn) {\n updateColunmWidth(colOrCornerHeaderColumn, detaX, autoRowHeight, 'col-corner', scene);\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 rightTopColumn = scene.getColGroupInRightTopCorner(col);\n if (rightTopColumn) {\n updateColunmWidth(rightTopColumn, detaX, autoRowHeight, 'right-top', 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) {\n return false;\n }\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 if (axisConfig) {\n const axis = new CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, scene.table);\n cellGroup.clear();\n cellGroup.appendChild(axis.component);\n axis.overlap();\n }\n } else 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 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 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 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 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 = 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"]}
@@ -51,6 +51,7 @@ export declare class Scenegraph {
51
51
  get bodyRowEnd(): number;
52
52
  initSceneGraph(): void;
53
53
  clearCells(): void;
54
+ updateStageBackground(): void;
54
55
  createComponent(): void;
55
56
  createSceneGraph(): void;
56
57
  renderSceneGraph(): void;
@@ -162,6 +162,9 @@ class Scenegraph {
162
162
  }), this.tableGroup.border && (this.tableGroup.parent.removeChild(this.tableGroup.border),
163
163
  delete this.tableGroup.border), null === (_a = this.proxy) || void 0 === _a || _a.release();
164
164
  }
165
+ updateStageBackground() {
166
+ this.stage.background = this.table.theme.underlayBackgroundColor, this.stage.renderNextFrame();
167
+ }
165
168
  createComponent() {
166
169
  this.component = new table_component_1.TableComponent(this.table), this.component.addToGroup(this.componentGroup),
167
170
  this.selectedRangeComponents = new Map, this.selectingRangeComponents = new Map;
@@ -219,7 +222,7 @@ class Scenegraph {
219
222
  }
220
223
  resetAllSelectComponent() {
221
224
  var _a, _b;
222
- (null === (_b = null === (_a = this.table.stateManeger.select) || void 0 === _a ? void 0 : _a.ranges) || void 0 === _b ? void 0 : _b.length) > 0 && (0,
225
+ (null === (_b = null === (_a = this.table.stateManager.select) || void 0 === _a ? void 0 : _a.ranges) || void 0 === _b ? void 0 : _b.length) > 0 && (0,
223
226
  update_select_border_1.updateAllSelectComponent)(this);
224
227
  }
225
228
  hideHoverIcon(col, row) {
@@ -344,12 +347,11 @@ class Scenegraph {
344
347
  this.updateNextFrame();
345
348
  }
346
349
  updateTableSize() {
347
- var _a, _b;
348
350
  this.tableGroup.setAttributes({
349
351
  x: this.table.tableX,
350
352
  y: this.table.tableY,
351
353
  width: Math.min(this.table.tableNoFrameWidth, Math.max(this.colHeaderGroup.attribute.width, this.bodyGroup.attribute.width, 0) + Math.max(this.cornerHeaderGroup.attribute.width, this.rowHeaderGroup.attribute.width, 0) + this.rightBottomCornerGroup.attribute.width),
352
- height: Math.min(this.table.tableNoFrameHeight, (null !== (_a = this.colHeaderGroup.attribute.height) && void 0 !== _a ? _a : 0) + (null !== (_b = this.bodyGroup.attribute.height) && void 0 !== _b ? _b : 0) + this.bottomFrozenGroup.attribute.height)
354
+ height: Math.min(this.table.tableNoFrameHeight, Math.max(this.colHeaderGroup.attribute.height, this.cornerHeaderGroup.attribute.height, 0) + Math.max(this.rowHeaderGroup.attribute.height, this.bodyGroup.attribute.height, 0) + this.bottomFrozenGroup.attribute.height)
353
355
  }), this.tableGroup.border && this.tableGroup.border.setAttributes({
354
356
  x: this.table.tableX - this.tableGroup.border.attribute.lineWidth / 2,
355
357
  y: this.table.tableY - this.tableGroup.border.attribute.lineWidth / 2,
@@ -421,7 +423,7 @@ class Scenegraph {
421
423
  }
422
424
  afterScenegraphCreated() {
423
425
  this.isPivot || this.transpose || this.component.setFrozenColumnShadow(this.table.frozenColCount - 1),
424
- this.table.stateManeger.checkFrozen(), this.updateContainer(), this.createFrameBorder(),
426
+ this.table.stateManager.checkFrozen(), this.updateContainer(), this.createFrameBorder(),
425
427
  this.updateBorderSizeAndPosition(), this.component.updateScrollBar(), (0, stick_text_1.handleTextStick)(this.table),
426
428
  this.updateNextFrame();
427
429
  }
@@ -447,7 +449,11 @@ class Scenegraph {
447
449
  }
448
450
  if (actualWidth < canvasWidth && actualWidth - actualHeaderWidth > 0) {
449
451
  const factor = (canvasWidth - actualHeaderWidth) / (actualWidth - actualHeaderWidth);
450
- for (let col = table.frozenColCount; col < table.colCount - table.rightFrozenColCount; col++) this.setColWidth(col, table.getColWidth(col) * factor);
452
+ for (let col = table.frozenColCount; col < table.colCount - table.rightFrozenColCount; col++) {
453
+ let colWidth;
454
+ colWidth = col === table.colCount - table.rightFrozenColCount - 1 ? canvasWidth - actualHeaderWidth - table.getColsWidth(table.frozenColCount, table.colCount - table.rightFrozenColCount - 2) : Math.round(table.getColWidth(col) * factor),
455
+ this.setColWidth(col, colWidth);
456
+ }
451
457
  }
452
458
  }
453
459
  let bodyWidth = 0;
@@ -494,7 +500,11 @@ class Scenegraph {
494
500
  }
495
501
  if (actualHeight < canvasHeight && actualHeight - actualHeaderHeight > 0) {
496
502
  const factor = (canvasHeight - actualHeaderHeight) / (actualHeight - actualHeaderHeight);
497
- for (let row = table.frozenRowCount; row < table.rowCount - table.bottomFrozenRowCount; row++) this.setRowHeight(row, table.getRowHeight(row) * factor);
503
+ for (let row = table.frozenRowCount; row < table.rowCount - table.bottomFrozenRowCount; row++) {
504
+ let rowHeight;
505
+ rowHeight = row === table.rowCount - table.bottomFrozenRowCount - 1 ? canvasHeight - actualHeaderHeight - table.getRowsHeight(table.frozenRowCount, table.rowCount - table.bottomFrozenRowCount - 2) : Math.round(table.getRowHeight(row) * factor),
506
+ this.setRowHeight(row, rowHeight);
507
+ }
498
508
  }
499
509
  }
500
510
  }
@@ -553,9 +563,9 @@ class Scenegraph {
553
563
  }
554
564
  updateContainer() {
555
565
  this.updateContainerAttrWidthAndX(), this.updateTableSize();
556
- const oldHorizontalBarPos = this.table.stateManeger.scroll.horizontalBarPos, oldVerticalBarPos = this.table.stateManeger.scroll.verticalBarPos;
557
- this.component.updateScrollBar(), this.table.stateManeger.setScrollLeft(oldHorizontalBarPos),
558
- this.table.stateManeger.setScrollTop(oldVerticalBarPos), this.updateNextFrame();
566
+ const oldHorizontalBarPos = this.table.stateManager.scroll.horizontalBarPos, oldVerticalBarPos = this.table.stateManager.scroll.verticalBarPos;
567
+ this.component.updateScrollBar(), this.table.stateManager.setScrollLeft(oldHorizontalBarPos),
568
+ this.table.stateManager.setScrollTop(oldVerticalBarPos), this.updateNextFrame();
559
569
  }
560
570
  updateCellContentWhileResize(col, row) {
561
571
  const type = this.table.getBodyColumnType(col, row), cellGroup = this.getCell(col, row);
@@ -640,7 +650,7 @@ class Scenegraph {
640
650
  }
641
651
  updateRow(removeCells, addCells, updateCells = []) {
642
652
  (0, update_row_1.updateRow)(removeCells, addCells, updateCells, this.table), this.recalculateColWidths(),
643
- this.recalculateRowHeights(), this.table.stateManeger.checkFrozen(), this.isPivot || this.transpose || this.component.setFrozenColumnShadow(this.table.frozenColCount - 1),
653
+ this.recalculateRowHeights(), this.table.stateManager.checkFrozen(), this.isPivot || this.transpose || this.component.setFrozenColumnShadow(this.table.frozenColCount - 1),
644
654
  this.component.updateScrollBar(), this.updateNextFrame();
645
655
  }
646
656
  getColumnGroupX(col) {