@visactor/vtable 0.9.3-alpha.6 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/cjs/ListTable.d.ts +2 -1
  2. package/cjs/ListTable.js +9 -7
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotChart.d.ts +1 -0
  5. package/cjs/PivotChart.js +6 -5
  6. package/cjs/PivotChart.js.map +1 -1
  7. package/cjs/PivotTable.d.ts +1 -0
  8. package/cjs/PivotTable.js +7 -5
  9. package/cjs/PivotTable.js.map +1 -1
  10. package/cjs/components/axis/axis.d.ts +1 -0
  11. package/cjs/components/axis/axis.js +10 -1
  12. package/cjs/components/axis/axis.js.map +1 -1
  13. package/cjs/components/axis/get-axis-component-size.js +13 -9
  14. package/cjs/components/axis/get-axis-component-size.js.map +1 -1
  15. package/cjs/components/legend/legend.js +5 -3
  16. package/cjs/components/legend/legend.js.map +1 -1
  17. package/cjs/core/BaseTable.d.ts +8 -5
  18. package/cjs/core/BaseTable.js +40 -27
  19. package/cjs/core/BaseTable.js.map +1 -1
  20. package/cjs/event/drill.d.ts +2 -0
  21. package/cjs/event/drill.js +15 -2
  22. package/cjs/event/drill.js.map +1 -1
  23. package/cjs/event/event.js +2 -1
  24. package/cjs/event/event.js.map +1 -1
  25. package/cjs/event/listener/container-dom.js +1 -1
  26. package/cjs/event/listener/container-dom.js.map +1 -1
  27. package/cjs/event/listener/scroll-bar.js +2 -0
  28. package/cjs/event/listener/scroll-bar.js.map +1 -1
  29. package/cjs/event/pivot-chart/axis-click.js +3 -2
  30. package/cjs/event/pivot-chart/axis-click.js.map +1 -1
  31. package/cjs/event/scroll.js +8 -4
  32. package/cjs/event/scroll.js.map +1 -1
  33. package/cjs/index.d.ts +1 -1
  34. package/cjs/index.js +1 -1
  35. package/cjs/index.js.map +1 -1
  36. package/cjs/layout/chart-helper/get-axis-config.js +5 -5
  37. package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
  38. package/cjs/layout/chart-helper/get-chart-spec.js +2 -2
  39. package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
  40. package/cjs/layout/pivot-layout.js +4 -2
  41. package/cjs/layout/pivot-layout.js.map +1 -1
  42. package/cjs/render/layout/text.js +1 -0
  43. package/cjs/render/layout/text.js.map +1 -1
  44. package/cjs/scenegraph/graphic/chart.js.map +1 -1
  45. package/cjs/scenegraph/graphic/contributions/chart-render-helper.d.ts +8 -0
  46. package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +66 -0
  47. package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -0
  48. package/cjs/scenegraph/graphic/contributions/chart-render.js +9 -35
  49. package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
  50. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +6 -3
  51. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  52. package/cjs/scenegraph/graphic/text.js +6 -4
  53. package/cjs/scenegraph/graphic/text.js.map +1 -1
  54. package/cjs/scenegraph/group-creater/cell-helper.js +2 -1
  55. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  56. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +1 -1
  57. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  58. package/cjs/scenegraph/group-creater/cell-type/image-cell.js +1 -1
  59. package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  60. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +1 -1
  61. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
  62. package/cjs/scenegraph/group-creater/cell-type/text-cell.js +1 -1
  63. package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  64. package/cjs/scenegraph/group-creater/cell-type/video-cell.js +1 -1
  65. package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  66. package/cjs/scenegraph/group-creater/column-helper.js +3 -3
  67. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  68. package/cjs/scenegraph/group-creater/init-scenegraph.d.ts +2 -0
  69. package/cjs/scenegraph/group-creater/init-scenegraph.js +61 -0
  70. package/cjs/scenegraph/group-creater/init-scenegraph.js.map +1 -0
  71. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +7 -2
  72. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  73. package/cjs/scenegraph/group-creater/progress/proxy.d.ts +1 -1
  74. package/cjs/scenegraph/group-creater/progress/proxy.js +12 -21
  75. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  76. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +36 -44
  77. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
  78. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +5 -19
  79. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  80. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-column.d.ts +2 -0
  81. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-column.js +37 -0
  82. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-column.js.map +1 -0
  83. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -1
  84. package/cjs/scenegraph/group-creater/progress/update-position/util.d.ts +8 -0
  85. package/cjs/scenegraph/group-creater/progress/update-position/util.js +70 -0
  86. package/cjs/scenegraph/group-creater/progress/update-position/util.js.map +1 -0
  87. package/cjs/scenegraph/layout/compute-col-width.js +5 -3
  88. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  89. package/cjs/scenegraph/layout/compute-row-height.d.ts +1 -1
  90. package/cjs/scenegraph/layout/compute-row-height.js +26 -13
  91. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  92. package/cjs/scenegraph/layout/frozen.d.ts +2 -0
  93. package/cjs/scenegraph/layout/frozen.js +139 -6
  94. package/cjs/scenegraph/layout/frozen.js.map +1 -1
  95. package/cjs/scenegraph/layout/update-height.js +2 -1
  96. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  97. package/cjs/scenegraph/layout/update-width.js +45 -66
  98. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  99. package/cjs/scenegraph/refresh-node/update-chart.js +8 -6
  100. package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
  101. package/cjs/scenegraph/scenegraph.d.ts +9 -4
  102. package/cjs/scenegraph/scenegraph.js +39 -102
  103. package/cjs/scenegraph/scenegraph.js.map +1 -1
  104. package/cjs/scenegraph/style/corner-cell.d.ts +2 -2
  105. package/cjs/scenegraph/style/corner-cell.js +8 -9
  106. package/cjs/scenegraph/style/corner-cell.js.map +1 -1
  107. package/cjs/scenegraph/utils/measure-text.js +9 -8
  108. package/cjs/scenegraph/utils/measure-text.js.map +1 -1
  109. package/cjs/state/hover/update-position.js +1 -1
  110. package/cjs/state/hover/update-position.js.map +1 -1
  111. package/cjs/state/state.d.ts +1 -0
  112. package/cjs/state/state.js +4 -2
  113. package/cjs/state/state.js.map +1 -1
  114. package/cjs/ts-types/base-table.d.ts +10 -2
  115. package/cjs/ts-types/base-table.js.map +1 -1
  116. package/cjs/ts-types/table-engine.d.ts +1 -1
  117. package/cjs/ts-types/table-engine.js.map +1 -1
  118. package/dist/vtable.js +1244 -790
  119. package/dist/vtable.min.js +3 -3
  120. package/es/ListTable.d.ts +2 -1
  121. package/es/ListTable.js +9 -7
  122. package/es/ListTable.js.map +1 -1
  123. package/es/PivotChart.d.ts +1 -0
  124. package/es/PivotChart.js +6 -5
  125. package/es/PivotChart.js.map +1 -1
  126. package/es/PivotTable.d.ts +1 -0
  127. package/es/PivotTable.js +7 -5
  128. package/es/PivotTable.js.map +1 -1
  129. package/es/components/axis/axis.d.ts +1 -0
  130. package/es/components/axis/axis.js +10 -1
  131. package/es/components/axis/axis.js.map +1 -1
  132. package/es/components/axis/get-axis-component-size.js +13 -9
  133. package/es/components/axis/get-axis-component-size.js.map +1 -1
  134. package/es/components/legend/legend.js +5 -3
  135. package/es/components/legend/legend.js.map +1 -1
  136. package/es/core/BaseTable.d.ts +8 -5
  137. package/es/core/BaseTable.js +34 -20
  138. package/es/core/BaseTable.js.map +1 -1
  139. package/es/event/drill.d.ts +2 -0
  140. package/es/event/drill.js +13 -0
  141. package/es/event/drill.js.map +1 -1
  142. package/es/event/event.js +3 -3
  143. package/es/event/event.js.map +1 -1
  144. package/es/event/listener/container-dom.js +1 -1
  145. package/es/event/listener/container-dom.js.map +1 -1
  146. package/es/event/listener/scroll-bar.js +2 -0
  147. package/es/event/listener/scroll-bar.js.map +1 -1
  148. package/es/event/pivot-chart/axis-click.js +3 -2
  149. package/es/event/pivot-chart/axis-click.js.map +1 -1
  150. package/es/event/scroll.js +4 -1
  151. package/es/event/scroll.js.map +1 -1
  152. package/es/index.d.ts +1 -1
  153. package/es/index.js +1 -1
  154. package/es/index.js.map +1 -1
  155. package/es/layout/chart-helper/get-axis-config.js +5 -5
  156. package/es/layout/chart-helper/get-axis-config.js.map +1 -1
  157. package/es/layout/chart-helper/get-chart-spec.js +2 -2
  158. package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
  159. package/es/layout/pivot-layout.js +4 -2
  160. package/es/layout/pivot-layout.js.map +1 -1
  161. package/es/render/layout/text.js +1 -0
  162. package/es/render/layout/text.js.map +1 -1
  163. package/es/scenegraph/graphic/chart.js.map +1 -1
  164. package/es/scenegraph/graphic/contributions/chart-render-helper.d.ts +8 -0
  165. package/es/scenegraph/graphic/contributions/chart-render-helper.js +61 -0
  166. package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -0
  167. package/es/scenegraph/graphic/contributions/chart-render.js +9 -34
  168. package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
  169. package/es/scenegraph/graphic/contributions/group-contribution-render.js +7 -2
  170. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  171. package/es/scenegraph/graphic/text.js +6 -4
  172. package/es/scenegraph/graphic/text.js.map +1 -1
  173. package/es/scenegraph/group-creater/cell-helper.js +2 -1
  174. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  175. package/es/scenegraph/group-creater/cell-type/chart-cell.js +1 -1
  176. package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  177. package/es/scenegraph/group-creater/cell-type/image-cell.js +1 -1
  178. package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  179. package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +1 -1
  180. package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
  181. package/es/scenegraph/group-creater/cell-type/text-cell.js +1 -1
  182. package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  183. package/es/scenegraph/group-creater/cell-type/video-cell.js +1 -1
  184. package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  185. package/es/scenegraph/group-creater/column-helper.js +3 -3
  186. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  187. package/es/scenegraph/group-creater/init-scenegraph.d.ts +2 -0
  188. package/es/scenegraph/group-creater/init-scenegraph.js +55 -0
  189. package/es/scenegraph/group-creater/init-scenegraph.js.map +1 -0
  190. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +6 -2
  191. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  192. package/es/scenegraph/group-creater/progress/proxy.d.ts +1 -1
  193. package/es/scenegraph/group-creater/progress/proxy.js +13 -18
  194. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  195. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +37 -44
  196. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
  197. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +6 -22
  198. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  199. package/es/scenegraph/group-creater/progress/update-position/update-auto-column.d.ts +2 -0
  200. package/es/scenegraph/group-creater/progress/update-position/update-auto-column.js +29 -0
  201. package/es/scenegraph/group-creater/progress/update-position/update-auto-column.js.map +1 -0
  202. package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -1
  203. package/es/scenegraph/group-creater/progress/update-position/util.d.ts +8 -0
  204. package/es/scenegraph/group-creater/progress/update-position/util.js +60 -0
  205. package/es/scenegraph/group-creater/progress/update-position/util.js.map +1 -0
  206. package/es/scenegraph/layout/compute-col-width.js +4 -2
  207. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  208. package/es/scenegraph/layout/compute-row-height.d.ts +1 -1
  209. package/es/scenegraph/layout/compute-row-height.js +26 -13
  210. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  211. package/es/scenegraph/layout/frozen.d.ts +2 -0
  212. package/es/scenegraph/layout/frozen.js +137 -3
  213. package/es/scenegraph/layout/frozen.js.map +1 -1
  214. package/es/scenegraph/layout/update-height.js +2 -1
  215. package/es/scenegraph/layout/update-height.js.map +1 -1
  216. package/es/scenegraph/layout/update-width.js +45 -66
  217. package/es/scenegraph/layout/update-width.js.map +1 -1
  218. package/es/scenegraph/refresh-node/update-chart.js +9 -5
  219. package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
  220. package/es/scenegraph/scenegraph.d.ts +9 -4
  221. package/es/scenegraph/scenegraph.js +39 -104
  222. package/es/scenegraph/scenegraph.js.map +1 -1
  223. package/es/scenegraph/style/corner-cell.d.ts +2 -2
  224. package/es/scenegraph/style/corner-cell.js +4 -7
  225. package/es/scenegraph/style/corner-cell.js.map +1 -1
  226. package/es/scenegraph/utils/measure-text.js +10 -9
  227. package/es/scenegraph/utils/measure-text.js.map +1 -1
  228. package/es/state/hover/update-position.js +1 -1
  229. package/es/state/hover/update-position.js.map +1 -1
  230. package/es/state/state.d.ts +1 -0
  231. package/es/state/state.js +5 -1
  232. package/es/state/state.js.map +1 -1
  233. package/es/ts-types/base-table.d.ts +10 -2
  234. package/es/ts-types/base-table.js.map +1 -1
  235. package/es/ts-types/table-engine.d.ts +1 -1
  236. package/es/ts-types/table-engine.js.map +1 -1
  237. package/package.json +2 -2
@@ -49,9 +49,9 @@ export function createComplexColumn(columnGroup, col, colWidth, rowStart, rowEnd
49
49
  pickable: !1
50
50
  });
51
51
  cellGroup.role = "shadow-cell", cellGroup.col = col, cellGroup.row = row, cellGroup.mergeCol = range.start.col,
52
- cellGroup.mergeRow = range.start.row, columnGroup.addChild(cellGroup), columnGroup.updateColumnRowNumber(row),
53
- columnGroup.updateColumnHeight(height), range = table.getCellRange(col, row), y += height,
54
- maxWidth = Math.max(maxWidth, mergeResult.cellWidth);
52
+ cellGroup.mergeRow = range.start.row, null == columnGroup || columnGroup.addChild(cellGroup),
53
+ columnGroup.updateColumnRowNumber(row), columnGroup.updateColumnHeight(height),
54
+ range = table.getCellRange(col, row), y += height, maxWidth = Math.max(maxWidth, mergeResult.cellWidth);
55
55
  } else {
56
56
  const value = table.getCellValue(col, row);
57
57
  if (isPromise(value)) {
@@ -1 +1 @@
1
- {"version":3,"sources":["scenegraph/group-creater/column-helper.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAiB7D,MAAM,UAAU,mBAAmB,CACjC,WAAkB,EAClB,GAAW,EACX,QAAgB,EAChB,QAAgB,EAChB,MAAc,EACd,QAAkB,EAClB,gBAAmC,EACnC,KAAmB,EACnB,QAAkB,EAClB,QAAiB;;IAEjB,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,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,GAAG,GAAG,QAAQ,EAAE;YAC9B,MAAM;SACP;KACF;IAED,WAAW,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC5C,OAAO;QACL,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,CAAC;KACV,CAAC;AACJ,CAAC;AASD,MAAM,UAAU,mBAAmB,CACjC,GAAW,EACX,QAAgB,EAChB,KAAmB;IAEnB,MAAM,KAAK,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACrE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,GAAG,aAAa,CAC3D,KAAK,EACL,KAAK,EACL,GAAG,EACH,KAAK,CAAC,sBAAsB,EAC5B,UAAU,CACX,CAAC;IAGF,WAAW,CAAC,KAAK,CAAC,KAAK,GAAG,QAAQ,CAAC;IACnC,WAAW,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAC7B,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;AACjD,CAAC","file":"column-helper.js","sourcesContent":["/* eslint-disable no-undef */\nimport type { IThemeSpec } from '@visactor/vrender';\nimport type {\n CellType,\n FullExtendStyle,\n ICustomLayout,\n ICustomRender,\n MappingRule,\n TextColumnDefine\n} from '../../ts-types';\nimport { Group } from '../graphic/group';\nimport { getProp, getRawProp } from '../utils/get-prop';\nimport type { MergeMap } from '../scenegraph';\nimport type { PivotHeaderLayoutMap } from '../../layout/pivot-header-layout';\nimport { createCell } from './cell-helper';\nimport type { BaseTableAPI, PivotTableProtected } from '../../ts-types/base-table';\nimport { getStyleTheme } from '../../core/tableHelper';\nimport { isPromise } from '../../tools/helper';\nimport { dealPromiseData } from '../utils/deal-promise-data';\n/**\n * 创建复合列 同一列支持创建不同类型单元格\n * @param columnGroup 列Group\n * @param col\n * @param colWidth 配置列宽\n * @param rowStart\n * @param rowEnd\n * @param mergeMap merge单元格信息\n * @param defaultRowHeight\n * @param table\n * @param cellType\n * @param rowLimit\n * @param customRender\n * @param customLayout\n * @returns\n */\nexport function createComplexColumn(\n columnGroup: Group,\n col: number,\n colWidth: number,\n rowStart: number,\n rowEnd: number,\n mergeMap: MergeMap,\n defaultRowHeight: number | number[],\n table: BaseTableAPI,\n cellType: CellType,\n rowLimit?: number\n) {\n let maxWidth = 0;\n let padding;\n let textAlign;\n let textBaseline;\n /** useColumnTheme 判断是否可以使用columnTheme */\n\n let bgColorFunc: Function;\n // 判断是否有mapping 遍历dataset中mappingRules\n if ((table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules && cellType === 'body') {\n (table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules?.forEach(\n (mappingRule: MappingRule, i: number) => {\n if (mappingRule.bgColor) {\n bgColorFunc = mappingRule.bgColor.mapping;\n }\n }\n );\n }\n // insert cell into column group top\n let y = 0;\n if (columnGroup.colHeight) {\n // insert cell into column group bottom\n y = columnGroup.colHeight;\n }\n\n for (let j = rowStart; j <= rowEnd; j++) {\n const row = j;\n const define = cellType !== 'body' ? table.getHeaderDefine(col, row) : table.getBodyColumnDefine(col, row);\n const mayHaveIcon = cellType !== 'body' ? true : !!define?.icon || !!define?.tree;\n const headerStyle = table._getCellStyle(col, row);\n const cellTheme = getStyleTheme(headerStyle, table, col, row, getProp).theme;\n cellTheme.group.width = colWidth;\n cellTheme.group.height = Array.isArray(defaultRowHeight) ? defaultRowHeight[row] : defaultRowHeight;\n if (cellTheme._vtable.padding) {\n padding = cellTheme._vtable.padding;\n }\n if (cellTheme.text.textAlign) {\n textAlign = cellTheme.text.textAlign;\n }\n if (cellTheme.text.textBaseline) {\n textBaseline = cellTheme.text.textBaseline;\n }\n\n // enable clip body\n if (cellType !== 'body' && !cellTheme.group.fill) {\n cellTheme.group.fill = '#fff';\n }\n // margin = getProp('margin', headerStyle, col, 0, table)\n\n let cellWidth = colWidth;\n // let cellHeight = table.internalProps.autoRowHeight ? 0 : table.getRowHeight(row);\n let cellHeight = table.getRowHeight(row);\n const type =\n (table.isHeader(col, row) ? table._getHeaderLayoutMap(col, row).headerType : table.getBodyColumnType(col, row)) ||\n 'text';\n // 处理单元格合并\n let mergeResult;\n let range;\n let isMerge;\n if (cellType !== 'body' || (define as TextColumnDefine)?.mergeCell) {\n // 只有表头或者column配置合并单元格后再进行信息获取\n range = table.getCellRange(col, row);\n isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;\n // 所有Merge单元格,只保留左上角一个真实的单元格,其他使用空Group占位\n if (isMerge) {\n cellWidth = 0;\n cellHeight = 0;\n mergeResult = mergeMap.get(`${range.start.col},${range.start.row};${range.end.col},${range.end.row}`);\n if (!mergeResult) {\n for (let col = range.start.col; col <= range.end.col; col++) {\n cellWidth += table.getColWidth(col);\n }\n\n // let cellHeight = 0;\n for (let i = range.start.row; i <= range.end.row; i++) {\n cellHeight += table.getRowHeight(i);\n }\n\n mergeMap.set(`${range.start.col},${range.start.row};${range.end.col},${range.end.row}`, {\n x: 0,\n y,\n cellWidth,\n cellHeight\n });\n }\n }\n }\n\n // let cellWidth = 0;\n // let cellHeight = 0;\n if (mergeResult) {\n const height = mergeResult.cellHeight / (range.end.row - range.start.row + 1);\n // 已有Merge单元格,使用空Group占位\n const cellGroup = new Group({\n x: 0,\n y,\n width: 0,\n height,\n visible: false,\n pickable: false\n });\n cellGroup.role = 'shadow-cell';\n cellGroup.col = col;\n cellGroup.row = row;\n cellGroup.mergeCol = range.start.col;\n cellGroup.mergeRow = range.start.row;\n columnGroup.addChild(cellGroup);\n columnGroup.updateColumnRowNumber(row);\n columnGroup.updateColumnHeight(height);\n range = table.getCellRange(col, row);\n y += height;\n maxWidth = Math.max(maxWidth, mergeResult.cellWidth);\n } else {\n // deal with promise data\n const value = table.getCellValue(col, row);\n if (isPromise(value)) {\n dealPromiseData(\n value,\n table,\n createCell.bind(\n null,\n type,\n define,\n table,\n col,\n row,\n colWidth,\n bgColorFunc,\n cellWidth,\n cellHeight,\n columnGroup,\n y,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n isMerge,\n range,\n cellTheme\n )\n );\n columnGroup.updateColumnRowNumber(row);\n // const height = table.getRowHeight(row);\n const height = isMerge\n ? table.getRowHeight(row) / (range.end.row - range.start.row + 1)\n : table.getRowHeight(row);\n columnGroup.updateColumnHeight(height);\n y += height;\n } else {\n const cellGroup = createCell(\n type,\n define,\n table,\n col,\n row,\n colWidth,\n bgColorFunc,\n cellWidth,\n cellHeight,\n columnGroup,\n y,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n isMerge,\n range,\n cellTheme\n );\n columnGroup.updateColumnRowNumber(row);\n // const height = cellGroup.attribute.height;\n const height = isMerge\n ? cellGroup.attribute.height / (range.end.row - range.start.row + 1)\n : cellGroup.attribute.height;\n columnGroup.updateColumnHeight(height);\n y += height;\n }\n }\n if (rowLimit && row > rowLimit) {\n break;\n }\n }\n\n columnGroup.setAttribute('width', colWidth);\n return {\n width: colWidth,\n height: y\n };\n}\n\n/**\n * 获取列分组主题\n * @param col 列索引\n * @param colWidth 列宽\n * @param table 表格实例\n * @returns 列分组主题\n */\nexport function getColumnGroupTheme(\n col: number,\n colWidth: number,\n table: BaseTableAPI\n): { theme: IThemeSpec & { _vtable: any }; hasFunctionPros: boolean } {\n const style = table._getCellStyle(col, table.columnHeaderLevelCount); // to be fixed\n const { theme: columnTheme, hasFunctionPros } = getStyleTheme(\n style,\n table,\n col,\n table.columnHeaderLevelCount,\n getRawProp\n );\n\n // get column header style\n columnTheme.group.width = colWidth;\n columnTheme.group.height = 0;\n return { theme: columnTheme, hasFunctionPros };\n}\n"]}
1
+ {"version":3,"sources":["scenegraph/group-creater/column-helper.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3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qB,CAAC,GAAG,CAAC,CAAC;gBAEvC,MAAM,MAAM,GAAG,OAAO;oBACpB,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC;oBACpE,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC;gBAC/B,WAAW,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;gBACvC,CAAC,IAAI,MAAM,CAAC;aACb;SACF;QACD,IAAI,QAAQ,IAAI,GAAG,GAAG,QAAQ,EAAE;YAC9B,MAAM;SACP;KACF;IAED,WAAW,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC5C,OAAO;QACL,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,CAAC;KACV,CAAC;AACJ,CAAC;AASD,MAAM,UAAU,mBAAmB,CACjC,GAAW,EACX,QAAgB,EAChB,KAAmB;IAEnB,MAAM,KAAK,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACrE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,GAAG,aAAa,CAC3D,KAAK,EACL,KAAK,EACL,GAAG,EACH,KAAK,CAAC,sBAAsB,EAC5B,UAAU,CACX,CAAC;IAGF,WAAW,CAAC,KAAK,CAAC,KAAK,GAAG,QAAQ,CAAC;IACnC,WAAW,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAC7B,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;AACjD,CAAC","file":"column-helper.js","sourcesContent":["/* eslint-disable no-undef */\nimport type { IThemeSpec } from '@visactor/vrender';\nimport type {\n CellType,\n FullExtendStyle,\n ICustomLayout,\n ICustomRender,\n MappingRule,\n TextColumnDefine\n} from '../../ts-types';\nimport { Group } from '../graphic/group';\nimport { getProp, getRawProp } from '../utils/get-prop';\nimport type { MergeMap } from '../scenegraph';\nimport type { PivotHeaderLayoutMap } from '../../layout/pivot-header-layout';\nimport { createCell } from './cell-helper';\nimport type { BaseTableAPI, PivotTableProtected } from '../../ts-types/base-table';\nimport { getStyleTheme } from '../../core/tableHelper';\nimport { isPromise } from '../../tools/helper';\nimport { dealPromiseData } from '../utils/deal-promise-data';\n/**\n * 创建复合列 同一列支持创建不同类型单元格\n * @param columnGroup 列Group\n * @param col\n * @param colWidth 配置列宽\n * @param rowStart\n * @param rowEnd\n * @param mergeMap merge单元格信息\n * @param defaultRowHeight\n * @param table\n * @param cellType\n * @param rowLimit\n * @param customRender\n * @param customLayout\n * @returns\n */\nexport function createComplexColumn(\n columnGroup: Group,\n col: number,\n colWidth: number,\n rowStart: number,\n rowEnd: number,\n mergeMap: MergeMap,\n defaultRowHeight: number | number[],\n table: BaseTableAPI,\n cellType: CellType,\n rowLimit?: number\n) {\n let maxWidth = 0;\n let padding;\n let textAlign;\n let textBaseline;\n /** useColumnTheme 判断是否可以使用columnTheme */\n\n let bgColorFunc: Function;\n // 判断是否有mapping 遍历dataset中mappingRules\n if ((table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules && cellType === 'body') {\n (table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules?.forEach(\n (mappingRule: MappingRule, i: number) => {\n if (mappingRule.bgColor) {\n bgColorFunc = mappingRule.bgColor.mapping;\n }\n }\n );\n }\n // insert cell into column group top\n let y = 0;\n if (columnGroup.colHeight) {\n // insert cell into column group bottom\n y = columnGroup.colHeight;\n }\n\n for (let j = rowStart; j <= rowEnd; j++) {\n const row = j;\n const define = cellType !== 'body' ? table.getHeaderDefine(col, row) : table.getBodyColumnDefine(col, row);\n const mayHaveIcon = cellType !== 'body' ? true : !!define?.icon || !!define?.tree;\n const headerStyle = table._getCellStyle(col, row);\n const cellTheme = getStyleTheme(headerStyle, table, col, row, getProp).theme;\n cellTheme.group.width = colWidth;\n cellTheme.group.height = Array.isArray(defaultRowHeight) ? defaultRowHeight[row] : defaultRowHeight;\n if (cellTheme._vtable.padding) {\n padding = cellTheme._vtable.padding;\n }\n if (cellTheme.text.textAlign) {\n textAlign = cellTheme.text.textAlign;\n }\n if (cellTheme.text.textBaseline) {\n textBaseline = cellTheme.text.textBaseline;\n }\n\n // enable clip body\n if (cellType !== 'body' && !cellTheme.group.fill) {\n cellTheme.group.fill = '#fff';\n }\n // margin = getProp('margin', headerStyle, col, 0, table)\n\n let cellWidth = colWidth;\n // let cellHeight = table.internalProps.autoRowHeight ? 0 : table.getRowHeight(row);\n let cellHeight = table.getRowHeight(row);\n const type =\n (table.isHeader(col, row) ? table._getHeaderLayoutMap(col, row).headerType : table.getBodyColumnType(col, row)) ||\n 'text';\n // 处理单元格合并\n let mergeResult;\n let range;\n let isMerge;\n if (cellType !== 'body' || (define as TextColumnDefine)?.mergeCell) {\n // 只有表头或者column配置合并单元格后再进行信息获取\n range = table.getCellRange(col, row);\n isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;\n // 所有Merge单元格,只保留左上角一个真实的单元格,其他使用空Group占位\n if (isMerge) {\n cellWidth = 0;\n cellHeight = 0;\n mergeResult = mergeMap.get(`${range.start.col},${range.start.row};${range.end.col},${range.end.row}`);\n if (!mergeResult) {\n for (let col = range.start.col; col <= range.end.col; col++) {\n cellWidth += table.getColWidth(col);\n }\n\n // let cellHeight = 0;\n for (let i = range.start.row; i <= range.end.row; i++) {\n cellHeight += table.getRowHeight(i);\n }\n\n mergeMap.set(`${range.start.col},${range.start.row};${range.end.col},${range.end.row}`, {\n x: 0,\n y,\n cellWidth,\n cellHeight\n });\n }\n }\n }\n\n // let cellWidth = 0;\n // let cellHeight = 0;\n if (mergeResult) {\n const height = mergeResult.cellHeight / (range.end.row - range.start.row + 1);\n // 已有Merge单元格,使用空Group占位\n const cellGroup = new Group({\n x: 0,\n y,\n width: 0,\n height,\n visible: false,\n pickable: false\n });\n cellGroup.role = 'shadow-cell';\n cellGroup.col = col;\n cellGroup.row = row;\n cellGroup.mergeCol = range.start.col;\n cellGroup.mergeRow = range.start.row;\n columnGroup?.addChild(cellGroup);\n columnGroup.updateColumnRowNumber(row);\n columnGroup.updateColumnHeight(height);\n range = table.getCellRange(col, row);\n y += height;\n maxWidth = Math.max(maxWidth, mergeResult.cellWidth);\n } else {\n // deal with promise data\n const value = table.getCellValue(col, row);\n if (isPromise(value)) {\n dealPromiseData(\n value,\n table,\n createCell.bind(\n null,\n type,\n define,\n table,\n col,\n row,\n colWidth,\n bgColorFunc,\n cellWidth,\n cellHeight,\n columnGroup,\n y,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n isMerge,\n range,\n cellTheme\n )\n );\n columnGroup.updateColumnRowNumber(row);\n // const height = table.getRowHeight(row);\n const height = isMerge\n ? table.getRowHeight(row) / (range.end.row - range.start.row + 1)\n : table.getRowHeight(row);\n columnGroup.updateColumnHeight(height);\n y += height;\n } else {\n const cellGroup = createCell(\n type,\n define,\n table,\n col,\n row,\n colWidth,\n bgColorFunc,\n cellWidth,\n cellHeight,\n columnGroup,\n y,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n isMerge,\n range,\n cellTheme\n );\n columnGroup.updateColumnRowNumber(row);\n // const height = cellGroup.attribute.height;\n const height = isMerge\n ? cellGroup.attribute.height / (range.end.row - range.start.row + 1)\n : cellGroup.attribute.height;\n columnGroup.updateColumnHeight(height);\n y += height;\n }\n }\n if (rowLimit && row > rowLimit) {\n break;\n }\n }\n\n columnGroup.setAttribute('width', colWidth);\n return {\n width: colWidth,\n height: y\n };\n}\n\n/**\n * 获取列分组主题\n * @param col 列索引\n * @param colWidth 列宽\n * @param table 表格实例\n * @returns 列分组主题\n */\nexport function getColumnGroupTheme(\n col: number,\n colWidth: number,\n table: BaseTableAPI\n): { theme: IThemeSpec & { _vtable: any }; hasFunctionPros: boolean } {\n const style = table._getCellStyle(col, table.columnHeaderLevelCount); // to be fixed\n const { theme: columnTheme, hasFunctionPros } = getStyleTheme(\n style,\n table,\n col,\n table.columnHeaderLevelCount,\n getRawProp\n );\n\n // get column header style\n columnTheme.group.width = colWidth;\n columnTheme.group.height = 0;\n return { theme: columnTheme, hasFunctionPros };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import type { Scenegraph } from '../scenegraph';
2
+ export declare function initSceneGraph(scene: Scenegraph): void;
@@ -0,0 +1,55 @@
1
+ import { Group } from "../graphic/group";
2
+
3
+ import { createCornerCell } from "../style/corner-cell";
4
+
5
+ export function initSceneGraph(scene) {
6
+ const width = scene.table.tableNoFrameWidth, height = scene.table.tableNoFrameHeight;
7
+ scene.tableGroup = new Group({
8
+ x: 0,
9
+ y: 0,
10
+ width: width,
11
+ height: height,
12
+ clip: !0,
13
+ pickable: !1
14
+ }), scene.tableGroup.role = "table";
15
+ const colHeaderGroup = createContainerGroup(0, 0);
16
+ colHeaderGroup.role = "col-header", scene.colHeaderGroup = colHeaderGroup;
17
+ const cornerHeaderGroup = createContainerGroup(0, 0);
18
+ cornerHeaderGroup.role = "corner-header", scene.cornerHeaderGroup = cornerHeaderGroup;
19
+ const rowHeaderGroup = createContainerGroup(0, 0);
20
+ rowHeaderGroup.role = "row-header", scene.rowHeaderGroup = rowHeaderGroup;
21
+ const bodyGroup = createContainerGroup(width, 0);
22
+ bodyGroup.role = "body", scene.bodyGroup = bodyGroup;
23
+ const rightFrozenGroup = createContainerGroup(0, 0);
24
+ rightFrozenGroup.role = "right-frozen", scene.rightFrozenGroup = rightFrozenGroup;
25
+ const bottomFrozenGroup = createContainerGroup(0, 0);
26
+ bottomFrozenGroup.role = "bottom-frozen", scene.bottomFrozenGroup = bottomFrozenGroup;
27
+ const componentGroup = createContainerGroup(0, 0);
28
+ componentGroup.role = "component", scene.componentGroup = componentGroup;
29
+ const rightTopCornerGroup = createContainerGroup(0, 0);
30
+ rightTopCornerGroup.role = "corner-right-top-header", scene.rightTopCornerGroup = rightTopCornerGroup;
31
+ const rightBottomCornerGroup = createContainerGroup(0, 0);
32
+ rightBottomCornerGroup.role = "corner-right-bottom-header", scene.rightBottomCornerGroup = rightBottomCornerGroup;
33
+ const leftBottomCornerGroup = createContainerGroup(0, 0);
34
+ leftBottomCornerGroup.role = "corner-left-bottom-header", scene.leftBottomCornerGroup = leftBottomCornerGroup,
35
+ scene.table.isPivotChart() && (createCornerCell(rightTopCornerGroup, scene.table.theme.cornerRightTopCellStyle || scene.table.theme.cornerHeaderStyle),
36
+ createCornerCell(leftBottomCornerGroup, scene.table.theme.cornerLeftBottomCellStyle || scene.table.theme.cornerHeaderStyle),
37
+ createCornerCell(rightBottomCornerGroup, scene.table.theme.cornerRightBottomCellStyle || scene.table.theme.cornerHeaderStyle)),
38
+ scene.tableGroup.addChild(bodyGroup), scene.tableGroup.addChild(rightFrozenGroup),
39
+ scene.tableGroup.addChild(bottomFrozenGroup), scene.tableGroup.addChild(rowHeaderGroup),
40
+ scene.tableGroup.addChild(colHeaderGroup), scene.tableGroup.addChild(rightBottomCornerGroup),
41
+ scene.tableGroup.addChild(rightTopCornerGroup), scene.tableGroup.addChild(leftBottomCornerGroup),
42
+ scene.tableGroup.addChild(cornerHeaderGroup), scene.tableGroup.addChild(componentGroup);
43
+ }
44
+
45
+ function createContainerGroup(width, height) {
46
+ return new Group({
47
+ x: 0,
48
+ y: 0,
49
+ width: width,
50
+ height: height,
51
+ clip: !1,
52
+ pickable: !1
53
+ });
54
+ }
55
+ //# sourceMappingURL=init-scenegraph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["scenegraph/group-creater/init-scenegraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,UAAU,cAAc,CAAC,KAAiB;IAC9C,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC;IAC5C,MAAM,MAAM,GAAG,KAAK,CA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,gBAAgB,CAAC,CAAC;IAC5C,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IAC7C,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IAC1C,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IAC1C,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC;IAClD,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IAC/C,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC;IACjD,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IAC7C,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,oBAAoB,CAAC,KAAa,EAAE,MAAc;IACzD,OAAO,IAAI,KAAK,CAAC;QACf,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,KAAK;QACL,MAAM;QACN,IAAI,EAAE,KAAK;QACX,QAAQ,EAAE,KAAK;KAChB,CAAC,CAAC;AACL,CAAC","file":"init-scenegraph.js","sourcesContent":["import { Group } from '../graphic/group';\nimport type { Scenegraph } from '../scenegraph';\nimport { createCornerCell } from '../style/corner-cell';\n\nexport function initSceneGraph(scene: Scenegraph) {\n const width = scene.table.tableNoFrameWidth;\n const height = scene.table.tableNoFrameHeight;\n\n scene.tableGroup = new Group({ x: 0, y: 0, width, height, clip: true, pickable: false });\n scene.tableGroup.role = 'table';\n\n const colHeaderGroup = createContainerGroup(0, 0);\n colHeaderGroup.role = 'col-header';\n scene.colHeaderGroup = colHeaderGroup;\n\n const cornerHeaderGroup = createContainerGroup(0, 0);\n cornerHeaderGroup.role = 'corner-header';\n scene.cornerHeaderGroup = cornerHeaderGroup;\n\n const rowHeaderGroup = createContainerGroup(0, 0);\n rowHeaderGroup.role = 'row-header';\n scene.rowHeaderGroup = rowHeaderGroup;\n\n const bodyGroup = createContainerGroup(width, 0);\n bodyGroup.role = 'body';\n scene.bodyGroup = bodyGroup;\n\n const rightFrozenGroup = createContainerGroup(0, 0);\n rightFrozenGroup.role = 'right-frozen';\n scene.rightFrozenGroup = rightFrozenGroup;\n\n const bottomFrozenGroup = createContainerGroup(0, 0);\n bottomFrozenGroup.role = 'bottom-frozen';\n scene.bottomFrozenGroup = bottomFrozenGroup;\n\n const componentGroup = createContainerGroup(0, 0);\n componentGroup.role = 'component';\n scene.componentGroup = componentGroup;\n\n const rightTopCornerGroup = createContainerGroup(0, 0);\n rightTopCornerGroup.role = 'corner-right-top-header';\n scene.rightTopCornerGroup = rightTopCornerGroup;\n\n const rightBottomCornerGroup = createContainerGroup(0, 0);\n rightBottomCornerGroup.role = 'corner-right-bottom-header';\n scene.rightBottomCornerGroup = rightBottomCornerGroup;\n\n const leftBottomCornerGroup = createContainerGroup(0, 0);\n leftBottomCornerGroup.role = 'corner-left-bottom-header';\n scene.leftBottomCornerGroup = leftBottomCornerGroup;\n\n if (scene.table.isPivotChart()) {\n createCornerCell(\n rightTopCornerGroup,\n scene.table.theme.cornerRightTopCellStyle || scene.table.theme.cornerHeaderStyle\n );\n createCornerCell(\n leftBottomCornerGroup,\n scene.table.theme.cornerLeftBottomCellStyle || scene.table.theme.cornerHeaderStyle\n );\n createCornerCell(\n rightBottomCornerGroup,\n scene.table.theme.cornerRightBottomCellStyle || scene.table.theme.cornerHeaderStyle\n );\n }\n\n scene.tableGroup.addChild(bodyGroup);\n scene.tableGroup.addChild(rightFrozenGroup);\n scene.tableGroup.addChild(bottomFrozenGroup);\n scene.tableGroup.addChild(rowHeaderGroup);\n scene.tableGroup.addChild(colHeaderGroup);\n scene.tableGroup.addChild(rightBottomCornerGroup);\n scene.tableGroup.addChild(rightTopCornerGroup);\n scene.tableGroup.addChild(leftBottomCornerGroup);\n scene.tableGroup.addChild(cornerHeaderGroup);\n scene.tableGroup.addChild(componentGroup);\n}\n\nfunction createContainerGroup(width: number, height: number) {\n return new Group({\n x: 0,\n y: 0,\n width,\n height,\n clip: false,\n pickable: false\n });\n}\n"]}
@@ -33,6 +33,7 @@ import { createColGroup } from "../column";
33
33
  export function createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, proxy) {
34
34
  var _a, _b, _c, _d;
35
35
  return __awaiter(this, void 0, void 0, (function*() {
36
+ const {leftBottomCornerGroup: leftBottomCornerGroup, rightTopCornerGroup: rightTopCornerGroup, rightBottomCornerGroup: rightBottomCornerGroup} = proxy.table.scenegraph;
36
37
  proxy.setParamsForRow(), proxy.setParamsForColumn(), proxy.table.internalProps._colWidthsMap.clear(),
37
38
  proxy.table._clearColRangeWidthsMap(), computeColsWidth(proxy.table, 0, Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1)),
38
39
  proxy.table.internalProps._rowHeightsMap.clear(), proxy.table._clearRowRangeHeightsMap(),
@@ -49,8 +50,11 @@ export function createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, row
49
50
  }), createColGroup(cornerHeaderGroup, xOrigin, yOrigin, 0, proxy.table.rowHeaderLevelCount - 1, 0, proxy.table.columnHeaderLevelCount - 1, "cornerHeader", proxy.table),
50
51
  createColGroup(colHeaderGroup, xOrigin, yOrigin, proxy.table.rowHeaderLevelCount, Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount), 0, proxy.table.columnHeaderLevelCount - 1, "columnHeader", proxy.table),
51
52
  createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, proxy.table.rowHeaderLevelCount - 1, proxy.table.columnHeaderLevelCount, Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount), "rowHeader", proxy.table),
52
- proxy.table.bottomFrozenRowCount > 0 && createColGroup(bottomFrozenGroup, xOrigin, yOrigin, proxy.table.rowHeaderLevelCount, Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount), proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount + 1, proxy.table.rowCount - 1, "body", proxy.table),
53
- proxy.table.rightFrozenColCount > 0 && createColGroup(rightFrozenGroup, xOrigin, yOrigin, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount + 1, proxy.table.colCount - 1, proxy.table.columnHeaderLevelCount, Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount), "body", proxy.table),
53
+ proxy.table.bottomFrozenRowCount > 0 && (proxy.table.isPivotChart() || createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, 0, proxy.table.rowHeaderLevelCount - 1, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount + 1, proxy.table.rowCount - 1, "rowHeader", proxy.table),
54
+ createColGroup(bottomFrozenGroup, xOrigin, yOrigin, proxy.table.rowHeaderLevelCount, Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount), proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount + 1, proxy.table.rowCount - 1, "body", proxy.table)),
55
+ proxy.table.rightFrozenColCount > 0 && (proxy.table.isPivotChart() || createColGroup(rightTopCornerGroup, xOrigin, yOrigin, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount + 1, proxy.table.colCount - 1, 0, proxy.table.columnHeaderLevelCount - 1, "columnHeader", proxy.table),
56
+ createColGroup(rightFrozenGroup, xOrigin, yOrigin, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount + 1, proxy.table.colCount - 1, proxy.table.columnHeaderLevelCount, Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount), "body", proxy.table)),
57
+ proxy.table.bottomFrozenRowCount > 0 && proxy.table.rightFrozenColCount > 0 && !proxy.table.isPivotChart() && createColGroup(rightBottomCornerGroup, xOrigin, yOrigin, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount + 1, proxy.table.colCount - 1, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount + 1, proxy.table.rowCount - 1, "body", proxy.table),
54
58
  createColGroup(bodyGroup, xOrigin, yOrigin, proxy.table.rowHeaderLevelCount, Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount), proxy.table.columnHeaderLevelCount, Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount), "body", proxy.table),
55
59
  bodyGroup.firstChild ? (proxy.currentRow = null !== (_b = null === (_a = bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.rowNumber) && void 0 !== _b ? _b : proxy.totalRow,
56
60
  proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2),
@@ -1 +1 @@
1
- {"version":3,"sources":["scenegraph/group-creater/progress/create-group-for-first-screen.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3C,MAAM,UAAgB,yBAAyB,CAC7C,iBAAwB,EACxB,cAAqB,EACrB,cAAqB,EACrB,gBAAuB,EACvB,iBAAwB,EACxB,SAAgB,EAChB,OAAe,EACf,OAAe,EACf,KAAiB;;;QAGjB,KAAK,CAAC,eAAe,EAAE,CAAC;QACxB,KAAK,CAAC,kBAAkB,EAAE,CAAC;QAG3B,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;QAChD,KAAK,CAAC,KAAK,CAAC,uBAAuB,EAAE,CAAC;QACtC,gBAAgB,CAAC,KAAK,CAAC,KAAK,EAAE,CAA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AoB,0CAAE,SAAS,mCAAI,KAAK,CAAC,QAAQ,CAAC;YAChF,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC;YAChC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC;YAClC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;YAEtF,KAAK,CAAC,UAAU,GAAG,MAAA,MAAC,SAAS,CAAC,SAAmB,0CAAE,GAAG,mCAAI,KAAK,CAAC,QAAQ,CAAC;YACzE,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC;YAChC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC;YAClC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;YAGtF,MAAM,KAAK,CAAC,QAAQ,EAAE,CAAC;SACxB;;CACF","file":"create-group-for-first-screen.js","sourcesContent":["import type { Group } from '../../graphic/group';\nimport { computeColsWidth } from '../../layout/compute-col-width';\nimport { computeRowsHeight } from '../../layout/compute-row-height';\nimport { createColGroup } from '../column';\nimport type { SceneProxy } from './proxy';\n\nexport async function createGroupForFirstScreen(\n cornerHeaderGroup: Group,\n colHeaderGroup: Group,\n rowHeaderGroup: Group,\n rightFrozenGroup: Group,\n bottomFrozenGroup: Group,\n bodyGroup: Group,\n xOrigin: number,\n yOrigin: number,\n proxy: SceneProxy\n) {\n // compute parameters\n proxy.setParamsForRow();\n proxy.setParamsForColumn();\n\n // compute colums width in first screen\n proxy.table.internalProps._colWidthsMap.clear();\n proxy.table._clearColRangeWidthsMap();\n computeColsWidth(proxy.table, 0, Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1));\n\n // compute rows height in first screen\n proxy.table.internalProps._rowHeightsMap.clear();\n proxy.table._clearRowRangeHeightsMap();\n computeRowsHeight(proxy.table, 0, Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1));\n\n if (proxy.table.rightFrozenColCount > 0 && proxy.table.colCount - 1 > proxy.firstScreenColLimit) {\n // compute right frozen row height\n computeColsWidth(\n proxy.table,\n proxy.table.colCount - 1 - proxy.table.rightFrozenColCount + 1,\n proxy.table.colCount - 1\n );\n }\n if (proxy.table.bottomFrozenRowCount > 0 && proxy.table.rowCount - 1 > proxy.firstScreenRowLimit) {\n // compute bottom frozen row height\n computeColsWidth(\n proxy.table,\n proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount + 1,\n proxy.table.rowCount - 1\n );\n }\n\n // update colHeaderGroup rowHeaderGroup bodyGroup position\n proxy.table.scenegraph.colHeaderGroup.setAttribute('x', proxy.table.getFrozenColsWidth());\n proxy.table.scenegraph.rowHeaderGroup.setAttribute('y', proxy.table.getFrozenRowsHeight());\n proxy.table.scenegraph.bottomFrozenGroup.setAttribute('x', proxy.table.getFrozenColsWidth());\n proxy.table.scenegraph.rightFrozenGroup.setAttribute('y', proxy.table.getFrozenRowsHeight());\n proxy.table.scenegraph.bodyGroup.setAttributes({\n x: proxy.table.getFrozenColsWidth(),\n y: proxy.table.getFrozenRowsHeight()\n });\n\n // create cornerHeaderGroup\n createColGroup(\n cornerHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n proxy.table.rowHeaderLevelCount - 1, // colEnd\n 0, // rowStart\n proxy.table.columnHeaderLevelCount - 1, // rowEnd\n 'cornerHeader', // CellType\n proxy.table\n );\n\n // create colHeaderGroup\n createColGroup(\n colHeaderGroup,\n xOrigin,\n yOrigin,\n proxy.table.rowHeaderLevelCount, // colStart\n Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount), // colEnd\n 0, // rowStart\n proxy.table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n proxy.table\n );\n\n // create rowHeaderGroup\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n proxy.table.rowHeaderLevelCount - 1, // colEnd\n proxy.table.columnHeaderLevelCount, // rowStart\n Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount), // rowEnd\n 'rowHeader', // isHeader\n proxy.table\n );\n\n if (proxy.table.bottomFrozenRowCount > 0) {\n // create bottomFrozenGroup\n createColGroup(\n bottomFrozenGroup,\n xOrigin,\n yOrigin,\n proxy.table.rowHeaderLevelCount, // colStart\n Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount), // colEnd\n proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount + 1, // rowStart\n proxy.table.rowCount - 1, // rowEnd\n 'body', // isHeader\n proxy.table\n );\n // proxy.table.scenegraph.bottomFrozenGroup.setAttribute(\n // 'y',\n // proxy.table.tableNoFrameHeight - proxy.table.scenegraph.bottomFrozenGroup.attribute.height\n // );\n // proxy.table.scenegraph.leftBottomCellGroup.setAttributes({\n // visible: true,\n // y: proxy.table.tableNoFrameHeight - proxy.table.scenegraph.bottomFrozenGroup.attribute.height,\n // height: proxy.table.scenegraph.bottomFrozenGroup.attribute.height,\n // width: proxy.table.getFrozenColsWidth()\n // });\n // proxy.table.scenegraph.rightBottomCellGroup.setAttributes({\n // visible: true,\n // y: proxy.table.tableNoFrameHeight - proxy.table.scenegraph.bottomFrozenGroup.attribute.height,\n // height: proxy.table.scenegraph.bottomFrozenGroup.attribute.height\n // });\n }\n\n if (proxy.table.rightFrozenColCount > 0) {\n // create rightFrozenGroup\n createColGroup(\n rightFrozenGroup,\n xOrigin,\n yOrigin,\n proxy.table.colCount - 1 - proxy.table.rightFrozenColCount + 1, // colStart\n proxy.table.colCount - 1, // colEnd\n proxy.table.columnHeaderLevelCount, // rowStart\n Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount), // rowEnd\n 'body', // isHeader\n proxy.table\n );\n // proxy.table.scenegraph.rightFrozenGroup.setAttribute(\n // 'x',\n // proxy.table.tableNoFrameWidth - proxy.table.scenegraph.rightFrozenGroup.attribute.width\n // );\n // proxy.table.scenegraph.rightTopCellGroup.setAttributes({\n // visible: true,\n // x: proxy.table.tableNoFrameWidth - proxy.table.scenegraph.rightFrozenGroup.attribute.width,\n // width: proxy.table.scenegraph.rightFrozenGroup.attribute.width,\n // height: proxy.table.getFrozenRowsHeight()\n // });\n // proxy.table.scenegraph.rightBottomCellGroup.setAttributes({\n // visible: true,\n // x: proxy.table.tableNoFrameWidth - proxy.table.scenegraph.rightFrozenGroup.attribute.width,\n // width: proxy.table.scenegraph.rightFrozenGroup.attribute.width\n // });\n }\n\n // create bodyGroup\n createColGroup(\n bodyGroup,\n xOrigin,\n yOrigin,\n proxy.table.rowHeaderLevelCount, // colStart\n Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount), // colEnd\n proxy.table.columnHeaderLevelCount, // rowStart\n Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount), // rowEnd\n 'body', // isHeader\n proxy.table\n );\n\n // update progress information\n if (!bodyGroup.firstChild) {\n // 无数据\n proxy.currentRow = proxy.totalRow;\n proxy.rowEnd = proxy.currentRow;\n proxy.rowUpdatePos = proxy.rowEnd;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n\n proxy.currentCol = proxy.totalCol;\n proxy.colEnd = proxy.currentCol;\n proxy.colUpdatePos = proxy.colEnd;\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n } else {\n proxy.currentRow = (bodyGroup.firstChild as Group)?.rowNumber ?? proxy.totalRow;\n proxy.rowEnd = proxy.currentRow;\n proxy.rowUpdatePos = proxy.rowEnd;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n\n proxy.currentCol = (bodyGroup.lastChild as Group)?.col ?? proxy.totalCol;\n proxy.colEnd = proxy.currentCol;\n proxy.colUpdatePos = proxy.colEnd;\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n\n // 开始异步任务\n await proxy.progress();\n }\n}\n"]}
1
+ {"version":3,"sources":["scenegraph/group-creater/progress/create-group-for-first-screen.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3C,MAAM,UAAgB,yBAAyB,CAC7C,iBAAwB,EACxB,cAAqB,EACrB,cAAqB,EACrB,gBAAuB,EACvB,iBAAwB,EACxB,SAAgB,EAChB,OAAe,EACf,OAAe,EACf,KAAiB;;;QAEjB,MAAM,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC;QAGtG,KAAK,CAAC,eAAe,EAAE,CAAC;QACxB,KAAK,CAAC,kBAAkB,EAAE,CAAC;QAG3B,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;QAChD,KAAK,CAAC,KAAK,CAAC,uBAAuB,EAAE,CAAC;QACtC,gBAAgB,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC;QAGhG,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;QACjD,KAAK,CAAC,KAAK,CAA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,CAAC;YAClC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;YAEtF,KAAK,CAAC,UAAU,GAAG,MAAA,MAAC,SAAS,CAAC,SAAmB,0CAAE,GAAG,mCAAI,KAAK,CAAC,QAAQ,CAAC;YACzE,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC;YAChC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC;YAClC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;YAGtF,MAAM,KAAK,CAAC,QAAQ,EAAE,CAAC;SACxB;;CACF","file":"create-group-for-first-screen.js","sourcesContent":["import type { Group } from '../../graphic/group';\nimport { computeColsWidth } from '../../layout/compute-col-width';\nimport { computeRowsHeight } from '../../layout/compute-row-height';\nimport { createColGroup } from '../column';\nimport type { SceneProxy } from './proxy';\n\nexport async function createGroupForFirstScreen(\n cornerHeaderGroup: Group,\n colHeaderGroup: Group,\n rowHeaderGroup: Group,\n rightFrozenGroup: Group,\n bottomFrozenGroup: Group,\n bodyGroup: Group,\n xOrigin: number,\n yOrigin: number,\n proxy: SceneProxy\n) {\n const { leftBottomCornerGroup, rightTopCornerGroup, rightBottomCornerGroup } = proxy.table.scenegraph;\n\n // compute parameters\n proxy.setParamsForRow();\n proxy.setParamsForColumn();\n\n // compute colums width in first screen\n proxy.table.internalProps._colWidthsMap.clear();\n proxy.table._clearColRangeWidthsMap();\n computeColsWidth(proxy.table, 0, Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1));\n\n // compute rows height in first screen\n proxy.table.internalProps._rowHeightsMap.clear();\n proxy.table._clearRowRangeHeightsMap();\n computeRowsHeight(proxy.table, 0, Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1));\n\n if (proxy.table.rightFrozenColCount > 0 && proxy.table.colCount - 1 > proxy.firstScreenColLimit) {\n // compute right frozen row height\n computeColsWidth(\n proxy.table,\n proxy.table.colCount - 1 - proxy.table.rightFrozenColCount + 1,\n proxy.table.colCount - 1\n );\n }\n if (proxy.table.bottomFrozenRowCount > 0 && proxy.table.rowCount - 1 > proxy.firstScreenRowLimit) {\n // compute bottom frozen row height\n computeColsWidth(\n proxy.table,\n proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount + 1,\n proxy.table.rowCount - 1\n );\n }\n\n // update colHeaderGroup rowHeaderGroup bodyGroup position\n proxy.table.scenegraph.colHeaderGroup.setAttribute('x', proxy.table.getFrozenColsWidth());\n proxy.table.scenegraph.rowHeaderGroup.setAttribute('y', proxy.table.getFrozenRowsHeight());\n proxy.table.scenegraph.bottomFrozenGroup.setAttribute('x', proxy.table.getFrozenColsWidth());\n proxy.table.scenegraph.rightFrozenGroup.setAttribute('y', proxy.table.getFrozenRowsHeight());\n proxy.table.scenegraph.bodyGroup.setAttributes({\n x: proxy.table.getFrozenColsWidth(),\n y: proxy.table.getFrozenRowsHeight()\n });\n\n // create cornerHeaderGroup\n createColGroup(\n cornerHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n proxy.table.rowHeaderLevelCount - 1, // colEnd\n 0, // rowStart\n proxy.table.columnHeaderLevelCount - 1, // rowEnd\n 'cornerHeader', // CellType\n proxy.table\n );\n\n // create colHeaderGroup\n createColGroup(\n colHeaderGroup,\n xOrigin,\n yOrigin,\n proxy.table.rowHeaderLevelCount, // colStart\n Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount), // colEnd\n 0, // rowStart\n proxy.table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n proxy.table\n );\n\n // create rowHeaderGroup\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n proxy.table.rowHeaderLevelCount - 1, // colEnd\n proxy.table.columnHeaderLevelCount, // rowStart\n Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount), // rowEnd\n 'rowHeader', // isHeader\n proxy.table\n );\n\n if (proxy.table.bottomFrozenRowCount > 0) {\n if (!proxy.table.isPivotChart()) {\n // create left bottom frozen\n createColGroup(\n leftBottomCornerGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n proxy.table.rowHeaderLevelCount - 1, // colEnd\n proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount + 1, // rowStart\n proxy.table.rowCount - 1, // rowEnd\n 'rowHeader', // isHeader\n proxy.table\n );\n }\n // create bottomFrozenGroup\n createColGroup(\n bottomFrozenGroup,\n xOrigin,\n yOrigin,\n proxy.table.rowHeaderLevelCount, // colStart\n Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount), // colEnd\n proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount + 1, // rowStart\n proxy.table.rowCount - 1, // rowEnd\n 'body', // isHeader\n proxy.table\n );\n }\n\n if (proxy.table.rightFrozenColCount > 0) {\n if (!proxy.table.isPivotChart()) {\n // create right top frozen Group\n createColGroup(\n rightTopCornerGroup,\n xOrigin,\n yOrigin,\n proxy.table.colCount - 1 - proxy.table.rightFrozenColCount + 1, // colStart\n proxy.table.colCount - 1, // colEnd\n 0, // rowStart\n proxy.table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n proxy.table\n );\n }\n // create rightFrozenGroup\n createColGroup(\n rightFrozenGroup,\n xOrigin,\n yOrigin,\n proxy.table.colCount - 1 - proxy.table.rightFrozenColCount + 1, // colStart\n proxy.table.colCount - 1, // colEnd\n proxy.table.columnHeaderLevelCount, // rowStart\n Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount), // rowEnd\n 'body', // isHeader\n proxy.table\n );\n }\n\n if (proxy.table.bottomFrozenRowCount > 0 && proxy.table.rightFrozenColCount > 0 && !proxy.table.isPivotChart()) {\n // create right bottom frozen Group\n createColGroup(\n rightBottomCornerGroup,\n xOrigin,\n yOrigin,\n proxy.table.colCount - 1 - proxy.table.rightFrozenColCount + 1, // colStart\n proxy.table.colCount - 1, // colEnd\n proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount + 1, // rowStart\n proxy.table.rowCount - 1, // rowEnd\n 'body', // isHeader\n proxy.table\n );\n }\n\n // create bodyGroup\n createColGroup(\n bodyGroup,\n xOrigin,\n yOrigin,\n proxy.table.rowHeaderLevelCount, // colStart\n Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount), // colEnd\n proxy.table.columnHeaderLevelCount, // rowStart\n Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount), // rowEnd\n 'body', // isHeader\n proxy.table\n );\n\n // update progress information\n if (!bodyGroup.firstChild) {\n // 无数据\n proxy.currentRow = proxy.totalRow;\n proxy.rowEnd = proxy.currentRow;\n proxy.rowUpdatePos = proxy.rowEnd;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n\n proxy.currentCol = proxy.totalCol;\n proxy.colEnd = proxy.currentCol;\n proxy.colUpdatePos = proxy.colEnd;\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n } else {\n proxy.currentRow = (bodyGroup.firstChild as Group)?.rowNumber ?? proxy.totalRow;\n proxy.rowEnd = proxy.currentRow;\n proxy.rowUpdatePos = proxy.rowEnd;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n\n proxy.currentCol = (bodyGroup.lastChild as Group)?.col ?? proxy.totalCol;\n proxy.colEnd = proxy.currentCol;\n proxy.colUpdatePos = proxy.colEnd;\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n\n // 开始异步任务\n await proxy.progress();\n }\n}\n"]}
@@ -36,12 +36,12 @@ export declare class SceneProxy {
36
36
  referenceCol: number;
37
37
  screenLeftCol: number;
38
38
  colUpdateDirection: 'left' | 'right';
39
+ deltaX: number;
39
40
  cellCache: Map<number, Group>;
40
41
  constructor(table: BaseTableAPI);
41
42
  setParamsForColumn(): void;
42
43
  setParamsForRow(): void;
43
44
  createGroupForFirstScreen(cornerHeaderGroup: Group, colHeaderGroup: Group, rowHeaderGroup: Group, rightFrozenGroup: Group, bottomFrozenGroup: Group, bodyGroup: Group, xOrigin: number, yOrigin: number): Promise<void>;
44
- createColGroupForFirstScreen(rowHeaderGroup: Group, bodyGroup: Group, xOrigin: number, yOrigin: number, table: BaseTableAPI): Promise<void>;
45
45
  progress(): Promise<void>;
46
46
  createRow(): Promise<void>;
47
47
  createCol(): Promise<void>;
@@ -24,6 +24,8 @@ var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, gener
24
24
  }));
25
25
  };
26
26
 
27
+ import { isNumber } from "@visactor/vutils";
28
+
27
29
  import { Group } from "../../graphic/group";
28
30
 
29
31
  import { computeColsWidth } from "../../layout/compute-col-width";
@@ -48,8 +50,8 @@ export class SceneProxy {
48
50
  constructor(table) {
49
51
  this.mode = "column", this.rowLimit = 1e3, this.currentRow = 0, this.rowStart = 0,
50
52
  this.rowEnd = 0, this.referenceRow = 0, this.screenTopRow = 0, this.deltaY = 0,
51
- this.colLimit = 1e3, this.screenLeftCol = 0, this.cellCache = new Map, this.table = table,
52
- this.table.isPivotChart() ? (this.rowLimit = 100, this.colLimit = 100) : "autoHeight" === this.table.heightMode ? this.rowLimit = 100 : "autoWidth" === this.table.widthMode && (this.colLimit = 100),
53
+ this.colLimit = 100, this.screenLeftCol = 0, this.deltaX = 0, this.cellCache = new Map,
54
+ this.table = table, this.table.isPivotChart() ? (this.rowLimit = 100, this.colLimit = 100) : "autoHeight" === this.table.heightMode ? this.rowLimit = 100 : "autoWidth" === this.table.widthMode && (this.colLimit = 100),
53
55
  this.table.internalProps.transpose ? this.mode = "row" : this.table.isPivotTable() && (this.mode = "pivot"),
54
56
  this.table.options.maintainedDataCount && (this.rowLimit = this.table.options.maintainedDataCount);
55
57
  }
@@ -84,18 +86,6 @@ export class SceneProxy {
84
86
  yield createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, this);
85
87
  }));
86
88
  }
87
- createColGroupForFirstScreen(rowHeaderGroup, bodyGroup, xOrigin, yOrigin, table) {
88
- var _a, _b;
89
- return __awaiter(this, void 0, void 0, (function*() {
90
- this.setParamsForRow(), this.setParamsForColumn(), computeRowsHeight(table, this.table.columnHeaderLevelCount, Math.min(this.firstScreenRowLimit, table.rowCount - 1)),
91
- createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.rowHeaderLevelCount - 1, table.columnHeaderLevelCount, table.rowCount - 1, "rowHeader", table, this.firstScreenRowLimit),
92
- createColGroup(bodyGroup, xOrigin, yOrigin, table.rowHeaderLevelCount, table.colCount - 1, table.columnHeaderLevelCount, table.rowCount - 1, "body", table, this.firstScreenRowLimit),
93
- bodyGroup.firstChild ? (this.currentRow = null !== (_b = null === (_a = bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.rowNumber) && void 0 !== _b ? _b : this.totalRow,
94
- this.rowEnd = this.currentRow, this.rowUpdatePos = this.rowEnd, this.referenceRow = Math.floor((this.rowEnd - this.rowStart) / 2),
95
- yield this.progress()) : (this.currentRow = this.totalRow, this.rowEnd = this.currentRow,
96
- this.rowUpdatePos = this.rowEnd, this.referenceRow = Math.floor((this.rowEnd - this.rowStart) / 2));
97
- }));
98
- }
99
89
  progress() {
100
90
  return __awaiter(this, void 0, void 0, (function*() {
101
91
  return new Promise(((resolve, reject) => {
@@ -122,7 +112,7 @@ export class SceneProxy {
122
112
  }
123
113
  createRowCellGroup(onceCount) {
124
114
  const endRow = Math.min(this.totalRow, this.currentRow + onceCount);
125
- if (computeRowsHeight(this.table, this.currentRow + 1, endRow), this.table.rowHeaderLevelCount) {
115
+ if (computeRowsHeight(this.table, this.currentRow + 1, endRow, !1), this.table.rowHeaderLevelCount) {
126
116
  let maxHeight = 0;
127
117
  for (let col = 0; col < this.table.rowHeaderLevelCount; col++) {
128
118
  const colGroup = this.table.scenegraph.getColGroup(col), cellType = "rowHeader", {height: height} = createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table, cellType);
@@ -147,7 +137,12 @@ export class SceneProxy {
147
137
  }
148
138
  createColGroup(onceCount) {
149
139
  const endCol = Math.min(this.totalCol, this.currentCol + onceCount);
150
- if (computeColsWidth(this.table, this.currentCol + 1, endCol), this.table.columnHeaderLevelCount) {
140
+ computeColsWidth(this.table, this.currentCol + 1, endCol);
141
+ for (let row = 0; row < this.table.rowCount; row++) {
142
+ const cellGroup = this.highPerformanceGetCell(this.currentCol, row);
143
+ isNumber(cellGroup.mergeCol) && cellGroup.mergeCol > this.currentCol && this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);
144
+ }
145
+ if (this.table.columnHeaderLevelCount) {
151
146
  const lastColumnGroup = this.table.scenegraph.colHeaderGroup.lastChild instanceof Group ? this.table.scenegraph.colHeaderGroup.lastChild : this.table.scenegraph.colHeaderGroup.lastChild._prev, xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width, yOrigin = lastColumnGroup.attribute.y;
152
147
  createColGroup(this.table.scenegraph.colHeaderGroup, xOrigin, yOrigin, this.currentCol + 1, endCol, 0, this.table.columnHeaderLevelCount - 1, "columnHeader", this.table);
153
148
  }
@@ -191,7 +186,7 @@ export class SceneProxy {
191
186
  }
192
187
  updateCellGroups(count) {
193
188
  const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);
194
- "autoHeight" === this.table.heightMode && computeRowsHeight(this.table, this.rowUpdatePos, distRow),
189
+ "autoHeight" === this.table.heightMode && computeRowsHeight(this.table, this.rowUpdatePos, distRow, !1),
195
190
  updateRowContent(this.rowUpdatePos, distRow, this), "autoHeight" === this.table.heightMode && updateAutoRow(this.bodyLeftCol, this.bodyRightCol, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection),
196
191
  this.rowUpdatePos = distRow + 1;
197
192
  }
@@ -222,7 +217,7 @@ export class SceneProxy {
222
217
  let syncTopRow, syncBottomRow;
223
218
  "autoHeight" === this.table.heightMode ? (syncTopRow = this.rowStart, syncBottomRow = this.rowEnd) : (syncTopRow = Math.max(this.bodyTopRow, this.screenTopRow - 2 * this.screenRowCount),
224
219
  syncBottomRow = Math.min(this.bodyBottomRow, this.screenTopRow + 3 * this.screenRowCount)),
225
- console.log("sort更新同步范围", syncTopRow, syncBottomRow), "autoHeight" === this.table.heightMode && computeRowsHeight(this.table, syncTopRow, syncBottomRow);
220
+ console.log("sort更新同步范围", syncTopRow, syncBottomRow), computeRowsHeight(this.table, syncTopRow, syncBottomRow);
226
221
  for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) for (let row = syncTopRow; row <= syncBottomRow; row++) {
227
222
  const cellGroup = this.highPerformanceGetCell(col, row);
228
223
  this.updateCellGroupContent(cellGroup);
@@ -1 +1 @@
1
- {"version":3,"sources":["scenegraph/group-creater/progress/proxy.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACv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AAO,SAAS,CAAC;SAClB;QACD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QAErE,IAAI,SAAS,CAAC,GAAG,KAAK,GAAG,IAAI,SAAS,CAAC,GAAG,EAAE;YAC1C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;SACpC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAED,SAAS,cAAc,CAAC,cAAqB,EAAE,GAAW;IACxD,IAAI,CAAC,cAAc,EAAE;QACnB,OAAO,IAAI,CAAC;KACb;IACD,IAAI,cAAc,CAAC,GAAG,KAAK,GAAG,EAAE;QAC9B,OAAO,cAAc,CAAC;KACvB;SAAM,IAAI,cAAc,CAAC,GAAG,GAAG,GAAG,EAAE;QACnC,OAAO,cAAc,CAAC,cAAc,CAAC,KAAc,EAAE,GAAG,CAAC,CAAC;KAC3D;IACD,OAAO,cAAc,CAAC,cAAc,CAAC,KAAc,EAAE,GAAG,CAAC,CAAC;AAC5D,CAAC","file":"proxy.js","sourcesContent":["import { isNumber } from '@visactor/vutils';\nimport type { BaseTableAPI } from '../../../ts-types/base-table';\nimport { Group } from '../../graphic/group';\nimport { computeColsWidth } from '../../layout/compute-col-width';\nimport { computeRowsHeight } from '../../layout/compute-row-height';\nimport { emptyGroup } from '../../utils/empty-group';\nimport { createColGroup } from '../column';\nimport { createComplexColumn } from '../column-helper';\nimport { createGroupForFirstScreen } from './create-group-for-first-screen';\nimport { dynamicSetX, updateColContent } from './update-position/dynamic-set-x';\nimport { dynamicSetY, updateRowContent } from './update-position/dynamic-set-y';\nimport { updateAutoRow } from './update-position/update-auto-row';\n\nexport class SceneProxy {\n table: BaseTableAPI;\n mode: 'column' | 'row' | 'pivot' = 'column';\n\n rowLimit = 1000;\n currentRow = 0; // 目前渐进生成的row number\n totalRow: number; // 渐进完成最后一行的row number\n yLimitTop: number; // y > yLimitTop动态更新,否则直接修改xy\n yLimitBottom: number; // y < yLimitBottom动态更新,否则直接修改xy\n rowStart = 0; // 当前维护的部分第一行的row number\n rowEnd = 0; // 当前维护的部分最后一行的row number\n referenceRow = 0; // 当前维护的部分中间一行的row number,认为referenceRow对应当前屏幕显示范围的第一行\n bodyTopRow: number; // table body部分的第一行row number\n bodyBottomRow: number; // table body部分的最后一行row number\n screenRowCount: number; // 预计屏幕范围内显示的row count\n firstScreenRowLimit: number; // 首屏同步加载部分最后一行的row number\n taskRowCount: number; // 一次任务生成/更新的row count\n rowUpdatePos: number; // 异步任务目前更新到的行的row number\n rowUpdateDirection: 'up' | 'down'; // 当前行更新的方向\n screenTopRow: number = 0; // 当前屏幕范围内显示的第一行的row number\n deltaY: number = 0;\n\n colLimit = 1000;\n bodyLeftCol: number; // table body部分的第一列col number\n bodyRightCol: number; // table body部分的最后一列col number\n totalCol: number; // 渐进完成最后一列的col number\n colStart: number; // 当前维护的部分第一列的col number\n colEnd: number; // 当前维护的部分最后一列的col number\n taskColCount: number; // 一次任务生成/更新的col count\n xLimitLeft: number; // x > xLimitLeft动态更新,否则直接修改xy\n xLimitRight: number; // x < xLimitRight动态更新,否则直接修改xy\n screenColCount: number; // 预计屏幕范围内显示的col count\n firstScreenColLimit: number; // 首屏同步加载部分最后一列的col number\n colUpdatePos: number; // 异步任务目前更新到的列的col number\n currentCol: number; // 目前渐进生成的col number\n referenceCol: number; // 当前维护的部分中间一列的col number,认为referenceCol对应当前屏幕显示范围的第一列\n screenLeftCol: number = 0; // 当前屏幕范围内显示的第一列的col number\n colUpdateDirection: 'left' | 'right'; // 当前列更新方向\n\n cellCache: Map<number, Group> = new Map(); // 单元格位置快速查找缓存\n\n constructor(table: BaseTableAPI) {\n this.table = table;\n\n if (this.table.isPivotChart()) {\n this.rowLimit = 100;\n this.colLimit = 100;\n } else if (this.table.heightMode === 'autoHeight') {\n this.rowLimit = 100;\n } else if (this.table.widthMode === 'autoWidth') {\n this.colLimit = 100;\n }\n\n if (this.table.internalProps.transpose) {\n this.mode = 'row';\n } else if (this.table.isPivotTable()) {\n this.mode = 'pivot';\n }\n if (this.table.options.maintainedDataCount) {\n this.rowLimit = this.table.options.maintainedDataCount;\n }\n }\n\n setParamsForColumn() {\n this.bodyLeftCol = this.table.rowHeaderLevelCount;\n // this.bodyRightCol = this.table.colCount - 1;\n this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;\n\n // compute the column info about progress creation\n const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);\n this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1; // 目标渐进完成的col\n this.colStart = this.bodyLeftCol;\n const defaultColWidth = this.table.defaultColWidth;\n this.taskColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth) * 1;\n\n // 确定动态更新限制\n const totalBodyWidth = defaultColWidth * totalActualBodyColCount;\n const totalWidth = defaultColWidth * (this.bodyRightCol - this.bodyLeftCol + 1);\n this.xLimitLeft = totalBodyWidth / 2;\n this.xLimitRight = totalWidth - totalBodyWidth / 2;\n\n // 确定首屏高度范围\n const widthLimit = this.table.tableNoFrameWidth * 5;\n this.screenColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth);\n this.firstScreenColLimit = this.bodyLeftCol + Math.ceil(widthLimit / defaultColWidth);\n // this.firstScreenRowLimit = this.bodyBottomRow;\n\n this.colUpdatePos = this.bodyRightCol;\n }\n\n setParamsForRow() {\n this.bodyTopRow = this.table.columnHeaderLevelCount;\n this.bodyBottomRow = this.table.rowCount - 1 - this.table.bottomFrozenRowCount;\n // this.bodyLeftCol = 0;\n // this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;\n\n // 计算渐进加载数量\n const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1); // 渐进加载总row数量\n this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1; // 目标渐进完成的row\n this.rowStart = this.bodyTopRow;\n const defaultRowHeight = this.table.defaultRowHeight;\n this.taskRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight) * 1;\n\n // 确定动态更新限制\n const totalBodyHeight = defaultRowHeight * totalActualBodyRowCount;\n const totalHeight = defaultRowHeight * (this.bodyBottomRow - this.bodyTopRow + 1);\n this.yLimitTop = totalBodyHeight / 2;\n this.yLimitBottom = totalHeight - totalBodyHeight / 2;\n // this.bottomOffset = totalHeight - totalBodyHeight / 2;\n\n // 确定首屏高度范围\n const heightLimit = this.table.tableNoFrameHeight * 5;\n this.screenRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight);\n this.firstScreenRowLimit = this.bodyTopRow + Math.ceil(heightLimit / defaultRowHeight);\n // this.firstScreenRowLimit = this.bodyBottomRow;\n\n this.rowUpdatePos = this.bodyBottomRow;\n }\n\n async createGroupForFirstScreen(\n cornerHeaderGroup: Group,\n colHeaderGroup: Group,\n rowHeaderGroup: Group,\n rightFrozenGroup: Group,\n bottomFrozenGroup: Group,\n bodyGroup: Group,\n xOrigin: number,\n yOrigin: number\n ) {\n await createGroupForFirstScreen(\n cornerHeaderGroup,\n colHeaderGroup,\n rowHeaderGroup,\n rightFrozenGroup,\n bottomFrozenGroup,\n bodyGroup,\n xOrigin,\n yOrigin,\n this\n );\n }\n\n async createColGroupForFirstScreen(\n rowHeaderGroup: Group,\n bodyGroup: Group,\n xOrigin: number,\n yOrigin: number,\n table: BaseTableAPI\n ) {\n this.setParamsForRow();\n this.setParamsForColumn();\n\n // compute row height in first screen\n computeRowsHeight(table, this.table.columnHeaderLevelCount, Math.min(this.firstScreenRowLimit, table.rowCount - 1));\n\n // 生成首屏单元格\n // rowHeader\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.rowHeaderLevelCount - 1, // colEnd\n table.columnHeaderLevelCount, // rowStart\n table.rowCount - 1, // rowEnd\n 'rowHeader', // isHeader\n table,\n this.firstScreenRowLimit\n );\n // body\n createColGroup(\n bodyGroup,\n xOrigin,\n yOrigin,\n table.rowHeaderLevelCount, // colStart\n table.colCount - 1, // colEnd\n table.columnHeaderLevelCount, // rowStart\n table.rowCount - 1, // rowEnd\n 'body', // isHeader\n table,\n this.firstScreenRowLimit\n );\n\n // 更新row信息\n if (!bodyGroup.firstChild) {\n // 无数据\n this.currentRow = this.totalRow;\n this.rowEnd = this.currentRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = Math.floor((this.rowEnd - this.rowStart) / 2);\n } else {\n this.currentRow = (bodyGroup.firstChild as Group)?.rowNumber ?? this.totalRow;\n this.rowEnd = this.currentRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = Math.floor((this.rowEnd - this.rowStart) / 2);\n // 开始异步任务\n await this.progress();\n }\n }\n\n // async progress() {\n // if (this.rowUpdatePos < this.rowEnd) {\n // console.log('progress rowUpdatePos', this.rowUpdatePos);\n // // 先更新\n // await this.updateCellGroupsAsync();\n // await this.progress();\n // } else if (this.currentRow < this.totalRow) {\n // console.log('progress currentRow', this.currentRow);\n // // 先更新没有需要更新的节点,在生成新节点\n // await this.createRow();\n // await this.progress();\n // }\n // }\n async progress() {\n return new Promise<void>((resolve, reject) => {\n setTimeout(async () => {\n if (this.colUpdatePos < this.colEnd) {\n await this.updateColCellGroupsAsync();\n await this.progress();\n } else if (this.rowUpdatePos < this.rowEnd) {\n // console.log('progress rowUpdatePos', this.rowUpdatePos);\n // 先更新\n await this.updateRowCellGroupsAsync();\n await this.progress();\n } else if (this.currentCol < this.totalCol) {\n await this.createCol();\n await this.progress();\n } else if (this.currentRow < this.totalRow) {\n // console.log('progress currentRow', this.currentRow);\n // 先更新没有需要更新的节点,在生成新节点\n await this.createRow();\n await this.progress();\n }\n resolve();\n }, 0);\n });\n }\n\n async createRow() {\n if (!this.taskRowCount) {\n return;\n }\n console.log('createRow', this.currentRow, this.currentRow + this.taskRowCount);\n this.createRowCellGroup(this.taskRowCount);\n }\n\n async createCol() {\n if (!this.taskColCount) {\n return;\n }\n console.log('createCol', this.currentCol, this.currentCol + this.taskColCount);\n this.createColGroup(this.taskRowCount);\n }\n\n createRowCellGroup(onceCount: number) {\n const endRow = Math.min(this.totalRow, this.currentRow + onceCount);\n // compute rows height\n computeRowsHeight(this.table, this.currentRow + 1, endRow);\n\n if (this.table.rowHeaderLevelCount) {\n // create row header row cellGroup\n let maxHeight = 0;\n for (let col = 0; col < this.table.rowHeaderLevelCount; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellType = 'rowHeader';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellType\n );\n maxHeight = Math.max(maxHeight, height);\n this.table.scenegraph.rowHeaderGroup.setAttribute('height', maxHeight);\n }\n }\n\n if (this.table.rightFrozenColCount) {\n // create row header row cellGroup\n let maxHeight = 0;\n for (let col = this.table.colCount - this.table.rightFrozenColCount; col < this.table.colCount; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellType = 'rowHeader';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellType\n );\n maxHeight = Math.max(maxHeight, height);\n this.table.scenegraph.rightFrozenGroup.setAttribute('height', maxHeight);\n }\n }\n\n // create body row cellGroup\n let maxHeight = 0;\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellType = 'body';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellType\n );\n maxHeight = Math.max(maxHeight, height);\n }\n this.table.scenegraph.bodyGroup.setAttribute('height', maxHeight);\n\n this.currentRow = endRow;\n this.rowEnd = endRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = this.rowStart + Math.floor((endRow - this.rowStart) / 2);\n\n // update container group size and border\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n createColGroup(onceCount: number) {\n // compute rows height\n const endCol = Math.min(this.totalCol, this.currentCol + onceCount);\n computeColsWidth(this.table, this.currentCol + 1, endCol);\n\n if (this.table.columnHeaderLevelCount) {\n // create colGroup\n const lastColumnGroup = (\n this.table.scenegraph.colHeaderGroup.lastChild instanceof Group\n ? this.table.scenegraph.colHeaderGroup.lastChild\n : this.table.scenegraph.colHeaderGroup.lastChild._prev\n ) as Group;\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create colHeaderGroup\n createColGroup(\n this.table.scenegraph.colHeaderGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n 0, // rowStart\n this.table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n this.table\n );\n }\n if (this.table.bottomFrozenRowCount) {\n // create colGroup\n const lastColumnGroup = (\n this.table.scenegraph.bottomFrozenGroup.lastChild instanceof Group\n ? this.table.scenegraph.bottomFrozenGroup.lastChild\n : this.table.scenegraph.bottomFrozenGroup.lastChild._prev\n ) as Group;\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create bottomFrozenGroup\n createColGroup(\n this.table.scenegraph.bottomFrozenGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n this.table.rowCount - this.table.bottomFrozenRowCount, // rowStart\n this.table.rowCount - 1, // rowEnd\n 'columnHeader', // isHeader\n this.table\n );\n }\n\n // create colGroup\n const lastColumnGroup = (\n this.table.scenegraph.bodyGroup.lastChild instanceof Group\n ? this.table.scenegraph.bodyGroup.lastChild\n : this.table.scenegraph.bodyGroup.lastChild._prev\n ) as Group;\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create bodyGroup\n createColGroup(\n this.table.scenegraph.bodyGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n this.rowStart, // rowStart\n this.rowEnd, // rowEnd\n 'body', // isHeader\n this.table\n );\n\n this.currentCol = endCol;\n this.colEnd = endCol;\n this.colUpdatePos = this.colEnd;\n this.referenceCol = this.colStart + Math.floor((endCol - this.colStart) / 2);\n console.log('async', this.referenceCol, this.colStart, this.colEnd);\n\n // update container group size and border\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n async setY(y: number) {\n if (y < this.yLimitTop && this.rowStart === this.bodyTopRow) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n } else if (y > this.yLimitBottom && this.rowEnd === this.bodyBottomRow) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n } else {\n // 执行动态更新节点\n this.dynamicSetY(y);\n }\n }\n\n async setX(x: number) {\n if (x < this.xLimitLeft && this.colStart === this.bodyLeftCol) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndColHeaderX(-x);\n } else if (x > this.xLimitRight && this.colEnd === this.bodyRightCol) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndColHeaderX(-x);\n } else {\n // 执行动态更新节点\n this.dynamicSetX(x);\n }\n }\n\n async dynamicSetY(y: number) {\n dynamicSetY(y, this);\n }\n async dynamicSetX(x: number) {\n dynamicSetX(x, this);\n }\n\n updateBody(y: number) {\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n }\n\n async updateRowCellGroupsAsync() {\n this.updateCellGroups(this.taskRowCount);\n }\n\n updateCellGroups(count: number) {\n const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);\n // console.log('updateCellGroups', this.rowUpdatePos, distRow);\n if (this.table.heightMode === 'autoHeight') {\n computeRowsHeight(this.table, this.rowUpdatePos, distRow);\n }\n\n updateRowContent(this.rowUpdatePos, distRow, this);\n\n if (this.table.heightMode === 'autoHeight') {\n updateAutoRow(\n this.bodyLeftCol, // colStart\n this.bodyRightCol, // colEnd\n this.rowUpdatePos, // rowStart\n distRow, // rowEnd\n this.table,\n this.rowUpdateDirection\n );\n }\n\n this.rowUpdatePos = distRow + 1;\n }\n\n async updateColCellGroupsAsync() {\n this.updateColGroups(this.taskRowCount);\n }\n\n updateColGroups(count: number) {\n const distCol = Math.min(this.bodyRightCol, this.colUpdatePos + count);\n // console.log('updateCellGroups', this.colUpdatePos, distCol);\n // for (let col = this.colUpdatePos; col <= distCol; col++) {\n // const colGroup = this.table.scenegraph.getColGroup(col);\n // if (colGroup) {\n // // colGroup.forEachChildren((cellGroup: Group) => {\n // // this.updateCellGroupContent(cellGroup);\n // // });\n // // for (let row = (colGroup.firstChild as Group).row; row <= (colGroup.lastChild as Group).row; row++) {\n // // const cellGroup = this.highPerformanceGetCell(colGroup.col, row);\n // // this.updateCellGroupContent(cellGroup);\n // // }\n // let cellGroup = colGroup.firstChild;\n // while (cellGroup) {\n // // this.updateCellGroupContent(cellGroup as Group);\n // // cellGroup = cellGroup._next;\n // const newCellGroup = this.updateCellGroupContent(cellGroup as Group);\n // cellGroup = newCellGroup._next;\n // }\n // colGroup.needUpdate = false;\n // }\n // }\n computeColsWidth(this.table, this.colUpdatePos, distCol);\n updateColContent(this.colUpdatePos, distCol, this);\n this.colUpdatePos = distCol + 1;\n }\n\n updateCellGroupPosition(cellGroup: Group, newRow: number, y: number) {\n // 更新位置&row\n cellGroup.row = newRow;\n cellGroup.setAttribute('y', y);\n (cellGroup as any).needUpdate = true;\n (cellGroup as any).needUpdateForAutoRowHeight = true;\n }\n\n updateCellGroupContent(cellGroup: Group) {\n if (!cellGroup.needUpdate) {\n return cellGroup;\n }\n\n const newCellGroup = this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);\n // 更新内容\n // const textMark = cellGroup.firstChild as WrapText;\n // const autoWrapText = Array.isArray(textMark.attribute.text);\n // const textStr: string = this.table.getCellValue(cellGroup.col, cellGroup.row);\n // let text;\n // if (autoWrapText) {\n // text = String(textStr).replace(/\\r?\\n/g, '\\n').replace(/\\r/g, '\\n').split('\\n');\n // } else {\n // text = textStr;\n // }\n\n // textMark.setAttribute('text', text);\n\n cellGroup.needUpdate = false;\n return newCellGroup || cellGroup;\n }\n\n async sortCell() {\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n for (let row = this.rowStart; row <= this.rowEnd; row++) {\n // const cellGroup = this.table.scenegraph.getCell(col, row);\n const cellGroup = this.highPerformanceGetCell(col, row);\n cellGroup.needUpdate = true;\n }\n }\n\n // 更新同步范围\n let syncTopRow;\n let syncBottomRow;\n if (this.table.heightMode === 'autoHeight') {\n syncTopRow = this.rowStart;\n syncBottomRow = this.rowEnd;\n } else {\n syncTopRow = Math.max(this.bodyTopRow, this.screenTopRow - this.screenRowCount * 2);\n syncBottomRow = Math.min(this.bodyBottomRow, this.screenTopRow + this.screenRowCount * 3);\n }\n console.log('sort更新同步范围', syncTopRow, syncBottomRow);\n if (this.table.heightMode === 'autoHeight') {\n computeRowsHeight(this.table, syncTopRow, syncBottomRow);\n }\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n for (let row = syncTopRow; row <= syncBottomRow; row++) {\n // const cellGroup = this.table.scenegraph.getCell(col, row);\n const cellGroup = this.highPerformanceGetCell(col, row);\n this.updateCellGroupContent(cellGroup);\n }\n }\n console.log('updateAutoRow', this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? 'down' : 'up');\n if (this.table.heightMode === 'autoHeight') {\n updateAutoRow(\n this.bodyLeftCol, // colStart\n this.bodyRightCol, // colEnd\n syncTopRow, // rowStart\n syncBottomRow, // rowEnd\n this.table,\n this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? 'down' : 'up' // 跳转到底部时,从下向上对齐\n );\n }\n this.rowUpdatePos = this.rowStart;\n this.rowUpdateDirection = this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? 'down' : 'up';\n\n if (\n this.rowEnd === this.table.scenegraph.proxy.bodyBottomRow &&\n this.rowStart === this.table.scenegraph.proxy.bodyTopRow\n ) {\n // 全量更新,do nothing\n } else if (this.rowEnd === this.table.scenegraph.proxy.bodyBottomRow) {\n const totalHeight = this.table.getAllRowsHeight();\n const top = totalHeight - this.table.scenegraph.height;\n this.updateBody(top);\n } else if (this.rowStart === this.table.scenegraph.proxy.bodyTopRow) {\n this.updateBody(0);\n }\n\n if (this.table.heightMode !== 'autoHeight') {\n await this.progress();\n }\n }\n\n highPerformanceGetCell(\n col: number,\n row: number,\n // rowStart: number = this.rowStart,\n // rowEnd: number = this.rowEnd,\n getShadow?: boolean\n ) {\n // if (row < rowStart || row > rowEnd) {\n // return emptyGroup;\n // }\n // if (row < this.rowStart || row > this.rowEnd || col < this.colStart || col > this.colEnd) {\n // return emptyGroup;\n // }\n\n if (\n row >= this.table.columnHeaderLevelCount && // not column header\n row < this.table.rowCount - this.table.bottomFrozenRowCount && // not bottom frozen\n (row < this.rowStart || row > this.rowEnd) // not in proxy row range\n ) {\n return emptyGroup;\n }\n\n if (\n col >= this.table.rowHeaderLevelCount && // not row header\n col < this.table.colCount - this.table.rightFrozenColCount && // not right frozen\n (col < this.colStart || col > this.colEnd) // not in proxy col range\n ) {\n return emptyGroup;\n }\n\n if (this.cellCache.get(col)) {\n const cacheCellGoup = this.cellCache.get(col);\n if ((cacheCellGoup._next || cacheCellGoup._prev) && Math.abs(cacheCellGoup.row - row) < row) {\n // 由缓存单元格向前后查找要快于从头查找\n let cellGroup = getCellByCache(cacheCellGoup, row);\n if (!cellGroup || (!getShadow && cellGroup.role === 'shadow-cell')) {\n cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n }\n cellGroup.row && this.cellCache.set(col, cellGroup);\n return cellGroup;\n }\n const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n // cellGroup.row && this.cellCache.set(col, cellGroup);\n if (cellGroup.col === col && cellGroup.row) {\n this.cellCache.set(col, cellGroup);\n }\n return cellGroup;\n }\n const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n // cellGroup.row && this.cellCache.set(col, cellGroup);\n if (cellGroup.col === col && cellGroup.row) {\n this.cellCache.set(col, cellGroup);\n }\n return cellGroup;\n }\n}\n\nfunction getCellByCache(cacheCellGroup: Group, row: number): Group | null {\n if (!cacheCellGroup) {\n return null;\n }\n if (cacheCellGroup.row === row) {\n return cacheCellGroup;\n } else if (cacheCellGroup.row > row) {\n return getCellByCache(cacheCellGroup._prev as Group, row);\n }\n return getCellByCache(cacheCellGroup._next as Group, row);\n}\n"]}
1
+ {"version":3,"sources":["scenegraph/group-creater/progress/proxy.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAElE,MAAM,OAA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S,CAAC,GAAG,KAAK,GAAG,IAAI,SAAS,CAAC,GAAG,EAAE;YAC1C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;SACpC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAED,SAAS,cAAc,CAAC,cAAqB,EAAE,GAAW;IACxD,IAAI,CAAC,cAAc,EAAE;QACnB,OAAO,IAAI,CAAC;KACb;IACD,IAAI,cAAc,CAAC,GAAG,KAAK,GAAG,EAAE;QAC9B,OAAO,cAAc,CAAC;KACvB;SAAM,IAAI,cAAc,CAAC,GAAG,GAAG,GAAG,EAAE;QACnC,OAAO,cAAc,CAAC,cAAc,CAAC,KAAc,EAAE,GAAG,CAAC,CAAC;KAC3D;IACD,OAAO,cAAc,CAAC,cAAc,CAAC,KAAc,EAAE,GAAG,CAAC,CAAC;AAC5D,CAAC","file":"proxy.js","sourcesContent":["import { isNumber } from '@visactor/vutils';\nimport type { BaseTableAPI } from '../../../ts-types/base-table';\nimport { Group } from '../../graphic/group';\nimport { computeColsWidth } from '../../layout/compute-col-width';\nimport { computeRowsHeight } from '../../layout/compute-row-height';\nimport { emptyGroup } from '../../utils/empty-group';\nimport { createColGroup } from '../column';\nimport { createComplexColumn } from '../column-helper';\nimport { createGroupForFirstScreen } from './create-group-for-first-screen';\nimport { dynamicSetX, updateColContent } from './update-position/dynamic-set-x';\nimport { dynamicSetY, updateRowContent } from './update-position/dynamic-set-y';\nimport { updateAutoRow } from './update-position/update-auto-row';\n\nexport class SceneProxy {\n table: BaseTableAPI;\n mode: 'column' | 'row' | 'pivot' = 'column';\n\n rowLimit = 1000;\n currentRow = 0; // 目前渐进生成的row number\n totalRow: number; // 渐进完成最后一行的row number\n yLimitTop: number; // y > yLimitTop动态更新,否则直接修改xy\n yLimitBottom: number; // y < yLimitBottom动态更新,否则直接修改xy\n rowStart = 0; // 当前维护的部分第一行的row number\n rowEnd = 0; // 当前维护的部分最后一行的row number\n referenceRow = 0; // 当前维护的部分中间一行的row number,认为referenceRow对应当前屏幕显示范围的第一行\n bodyTopRow: number; // table body部分的第一行row number\n bodyBottomRow: number; // table body部分的最后一行row number\n screenRowCount: number; // 预计屏幕范围内显示的row count\n firstScreenRowLimit: number; // 首屏同步加载部分最后一行的row number\n taskRowCount: number; // 一次任务生成/更新的row count\n rowUpdatePos: number; // 异步任务目前更新到的行的row number\n rowUpdateDirection: 'up' | 'down'; // 当前行更新的方向\n screenTopRow: number = 0; // 当前屏幕范围内显示的第一行的row number\n deltaY: number = 0;\n\n colLimit = 100;\n bodyLeftCol: number; // table body部分的第一列col number\n bodyRightCol: number; // table body部分的最后一列col number\n totalCol: number; // 渐进完成最后一列的col number\n colStart: number; // 当前维护的部分第一列的col number\n colEnd: number; // 当前维护的部分最后一列的col number\n taskColCount: number; // 一次任务生成/更新的col count\n xLimitLeft: number; // x > xLimitLeft动态更新,否则直接修改xy\n xLimitRight: number; // x < xLimitRight动态更新,否则直接修改xy\n screenColCount: number; // 预计屏幕范围内显示的col count\n firstScreenColLimit: number; // 首屏同步加载部分最后一列的col number\n colUpdatePos: number; // 异步任务目前更新到的列的col number\n currentCol: number; // 目前渐进生成的col number\n referenceCol: number; // 当前维护的部分中间一列的col number,认为referenceCol对应当前屏幕显示范围的第一列\n screenLeftCol: number = 0; // 当前屏幕范围内显示的第一列的col number\n colUpdateDirection: 'left' | 'right'; // 当前列更新方向\n deltaX: number = 0;\n\n cellCache: Map<number, Group> = new Map(); // 单元格位置快速查找缓存\n\n constructor(table: BaseTableAPI) {\n this.table = table;\n\n if (this.table.isPivotChart()) {\n this.rowLimit = 100;\n this.colLimit = 100;\n } else if (this.table.heightMode === 'autoHeight') {\n this.rowLimit = 100;\n } else if (this.table.widthMode === 'autoWidth') {\n this.colLimit = 100;\n }\n\n if (this.table.internalProps.transpose) {\n this.mode = 'row';\n } else if (this.table.isPivotTable()) {\n this.mode = 'pivot';\n }\n if (this.table.options.maintainedDataCount) {\n this.rowLimit = this.table.options.maintainedDataCount;\n }\n }\n\n setParamsForColumn() {\n this.bodyLeftCol = this.table.rowHeaderLevelCount;\n // this.bodyRightCol = this.table.colCount - 1;\n this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;\n\n // compute the column info about progress creation\n const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);\n this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1; // 目标渐进完成的col\n this.colStart = this.bodyLeftCol;\n const defaultColWidth = this.table.defaultColWidth;\n this.taskColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth) * 1;\n\n // 确定动态更新限制\n const totalBodyWidth = defaultColWidth * totalActualBodyColCount;\n const totalWidth = defaultColWidth * (this.bodyRightCol - this.bodyLeftCol + 1);\n this.xLimitLeft = totalBodyWidth / 2;\n this.xLimitRight = totalWidth - totalBodyWidth / 2;\n\n // 确定首屏高度范围\n const widthLimit = this.table.tableNoFrameWidth * 5;\n this.screenColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth);\n this.firstScreenColLimit = this.bodyLeftCol + Math.ceil(widthLimit / defaultColWidth);\n // this.firstScreenRowLimit = this.bodyBottomRow;\n\n this.colUpdatePos = this.bodyRightCol;\n }\n\n setParamsForRow() {\n this.bodyTopRow = this.table.columnHeaderLevelCount;\n this.bodyBottomRow = this.table.rowCount - 1 - this.table.bottomFrozenRowCount;\n // this.bodyLeftCol = 0;\n // this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;\n\n // 计算渐进加载数量\n const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1); // 渐进加载总row数量\n this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1; // 目标渐进完成的row\n this.rowStart = this.bodyTopRow;\n const defaultRowHeight = this.table.defaultRowHeight;\n this.taskRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight) * 1;\n\n // 确定动态更新限制\n const totalBodyHeight = defaultRowHeight * totalActualBodyRowCount;\n const totalHeight = defaultRowHeight * (this.bodyBottomRow - this.bodyTopRow + 1);\n this.yLimitTop = totalBodyHeight / 2;\n this.yLimitBottom = totalHeight - totalBodyHeight / 2;\n // this.bottomOffset = totalHeight - totalBodyHeight / 2;\n\n // 确定首屏高度范围\n const heightLimit = this.table.tableNoFrameHeight * 5;\n this.screenRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight);\n this.firstScreenRowLimit = this.bodyTopRow + Math.ceil(heightLimit / defaultRowHeight);\n // this.firstScreenRowLimit = this.bodyBottomRow;\n\n this.rowUpdatePos = this.bodyBottomRow;\n }\n\n async createGroupForFirstScreen(\n cornerHeaderGroup: Group,\n colHeaderGroup: Group,\n rowHeaderGroup: Group,\n rightFrozenGroup: Group,\n bottomFrozenGroup: Group,\n bodyGroup: Group,\n xOrigin: number,\n yOrigin: number\n ) {\n await createGroupForFirstScreen(\n cornerHeaderGroup,\n colHeaderGroup,\n rowHeaderGroup,\n rightFrozenGroup,\n bottomFrozenGroup,\n bodyGroup,\n xOrigin,\n yOrigin,\n this\n );\n }\n // async progress() {\n // if (this.rowUpdatePos < this.rowEnd) {\n // console.log('progress rowUpdatePos', this.rowUpdatePos);\n // // 先更新\n // await this.updateCellGroupsAsync();\n // await this.progress();\n // } else if (this.currentRow < this.totalRow) {\n // console.log('progress currentRow', this.currentRow);\n // // 先更新没有需要更新的节点,在生成新节点\n // await this.createRow();\n // await this.progress();\n // }\n // }\n async progress() {\n return new Promise<void>((resolve, reject) => {\n setTimeout(async () => {\n if (this.colUpdatePos < this.colEnd) {\n await this.updateColCellGroupsAsync();\n await this.progress();\n } else if (this.rowUpdatePos < this.rowEnd) {\n // console.log('progress rowUpdatePos', this.rowUpdatePos);\n // 先更新\n await this.updateRowCellGroupsAsync();\n await this.progress();\n } else if (this.currentCol < this.totalCol) {\n await this.createCol();\n await this.progress();\n } else if (this.currentRow < this.totalRow) {\n // console.log('progress currentRow', this.currentRow);\n // 先更新没有需要更新的节点,在生成新节点\n await this.createRow();\n await this.progress();\n }\n resolve();\n }, 0);\n });\n }\n\n async createRow() {\n if (!this.taskRowCount) {\n return;\n }\n console.log('createRow', this.currentRow, this.currentRow + this.taskRowCount);\n this.createRowCellGroup(this.taskRowCount);\n }\n\n async createCol() {\n if (!this.taskColCount) {\n return;\n }\n console.log('createCol', this.currentCol, this.currentCol + this.taskColCount);\n this.createColGroup(this.taskRowCount);\n }\n\n createRowCellGroup(onceCount: number) {\n const endRow = Math.min(this.totalRow, this.currentRow + onceCount);\n // compute rows height\n computeRowsHeight(this.table, this.currentRow + 1, endRow, false);\n\n if (this.table.rowHeaderLevelCount) {\n // create row header row cellGroup\n let maxHeight = 0;\n for (let col = 0; col < this.table.rowHeaderLevelCount; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellType = 'rowHeader';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellType\n );\n maxHeight = Math.max(maxHeight, height);\n this.table.scenegraph.rowHeaderGroup.setAttribute('height', maxHeight);\n }\n }\n\n if (this.table.rightFrozenColCount) {\n // create row header row cellGroup\n let maxHeight = 0;\n for (let col = this.table.colCount - this.table.rightFrozenColCount; col < this.table.colCount; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellType = 'rowHeader';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellType\n );\n maxHeight = Math.max(maxHeight, height);\n this.table.scenegraph.rightFrozenGroup.setAttribute('height', maxHeight);\n }\n }\n\n // create body row cellGroup\n let maxHeight = 0;\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellType = 'body';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellType\n );\n maxHeight = Math.max(maxHeight, height);\n }\n this.table.scenegraph.bodyGroup.setAttribute('height', maxHeight);\n\n this.currentRow = endRow;\n this.rowEnd = endRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = this.rowStart + Math.floor((endRow - this.rowStart) / 2);\n\n // update container group size and border\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n createColGroup(onceCount: number) {\n // compute rows height\n const endCol = Math.min(this.totalCol, this.currentCol + onceCount);\n computeColsWidth(this.table, this.currentCol + 1, endCol);\n\n // update last merge cell\n for (let row = 0; row < this.table.rowCount; row++) {\n const cellGroup = this.highPerformanceGetCell(this.currentCol, row);\n if (isNumber(cellGroup.mergeCol) && cellGroup.mergeCol > this.currentCol) {\n this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);\n }\n }\n\n // create column\n if (this.table.columnHeaderLevelCount) {\n // create colGroup\n const lastColumnGroup = (\n this.table.scenegraph.colHeaderGroup.lastChild instanceof Group\n ? this.table.scenegraph.colHeaderGroup.lastChild\n : this.table.scenegraph.colHeaderGroup.lastChild._prev\n ) as Group;\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create colHeaderGroup\n createColGroup(\n this.table.scenegraph.colHeaderGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n 0, // rowStart\n this.table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n this.table\n );\n }\n if (this.table.bottomFrozenRowCount) {\n // create colGroup\n const lastColumnGroup = (\n this.table.scenegraph.bottomFrozenGroup.lastChild instanceof Group\n ? this.table.scenegraph.bottomFrozenGroup.lastChild\n : this.table.scenegraph.bottomFrozenGroup.lastChild._prev\n ) as Group;\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create bottomFrozenGroup\n createColGroup(\n this.table.scenegraph.bottomFrozenGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n this.table.rowCount - this.table.bottomFrozenRowCount, // rowStart\n this.table.rowCount - 1, // rowEnd\n 'columnHeader', // isHeader\n this.table\n );\n }\n // create colGroup\n const lastColumnGroup = (\n this.table.scenegraph.bodyGroup.lastChild instanceof Group\n ? this.table.scenegraph.bodyGroup.lastChild\n : this.table.scenegraph.bodyGroup.lastChild._prev\n ) as Group;\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create bodyGroup\n createColGroup(\n this.table.scenegraph.bodyGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n this.rowStart, // rowStart\n this.rowEnd, // rowEnd\n 'body', // isHeader\n this.table\n );\n\n this.currentCol = endCol;\n this.colEnd = endCol;\n this.colUpdatePos = this.colEnd;\n this.referenceCol = this.colStart + Math.floor((endCol - this.colStart) / 2);\n console.log('async', this.referenceCol, this.colStart, this.colEnd);\n\n // update container group size and border\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n async setY(y: number) {\n if (y < this.yLimitTop && this.rowStart === this.bodyTopRow) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n } else if (y > this.yLimitBottom && this.rowEnd === this.bodyBottomRow) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n } else {\n // 执行动态更新节点\n this.dynamicSetY(y);\n }\n }\n\n async setX(x: number) {\n if (x < this.xLimitLeft && this.colStart === this.bodyLeftCol) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndColHeaderX(-x);\n } else if (x > this.xLimitRight && this.colEnd === this.bodyRightCol) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndColHeaderX(-x);\n } else {\n // 执行动态更新节点\n this.dynamicSetX(x);\n }\n }\n\n async dynamicSetY(y: number) {\n dynamicSetY(y, this);\n }\n async dynamicSetX(x: number) {\n dynamicSetX(x, this);\n }\n\n updateBody(y: number) {\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n }\n\n async updateRowCellGroupsAsync() {\n this.updateCellGroups(this.taskRowCount);\n }\n\n updateCellGroups(count: number) {\n const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);\n // console.log('updateCellGroups', this.rowUpdatePos, distRow);\n if (this.table.heightMode === 'autoHeight') {\n computeRowsHeight(this.table, this.rowUpdatePos, distRow, false);\n }\n\n updateRowContent(this.rowUpdatePos, distRow, this);\n\n if (this.table.heightMode === 'autoHeight') {\n updateAutoRow(\n this.bodyLeftCol, // colStart\n this.bodyRightCol, // colEnd\n this.rowUpdatePos, // rowStart\n distRow, // rowEnd\n this.table,\n this.rowUpdateDirection\n );\n }\n\n this.rowUpdatePos = distRow + 1;\n }\n\n async updateColCellGroupsAsync() {\n this.updateColGroups(this.taskRowCount);\n }\n\n updateColGroups(count: number) {\n const distCol = Math.min(this.bodyRightCol, this.colUpdatePos + count);\n // console.log('updateCellGroups', this.colUpdatePos, distCol);\n // for (let col = this.colUpdatePos; col <= distCol; col++) {\n // const colGroup = this.table.scenegraph.getColGroup(col);\n // if (colGroup) {\n // // colGroup.forEachChildren((cellGroup: Group) => {\n // // this.updateCellGroupContent(cellGroup);\n // // });\n // // for (let row = (colGroup.firstChild as Group).row; row <= (colGroup.lastChild as Group).row; row++) {\n // // const cellGroup = this.highPerformanceGetCell(colGroup.col, row);\n // // this.updateCellGroupContent(cellGroup);\n // // }\n // let cellGroup = colGroup.firstChild;\n // while (cellGroup) {\n // // this.updateCellGroupContent(cellGroup as Group);\n // // cellGroup = cellGroup._next;\n // const newCellGroup = this.updateCellGroupContent(cellGroup as Group);\n // cellGroup = newCellGroup._next;\n // }\n // colGroup.needUpdate = false;\n // }\n // }\n computeColsWidth(this.table, this.colUpdatePos, distCol);\n updateColContent(this.colUpdatePos, distCol, this);\n this.colUpdatePos = distCol + 1;\n }\n\n updateCellGroupPosition(cellGroup: Group, newRow: number, y: number) {\n // 更新位置&row\n cellGroup.row = newRow;\n cellGroup.setAttribute('y', y);\n (cellGroup as any).needUpdate = true;\n (cellGroup as any).needUpdateForAutoRowHeight = true;\n }\n\n updateCellGroupContent(cellGroup: Group) {\n if (!cellGroup.needUpdate) {\n return cellGroup;\n }\n\n const newCellGroup = this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);\n // 更新内容\n // const textMark = cellGroup.firstChild as WrapText;\n // const autoWrapText = Array.isArray(textMark.attribute.text);\n // const textStr: string = this.table.getCellValue(cellGroup.col, cellGroup.row);\n // let text;\n // if (autoWrapText) {\n // text = String(textStr).replace(/\\r?\\n/g, '\\n').replace(/\\r/g, '\\n').split('\\n');\n // } else {\n // text = textStr;\n // }\n\n // textMark.setAttribute('text', text);\n\n cellGroup.needUpdate = false;\n return newCellGroup || cellGroup;\n }\n\n async sortCell() {\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n for (let row = this.rowStart; row <= this.rowEnd; row++) {\n // const cellGroup = this.table.scenegraph.getCell(col, row);\n const cellGroup = this.highPerformanceGetCell(col, row);\n cellGroup.needUpdate = true;\n }\n }\n\n // 更新同步范围\n let syncTopRow;\n let syncBottomRow;\n if (this.table.heightMode === 'autoHeight') {\n syncTopRow = this.rowStart;\n syncBottomRow = this.rowEnd;\n } else {\n syncTopRow = Math.max(this.bodyTopRow, this.screenTopRow - this.screenRowCount * 2);\n syncBottomRow = Math.min(this.bodyBottomRow, this.screenTopRow + this.screenRowCount * 3);\n }\n console.log('sort更新同步范围', syncTopRow, syncBottomRow);\n\n computeRowsHeight(this.table, syncTopRow, syncBottomRow);\n\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n for (let row = syncTopRow; row <= syncBottomRow; row++) {\n // const cellGroup = this.table.scenegraph.getCell(col, row);\n const cellGroup = this.highPerformanceGetCell(col, row);\n this.updateCellGroupContent(cellGroup);\n }\n }\n console.log('updateAutoRow', this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? 'down' : 'up');\n if (this.table.heightMode === 'autoHeight') {\n updateAutoRow(\n this.bodyLeftCol, // colStart\n this.bodyRightCol, // colEnd\n syncTopRow, // rowStart\n syncBottomRow, // rowEnd\n this.table,\n this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? 'down' : 'up' // 跳转到底部时,从下向上对齐\n );\n }\n this.rowUpdatePos = this.rowStart;\n this.rowUpdateDirection = this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? 'down' : 'up';\n\n if (\n this.rowEnd === this.table.scenegraph.proxy.bodyBottomRow &&\n this.rowStart === this.table.scenegraph.proxy.bodyTopRow\n ) {\n // 全量更新,do nothing\n } else if (this.rowEnd === this.table.scenegraph.proxy.bodyBottomRow) {\n const totalHeight = this.table.getAllRowsHeight();\n const top = totalHeight - this.table.scenegraph.height;\n this.updateBody(top);\n } else if (this.rowStart === this.table.scenegraph.proxy.bodyTopRow) {\n this.updateBody(0);\n }\n\n if (this.table.heightMode !== 'autoHeight') {\n await this.progress();\n }\n }\n\n highPerformanceGetCell(\n col: number,\n row: number,\n // rowStart: number = this.rowStart,\n // rowEnd: number = this.rowEnd,\n getShadow?: boolean\n ) {\n // if (row < rowStart || row > rowEnd) {\n // return emptyGroup;\n // }\n // if (row < this.rowStart || row > this.rowEnd || col < this.colStart || col > this.colEnd) {\n // return emptyGroup;\n // }\n\n if (\n row >= this.table.columnHeaderLevelCount && // not column header\n row < this.table.rowCount - this.table.bottomFrozenRowCount && // not bottom frozen\n (row < this.rowStart || row > this.rowEnd) // not in proxy row range\n ) {\n return emptyGroup;\n }\n\n if (\n col >= this.table.rowHeaderLevelCount && // not row header\n col < this.table.colCount - this.table.rightFrozenColCount && // not right frozen\n (col < this.colStart || col > this.colEnd) // not in proxy col range\n ) {\n return emptyGroup;\n }\n\n if (this.cellCache.get(col)) {\n const cacheCellGoup = this.cellCache.get(col);\n if ((cacheCellGoup._next || cacheCellGoup._prev) && Math.abs(cacheCellGoup.row - row) < row) {\n // 由缓存单元格向前后查找要快于从头查找\n let cellGroup = getCellByCache(cacheCellGoup, row);\n if (!cellGroup || (!getShadow && cellGroup.role === 'shadow-cell')) {\n cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n }\n cellGroup.row && this.cellCache.set(col, cellGroup);\n return cellGroup;\n }\n const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n // cellGroup.row && this.cellCache.set(col, cellGroup);\n if (cellGroup.col === col && cellGroup.row) {\n this.cellCache.set(col, cellGroup);\n }\n return cellGroup;\n }\n const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n // cellGroup.row && this.cellCache.set(col, cellGroup);\n if (cellGroup.col === col && cellGroup.row) {\n this.cellCache.set(col, cellGroup);\n }\n return cellGroup;\n }\n}\n\nfunction getCellByCache(cacheCellGroup: Group, row: number): Group | null {\n if (!cacheCellGroup) {\n return null;\n }\n if (cacheCellGroup.row === row) {\n return cacheCellGroup;\n } else if (cacheCellGroup.row > row) {\n return getCellByCache(cacheCellGroup._prev as Group, row);\n }\n return getCellByCache(cacheCellGroup._next as Group, row);\n}\n"]}