@visactor/vtable 0.13.2-alpha.5 → 0.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/cjs/PivotChart.js +6 -6
  2. package/cjs/PivotChart.js.map +1 -1
  3. package/cjs/components/menu/dom/logic/MenuContainer.js +1 -1
  4. package/cjs/components/menu/dom/logic/MenuContainer.js.map +1 -1
  5. package/cjs/components/menu/dom/logic/MenuElement.js +3 -3
  6. package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -1
  7. package/cjs/core/BaseTable.d.ts +2 -2
  8. package/cjs/core/BaseTable.js +6 -1
  9. package/cjs/core/BaseTable.js.map +1 -1
  10. package/cjs/core/TABLE_EVENT_TYPE.d.ts +1 -1
  11. package/cjs/core/TABLE_EVENT_TYPE.js +1 -1
  12. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  13. package/cjs/event/event.js +8 -3
  14. package/cjs/event/event.js.map +1 -1
  15. package/cjs/event/listener/table-group.js +29 -5
  16. package/cjs/event/listener/table-group.js.map +1 -1
  17. package/cjs/index.d.ts +1 -1
  18. package/cjs/index.js +1 -1
  19. package/cjs/index.js.map +1 -1
  20. package/cjs/layout/pivot-header-layout.js +1 -0
  21. package/cjs/layout/pivot-header-layout.js.map +1 -1
  22. package/cjs/layout/simple-header-layout.js +1 -0
  23. package/cjs/layout/simple-header-layout.js.map +1 -1
  24. package/cjs/scenegraph/component/custom.d.ts +1 -0
  25. package/cjs/scenegraph/component/custom.js +14 -2
  26. package/cjs/scenegraph/component/custom.js.map +1 -1
  27. package/cjs/scenegraph/component/menu.js +1 -1
  28. package/cjs/scenegraph/component/menu.js.map +1 -1
  29. package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +2 -1
  30. package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
  31. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +15 -15
  32. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  33. package/cjs/scenegraph/group-creater/progress/proxy.d.ts +2 -0
  34. package/cjs/scenegraph/group-creater/progress/proxy.js +10 -6
  35. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  36. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-column.js +3 -3
  37. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-column.js.map +1 -1
  38. package/cjs/scenegraph/layout/compute-col-width.js +3 -2
  39. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  40. package/cjs/scenegraph/layout/compute-row-height.js +3 -2
  41. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  42. package/cjs/scenegraph/layout/frozen.js +1 -2
  43. package/cjs/scenegraph/layout/frozen.js.map +1 -1
  44. package/cjs/scenegraph/layout/move-cell.js +1 -1
  45. package/cjs/scenegraph/layout/move-cell.js.map +1 -1
  46. package/cjs/scenegraph/scenegraph.js +15 -13
  47. package/cjs/scenegraph/scenegraph.js.map +1 -1
  48. package/cjs/scenegraph/utils/update-container.d.ts +1 -1
  49. package/cjs/scenegraph/utils/update-container.js +1 -2
  50. package/cjs/scenegraph/utils/update-container.js.map +1 -1
  51. package/cjs/ts-types/events.d.ts +2 -2
  52. package/cjs/ts-types/events.js.map +1 -1
  53. package/dist/vtable.js +259 -135
  54. package/dist/vtable.min.js +2 -2
  55. package/es/PivotChart.js +6 -6
  56. package/es/PivotChart.js.map +1 -1
  57. package/es/components/menu/dom/logic/MenuContainer.js +1 -1
  58. package/es/components/menu/dom/logic/MenuContainer.js.map +1 -1
  59. package/es/components/menu/dom/logic/MenuElement.js +3 -3
  60. package/es/components/menu/dom/logic/MenuElement.js.map +1 -1
  61. package/es/core/BaseTable.d.ts +2 -2
  62. package/es/core/BaseTable.js +6 -1
  63. package/es/core/BaseTable.js.map +1 -1
  64. package/es/core/TABLE_EVENT_TYPE.d.ts +1 -1
  65. package/es/core/TABLE_EVENT_TYPE.js +1 -1
  66. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  67. package/es/event/event.js +8 -3
  68. package/es/event/event.js.map +1 -1
  69. package/es/event/listener/table-group.js +29 -5
  70. package/es/event/listener/table-group.js.map +1 -1
  71. package/es/index.d.ts +1 -1
  72. package/es/index.js +1 -1
  73. package/es/index.js.map +1 -1
  74. package/es/layout/pivot-header-layout.js +1 -0
  75. package/es/layout/pivot-header-layout.js.map +1 -1
  76. package/es/layout/simple-header-layout.js +1 -0
  77. package/es/layout/simple-header-layout.js.map +1 -1
  78. package/es/scenegraph/component/custom.d.ts +1 -0
  79. package/es/scenegraph/component/custom.js +12 -0
  80. package/es/scenegraph/component/custom.js.map +1 -1
  81. package/es/scenegraph/component/menu.js +1 -1
  82. package/es/scenegraph/component/menu.js.map +1 -1
  83. package/es/scenegraph/graphic/contributions/chart-render-helper.js +2 -1
  84. package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
  85. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +14 -13
  86. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  87. package/es/scenegraph/group-creater/progress/proxy.d.ts +2 -0
  88. package/es/scenegraph/group-creater/progress/proxy.js +10 -6
  89. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  90. package/es/scenegraph/group-creater/progress/update-position/update-auto-column.js +3 -3
  91. package/es/scenegraph/group-creater/progress/update-position/update-auto-column.js.map +1 -1
  92. package/es/scenegraph/layout/compute-col-width.js +4 -1
  93. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  94. package/es/scenegraph/layout/compute-row-height.js +4 -1
  95. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  96. package/es/scenegraph/layout/frozen.js +1 -2
  97. package/es/scenegraph/layout/frozen.js.map +1 -1
  98. package/es/scenegraph/layout/move-cell.js +1 -1
  99. package/es/scenegraph/layout/move-cell.js.map +1 -1
  100. package/es/scenegraph/scenegraph.js +10 -10
  101. package/es/scenegraph/scenegraph.js.map +1 -1
  102. package/es/scenegraph/utils/update-container.d.ts +1 -1
  103. package/es/scenegraph/utils/update-container.js +1 -2
  104. package/es/scenegraph/utils/update-container.js.map +1 -1
  105. package/es/ts-types/events.d.ts +2 -2
  106. package/es/ts-types/events.js.map +1 -1
  107. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"sources":["scenegraph/graphic/contributions/chart-render-helper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACnD,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,CAAC;AAC5C,MAAM,CAAC,MAAM,eAAe,GAAa,EAAE,CAAC;AAC5C,MAAM,CAAC,MAAM,oBAAoB,GAAY,EAAE,CAAC;AAKhD,IAAI,qBAAqB,GAAG,CAAC,CAAC;AAC9B,IAAI,oBAAoB,GAAG,KAAK,CAAC;AACjC,MAAM,UAAU,wBAAwB,CAAC,KAAa;IACpD,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE;QAClB,qBAAqB,GAAG,KAAK,CAAC;KAC/B;AACH,CAAC;AACD,MAAM,UAAU,oBAAoB;IAClC,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AACD,MAAM,UAAU,WAAW,CAAC,KAAY;;IACtC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC;IACrD,MAAM,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IAChC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC;IACnC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAS,EAAE,KAAa,EAAE,EAAE;;QACxC,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;YAC1B,MAAM,SAAS,GAAG,aAAa,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YAC1D,SAAS,CAAC,OAAO,GAAG;gBAClB,GAAG,EAAE,MAA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GAAG,oBAAoB,CAAC;YAC1C,MAAM,IAAI,GAAG,MAAM,GAAG,oBAAoB,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,GAAG,oBAAoB,CAAC;YACnG,MAAM,IAAI,GAAG,MAAM,GAAG,oBAAoB,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,GAAG,oBAAoB,CAAC;YACrG,MAAM,KAAK,GAAG,IAAI,GAAG,MAAM,CAAC;YAC5B,MAAM,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC;YAC7B,MAAM,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;YAC5B,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;YAE5C,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;YAC7C,WAAW,CAAC,IAAI,CAAC;gBACf,MAAM;gBACN,CAAC,EAAE,MAAM;gBACT,CAAC,EAAE,MAAM;gBACT,KAAK;gBACL,MAAM;aACP,CAAC,CAAC;SACJ;KACF;IAED,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC;AAClC,CAAC","file":"chart-render-helper.js","sourcesContent":["import type { IStage } from '@visactor/vrender';\nimport type { Chart } from '../chart';\nimport { Bounds, isValid } from '@visactor/vutils';\nexport const cancelRenderChartQueue = false;\nexport const chartRenderKeys: string[] = [];\nexport const chartRenderQueueList: Chart[] = [];\ninterface chartRenderQueueItem {\n chart: Chart;\n}\n//每次消费的图表数量\nlet batchRenderChartCount = 5;\nlet isHandlingChartQueue = false;\nexport function setBatchRenderChartCount(count: number) {\n if (isValid(count)) {\n batchRenderChartCount = count;\n }\n}\nexport function IsHandlingChartQueue() {\n return isHandlingChartQueue;\n}\nexport function renderChart(chart: Chart) {\n const { axes, dataId, data, spec } = chart.attribute;\n const { chartInstance } = chart;\n const viewBox = chart.getViewBox();\n axes.forEach((axis: any, index: number) => {\n if (axis.type === 'linear') {\n const chartAxis = chartInstance._chart._components[index];\n chartAxis._domain = {\n min: axis.range?.min ?? 0,\n max: axis.range?.max ?? 0\n };\n } else if (axis.type === 'band') {\n const chartAxis = chartInstance._chart._components[index];\n chartAxis._spec.domain = axis.domain.slice(0);\n chartAxis.updateScaleDomain();\n }\n });\n\n chartInstance.updateViewBox(\n {\n x1: viewBox.x1 - (chart.getRootNode() as any).table.scrollLeft,\n x2: viewBox.x2 - (chart.getRootNode() as any).table.scrollLeft,\n y1: viewBox.y1 - (chart.getRootNode() as any).table.scrollTop,\n y2: viewBox.y2 - (chart.getRootNode() as any).table.scrollTop\n },\n false,\n false\n );\n if (typeof dataId === 'string') {\n chartInstance.updateDataSync(dataId, data ?? []);\n } else {\n const dataBatch = [];\n for (const dataIdStr in dataId) {\n const dataIdAndField = dataId[dataIdStr];\n const series = spec.series.find((item: any) => item?.data?.id === dataIdStr);\n dataBatch.push({\n id: dataIdStr,\n values: dataIdAndField\n ? data?.filter((item: any) => {\n return item.hasOwnProperty(dataIdAndField);\n }) ?? []\n : data ?? [],\n fields: series?.data?.fields\n });\n // 判断是否有updateFullDataSync 木有的话 还是循环调用updateDataSync\n if (!chartInstance.updateFullDataSync) {\n chartInstance.updateDataSync(\n dataIdStr,\n dataIdAndField\n ? data?.filter((item: any) => {\n return item.hasOwnProperty(dataIdAndField);\n }) ?? []\n : data ?? []\n );\n }\n }\n chartInstance.updateFullDataSync?.(dataBatch);\n }\n const sg = chartInstance.getStage();\n cacheStageCanvas(sg, chart);\n // chart.cacheCanvas = sg.toCanvas();\n\n // debugger;\n // chart.cacheCanvas[] = sg.toCanvas(fullImage, viewBox);\n // chart.cacheCanvas = sg.toCanvas(false, {\n // x1: 0,\n // y1: 0,\n // x2: 500,\n // y2: 300,\n // width: () => 500,\n // height: () => 300\n // });\n // 截图空白问题 因为开启了动画 首屏截图是无数据的TODO\n}\n\nexport function startRenderChartQueue(table: any) {\n isHandlingChartQueue = true;\n\n // 检查是否还有未渲染的图表\n if (chartRenderQueueList.length > 0) {\n // 使用 requestAnimationFrame 或 setTimeout 来调度下一批图表的渲染\n // requestAnimationFrame(() => renderChartQueue(table));\n requestAnimationFrame(() => {\n // 从集合中获取要渲染的图表上下文\n const chartsToRender = chartRenderQueueList.splice(0, batchRenderChartCount);\n chartRenderKeys.splice(0, batchRenderChartCount);\n // 渲染图表\n chartsToRender.forEach(chart => {\n // 在正确的位置渲染图表\n renderChart(chart);\n chart.addUpdateBoundTag();\n });\n table.render();\n startRenderChartQueue(table);\n });\n // setTimeout(() => {\n // // debugger;\n // renderChartQueue(table);\n // }, 0);\n } else {\n isHandlingChartQueue = false;\n }\n}\n\nconst cacheCanvasSizeLimit = 2000;\nfunction cacheStageCanvas(stage: IStage, chart: Chart) {\n const { viewWidth, viewHeight } = stage;\n if (viewWidth < cacheCanvasSizeLimit && viewHeight < cacheCanvasSizeLimit) {\n chart.cacheCanvas = stage.toCanvas();\n return;\n }\n\n const rows = Math.ceil(viewHeight / cacheCanvasSizeLimit);\n const columns = Math.ceil(viewWidth / cacheCanvasSizeLimit);\n\n const cacheCanvas = [];\n for (let row = 0; row < rows; row++) {\n for (let col = 0; col < columns; col++) {\n const startX = col * cacheCanvasSizeLimit;\n const startY = row * cacheCanvasSizeLimit;\n const endX = startX + cacheCanvasSizeLimit > viewWidth ? viewWidth : startX + cacheCanvasSizeLimit;\n const endY = startY + cacheCanvasSizeLimit > viewHeight ? viewHeight : startY + cacheCanvasSizeLimit;\n const width = endX - startX;\n const height = endY - startY;\n const bounds = new Bounds();\n bounds.setValue(startX, startY, endX, endY);\n\n const canvas = stage.toCanvas(false, bounds);\n cacheCanvas.push({\n canvas,\n x: startX,\n y: startY,\n width,\n height\n });\n }\n }\n\n chart.cacheCanvas = cacheCanvas;\n}\n"]}
1
+ {"version":3,"sources":["scenegraph/graphic/contributions/chart-render-helper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,E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CAAC;YAC1C,MAAM,IAAI,GAAG,MAAM,GAAG,oBAAoB,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,GAAG,oBAAoB,CAAC;YACnG,MAAM,IAAI,GAAG,MAAM,GAAG,oBAAoB,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,GAAG,oBAAoB,CAAC;YACrG,MAAM,KAAK,GAAG,IAAI,GAAG,MAAM,CAAC;YAC5B,MAAM,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC;YAC7B,MAAM,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;YAC5B,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;YAE5C,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;YAC7C,WAAW,CAAC,IAAI,CAAC;gBACf,MAAM;gBACN,CAAC,EAAE,MAAM;gBACT,CAAC,EAAE,MAAM;gBACT,KAAK;gBACL,MAAM;aACP,CAAC,CAAC;SACJ;KACF;IAED,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC;AAClC,CAAC","file":"chart-render-helper.js","sourcesContent":["import type { IStage } from '@visactor/vrender';\nimport type { Chart } from '../chart';\nimport { Bounds, isValid } from '@visactor/vutils';\nexport const cancelRenderChartQueue = false;\nexport const chartRenderKeys: string[] = [];\nexport const chartRenderQueueList: Chart[] = [];\ninterface chartRenderQueueItem {\n chart: Chart;\n}\n//每次消费的图表数量\nlet batchRenderChartCount = 5;\nlet isHandlingChartQueue = false;\nexport function setBatchRenderChartCount(count: number) {\n if (isValid(count)) {\n batchRenderChartCount = count;\n }\n}\nexport function IsHandlingChartQueue() {\n return isHandlingChartQueue;\n}\nexport function renderChart(chart: Chart) {\n const { axes, dataId, data, spec } = chart.attribute;\n const { chartInstance } = chart;\n const viewBox = chart.getViewBox();\n\n // avoid canvas size 0\n if (viewBox.x2 <= viewBox.x1) {\n viewBox.x2 = viewBox.x1 + 1;\n }\n if (viewBox.y2 <= viewBox.y1) {\n viewBox.y2 = viewBox.y1 + 1;\n }\n\n axes.forEach((axis: any, index: number) => {\n if (axis.type === 'linear') {\n const chartAxis = chartInstance._chart._components[index];\n chartAxis._domain = {\n min: axis.range?.min ?? 0,\n max: axis.range?.max ?? 0\n };\n } else if (axis.type === 'band') {\n const chartAxis = chartInstance._chart._components[index];\n chartAxis._spec.domain = axis.domain.slice(0);\n chartAxis.updateScaleDomain();\n }\n });\n\n chartInstance.updateViewBox(\n {\n x1: viewBox.x1 - (chart.getRootNode() as any).table.scrollLeft,\n x2: viewBox.x2 - (chart.getRootNode() as any).table.scrollLeft,\n y1: viewBox.y1 - (chart.getRootNode() as any).table.scrollTop,\n y2: viewBox.y2 - (chart.getRootNode() as any).table.scrollTop\n },\n false,\n false\n );\n if (typeof dataId === 'string') {\n chartInstance.updateDataSync(dataId, data ?? []);\n } else {\n const dataBatch = [];\n for (const dataIdStr in dataId) {\n const dataIdAndField = dataId[dataIdStr];\n const series = spec.series.find((item: any) => item?.data?.id === dataIdStr);\n dataBatch.push({\n id: dataIdStr,\n values: dataIdAndField\n ? data?.filter((item: any) => {\n return item.hasOwnProperty(dataIdAndField);\n }) ?? []\n : data ?? [],\n fields: series?.data?.fields\n });\n // 判断是否有updateFullDataSync 木有的话 还是循环调用updateDataSync\n if (!chartInstance.updateFullDataSync) {\n chartInstance.updateDataSync(\n dataIdStr,\n dataIdAndField\n ? data?.filter((item: any) => {\n return item.hasOwnProperty(dataIdAndField);\n }) ?? []\n : data ?? []\n );\n }\n }\n chartInstance.updateFullDataSync?.(dataBatch);\n }\n const sg = chartInstance.getStage();\n cacheStageCanvas(sg, chart);\n // chart.cacheCanvas = sg.toCanvas();\n\n // debugger;\n // chart.cacheCanvas[] = sg.toCanvas(fullImage, viewBox);\n // chart.cacheCanvas = sg.toCanvas(false, {\n // x1: 0,\n // y1: 0,\n // x2: 500,\n // y2: 300,\n // width: () => 500,\n // height: () => 300\n // });\n // 截图空白问题 因为开启了动画 首屏截图是无数据的TODO\n}\n\nexport function startRenderChartQueue(table: any) {\n isHandlingChartQueue = true;\n\n // 检查是否还有未渲染的图表\n if (chartRenderQueueList.length > 0) {\n // 使用 requestAnimationFrame 或 setTimeout 来调度下一批图表的渲染\n // requestAnimationFrame(() => renderChartQueue(table));\n requestAnimationFrame(() => {\n // 从集合中获取要渲染的图表上下文\n const chartsToRender = chartRenderQueueList.splice(0, batchRenderChartCount);\n chartRenderKeys.splice(0, batchRenderChartCount);\n // 渲染图表\n chartsToRender.forEach(chart => {\n // 在正确的位置渲染图表\n renderChart(chart);\n chart.addUpdateBoundTag();\n });\n table.render();\n startRenderChartQueue(table);\n });\n // setTimeout(() => {\n // // debugger;\n // renderChartQueue(table);\n // }, 0);\n } else {\n isHandlingChartQueue = false;\n }\n}\n\nconst cacheCanvasSizeLimit = 2000;\nfunction cacheStageCanvas(stage: IStage, chart: Chart) {\n const { viewWidth, viewHeight } = stage;\n if (viewWidth < cacheCanvasSizeLimit && viewHeight < cacheCanvasSizeLimit) {\n chart.cacheCanvas = stage.toCanvas();\n return;\n }\n\n const rows = Math.ceil(viewHeight / cacheCanvasSizeLimit);\n const columns = Math.ceil(viewWidth / cacheCanvasSizeLimit);\n\n const cacheCanvas = [];\n for (let row = 0; row < rows; row++) {\n for (let col = 0; col < columns; col++) {\n const startX = col * cacheCanvasSizeLimit;\n const startY = row * cacheCanvasSizeLimit;\n const endX = startX + cacheCanvasSizeLimit > viewWidth ? viewWidth : startX + cacheCanvasSizeLimit;\n const endY = startY + cacheCanvasSizeLimit > viewHeight ? viewHeight : startY + cacheCanvasSizeLimit;\n const width = endX - startX;\n const height = endY - startY;\n const bounds = new Bounds();\n bounds.setValue(startX, startY, endX, endY);\n\n const canvas = stage.toCanvas(false, bounds);\n cacheCanvas.push({\n canvas,\n x: startX,\n y: startY,\n width,\n height\n });\n }\n }\n\n chart.cacheCanvas = cacheCanvas;\n}\n"]}
@@ -34,10 +34,11 @@ export function createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, row
34
34
  var _a, _b, _c, _d, _e, _f;
35
35
  return __awaiter(this, void 0, void 0, (function*() {
36
36
  const {table: table} = proxy, {leftBottomCornerGroup: leftBottomCornerGroup, rightTopCornerGroup: rightTopCornerGroup, rightBottomCornerGroup: rightBottomCornerGroup} = table.scenegraph;
37
- proxy.setParamsForRow(), proxy.setParamsForColumn(), computeColsWidth(table, 0, Math.min(proxy.firstScreenColLimit, table.colCount - 1)),
38
- computeRowsHeight(table, 0, Math.min(proxy.firstScreenRowLimit, table.rowCount - 1)),
39
- table.rightFrozenColCount > 0 && table.colCount - 1 > proxy.firstScreenColLimit && computeColsWidth(table, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1),
40
- table.bottomFrozenRowCount > 0 && table.rowCount - 1 > proxy.firstScreenRowLimit && computeColsWidth(table, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1),
37
+ let distCol, distRow;
38
+ proxy.setParamsForRow(), proxy.setParamsForColumn(), distCol = "adaptive" === table.widthMode ? table.colCount - 1 : Math.min(proxy.firstScreenColLimit, table.colCount - 1),
39
+ distRow = "adaptive" === table.heightMode ? table.rowCount - 1 : Math.min(proxy.firstScreenRowLimit, table.rowCount - 1),
40
+ computeColsWidth(table, 0, distCol), computeRowsHeight(table, 0, distRow), distCol < table.colCount - 1 - table.rightFrozenColCount && computeColsWidth(table, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1),
41
+ distRow < table.rowCount - 1 - table.bottomFrozenRowCount && computeRowsHeight(table, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1),
41
42
  table.scenegraph.colHeaderGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rowHeaderGroup.setAttribute("y", table.getFrozenRowsHeight()),
42
43
  table.scenegraph.bottomFrozenGroup.setAttribute("x", table.getFrozenColsWidth()),
43
44
  table.scenegraph.rightFrozenGroup.setAttribute("y", table.getFrozenRowsHeight()),
@@ -45,21 +46,21 @@ export function createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, row
45
46
  x: table.getFrozenColsWidth(),
46
47
  y: table.getFrozenRowsHeight()
47
48
  }), createColGroup(cornerHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, 0, table.columnHeaderLevelCount - 1, table.isListTable() ? "columnHeader" : "cornerHeader", table),
48
- createColGroup(colHeaderGroup, xOrigin, yOrigin, table.frozenColCount, Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), 0, table.columnHeaderLevelCount - 1, "columnHeader", table),
49
- createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, table.columnHeaderLevelCount, Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), table.isListTable() && !table.internalProps.transpose ? "body" : "rowHeader", table),
49
+ createColGroup(colHeaderGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, 0, table.columnHeaderLevelCount - 1, "columnHeader", table),
50
+ createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, table.columnHeaderLevelCount, distRow - table.bottomFrozenRowCount, table.isListTable() && !table.internalProps.transpose ? "body" : "rowHeader", table),
50
51
  table.bottomFrozenRowCount > 0 && (table.isPivotChart() || createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isListTable() ? "body" : "rowHeader", table),
51
- createColGroup(bottomFrozenGroup, xOrigin, yOrigin, table.frozenColCount, Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isPivotChart() ? "rowHeader" : "body", table)),
52
+ createColGroup(bottomFrozenGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isPivotChart() ? "rowHeader" : "body", table)),
52
53
  table.rightFrozenColCount > 0 && (table.isPivotChart() || createColGroup(rightTopCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, 0, table.columnHeaderLevelCount - 1, "columnHeader", table),
53
- createColGroup(rightFrozenGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.columnHeaderLevelCount, Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), table.isPivotChart() ? "rowHeader" : "body", table)),
54
+ createColGroup(rightFrozenGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.columnHeaderLevelCount, distRow - table.bottomFrozenRowCount, table.isPivotChart() ? "rowHeader" : "body", table)),
54
55
  table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0 && !table.isPivotChart() && createColGroup(rightBottomCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table),
55
- createColGroup(bodyGroup, xOrigin, yOrigin, table.frozenColCount, Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), table.columnHeaderLevelCount, Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), "body", table),
56
+ createColGroup(bodyGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.columnHeaderLevelCount, distRow - table.bottomFrozenRowCount, "body", table),
56
57
  bodyGroup.firstChild || colHeaderGroup.firstChild ? (proxy.currentRow = null !== (_b = null === (_a = bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.rowNumber) && void 0 !== _b ? _b : proxy.totalRow,
57
- proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2),
58
+ proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2),
58
59
  proxy.currentCol = null !== (_f = null !== (_d = null === (_c = bodyGroup.lastChild) || void 0 === _c ? void 0 : _c.col) && void 0 !== _d ? _d : null === (_e = colHeaderGroup.lastChild) || void 0 === _e ? void 0 : _e.col) && void 0 !== _f ? _f : proxy.totalCol,
59
- proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2),
60
+ proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2),
60
61
  yield proxy.progress()) : (proxy.currentRow = proxy.totalRow, proxy.rowEnd = proxy.currentRow,
61
- proxy.rowUpdatePos = proxy.rowEnd, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2),
62
- proxy.currentCol = proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd,
62
+ proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2),
63
+ proxy.currentCol = proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1,
63
64
  proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2));
64
65
  }));
65
66
  }
@@ -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,EA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,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;YAEtF,KAAK,CAAC,UAAU;gBACd,MAAA,MAAA,MAAC,SAAS,CAAC,SAAmB,0CAAE,GAAG,mCAAI,MAAC,cAAc,CAAC,SAAmB,0CAAE,GAAG,mCAAI,KAAK,CAAC,QAAQ,CAAC;YACpG,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 { table } = proxy;\n const { leftBottomCornerGroup, rightTopCornerGroup, rightBottomCornerGroup } = table.scenegraph;\n\n // compute parameters\n proxy.setParamsForRow();\n proxy.setParamsForColumn();\n\n // compute colums width in first screen\n computeColsWidth(table, 0, Math.min(proxy.firstScreenColLimit, table.colCount - 1));\n\n // compute rows height in first screen\n computeRowsHeight(table, 0, Math.min(proxy.firstScreenRowLimit, table.rowCount - 1));\n\n if (table.rightFrozenColCount > 0 && table.colCount - 1 > proxy.firstScreenColLimit) {\n // compute right frozen row height\n computeColsWidth(table, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1);\n }\n if (table.bottomFrozenRowCount > 0 && table.rowCount - 1 > proxy.firstScreenRowLimit) {\n // compute bottom frozen row height\n computeColsWidth(table, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1);\n }\n\n // update colHeaderGroup rowHeaderGroup bodyGroup position\n table.scenegraph.colHeaderGroup.setAttribute('x', table.getFrozenColsWidth());\n table.scenegraph.rowHeaderGroup.setAttribute('y', table.getFrozenRowsHeight());\n table.scenegraph.bottomFrozenGroup.setAttribute('x', table.getFrozenColsWidth());\n table.scenegraph.rightFrozenGroup.setAttribute('y', table.getFrozenRowsHeight());\n table.scenegraph.bodyGroup.setAttributes({\n x: table.getFrozenColsWidth(),\n y: table.getFrozenRowsHeight()\n });\n\n // create cornerHeaderGroup\n createColGroup(\n cornerHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.frozenColCount - 1, // colEnd\n 0, // rowStart\n table.columnHeaderLevelCount - 1, // rowEnd\n table.isListTable() ? 'columnHeader' : 'cornerHeader', // CellType\n table\n );\n\n // create colHeaderGroup\n createColGroup(\n colHeaderGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n 0, // rowStart\n table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n table\n );\n\n // create rowHeaderGroup\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.frozenColCount - 1, // colEnd\n table.columnHeaderLevelCount, // rowStart\n Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n table.isListTable() && !table.internalProps.transpose ? 'body' : 'rowHeader', // isHeader\n table\n );\n\n if (table.bottomFrozenRowCount > 0) {\n if (!table.isPivotChart()) {\n // create left bottom frozen\n createColGroup(\n leftBottomCornerGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.frozenColCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n table.isListTable() ? 'body' : 'rowHeader', // isHeader\n table\n );\n }\n // create bottomFrozenGroup\n createColGroup(\n bottomFrozenGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n table.isPivotChart() ? 'rowHeader' : 'body', // isHeader\n table\n );\n }\n\n if (table.rightFrozenColCount > 0) {\n if (!table.isPivotChart()) {\n // create right top frozen Group\n createColGroup(\n rightTopCornerGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n 0, // rowStart\n table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n table\n );\n }\n // create rightFrozenGroup\n createColGroup(\n rightFrozenGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n table.columnHeaderLevelCount, // rowStart\n Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n table.isPivotChart() ? 'rowHeader' : 'body', // isHeader\n table\n );\n }\n\n if (table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0 && !table.isPivotChart()) {\n // create right bottom frozen Group\n createColGroup(\n rightBottomCornerGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n 'body', // isHeader\n table\n );\n }\n\n // create bodyGroup\n createColGroup(\n bodyGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n table.columnHeaderLevelCount, // rowStart\n Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n 'body', // isHeader\n table\n );\n\n // update progress information\n if (!bodyGroup.firstChild && !colHeaderGroup.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 =\n (bodyGroup.lastChild as Group)?.col ?? (colHeaderGroup.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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AAK,CAAC,UAAU,CAAC;YAChC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;YACtC,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 { table } = proxy;\n const { leftBottomCornerGroup, rightTopCornerGroup, rightBottomCornerGroup } = table.scenegraph;\n\n // compute parameters\n proxy.setParamsForRow();\n proxy.setParamsForColumn();\n\n let distCol;\n let distRow;\n if (table.widthMode === 'adaptive') {\n distCol = table.colCount - 1;\n } else {\n distCol = Math.min(proxy.firstScreenColLimit, table.colCount - 1);\n }\n if (table.heightMode === 'adaptive') {\n distRow = table.rowCount - 1;\n } else {\n distRow = Math.min(proxy.firstScreenRowLimit, table.rowCount - 1);\n }\n\n // compute colums width in first screen\n computeColsWidth(table, 0, distCol);\n\n // compute rows height in first screen\n computeRowsHeight(table, 0, distRow);\n\n if (distCol < table.colCount - 1 - table.rightFrozenColCount) {\n // compute right frozen row height\n computeColsWidth(table, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1);\n }\n if (distRow < table.rowCount - 1 - table.bottomFrozenRowCount) {\n // compute bottom frozen row height\n computeRowsHeight(table, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1);\n }\n\n // update colHeaderGroup rowHeaderGroup bodyGroup position\n table.scenegraph.colHeaderGroup.setAttribute('x', table.getFrozenColsWidth());\n table.scenegraph.rowHeaderGroup.setAttribute('y', table.getFrozenRowsHeight());\n table.scenegraph.bottomFrozenGroup.setAttribute('x', table.getFrozenColsWidth());\n table.scenegraph.rightFrozenGroup.setAttribute('y', table.getFrozenRowsHeight());\n table.scenegraph.bodyGroup.setAttributes({\n x: table.getFrozenColsWidth(),\n y: table.getFrozenRowsHeight()\n });\n\n // create cornerHeaderGroup\n createColGroup(\n cornerHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.frozenColCount - 1, // colEnd\n 0, // rowStart\n table.columnHeaderLevelCount - 1, // rowEnd\n table.isListTable() ? 'columnHeader' : 'cornerHeader', // CellType\n table\n );\n\n // create colHeaderGroup\n createColGroup(\n colHeaderGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n // Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n distCol - table.rightFrozenColCount,\n 0, // rowStart\n table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n table\n );\n\n // create rowHeaderGroup\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.frozenColCount - 1, // colEnd\n table.columnHeaderLevelCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n table.isListTable() && !table.internalProps.transpose ? 'body' : 'rowHeader', // isHeader\n table\n );\n\n if (table.bottomFrozenRowCount > 0) {\n if (!table.isPivotChart()) {\n // create left bottom frozen\n createColGroup(\n leftBottomCornerGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.frozenColCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n table.isListTable() ? 'body' : 'rowHeader', // isHeader\n table\n );\n }\n // create bottomFrozenGroup\n createColGroup(\n bottomFrozenGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n // Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n distCol - table.rightFrozenColCount,\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n table.isPivotChart() ? 'rowHeader' : 'body', // isHeader\n table\n );\n }\n\n if (table.rightFrozenColCount > 0) {\n if (!table.isPivotChart()) {\n // create right top frozen Group\n createColGroup(\n rightTopCornerGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n 0, // rowStart\n table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n table\n );\n }\n // create rightFrozenGroup\n createColGroup(\n rightFrozenGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n table.columnHeaderLevelCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n table.isPivotChart() ? 'rowHeader' : 'body', // isHeader\n table\n );\n }\n\n if (table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0 && !table.isPivotChart()) {\n // create right bottom frozen Group\n createColGroup(\n rightBottomCornerGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n 'body', // isHeader\n table\n );\n }\n\n // create bodyGroup\n createColGroup(\n bodyGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n // Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n distCol - table.rightFrozenColCount,\n table.columnHeaderLevelCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n 'body', // isHeader\n table\n );\n\n // update progress information\n if (!bodyGroup.firstChild && !colHeaderGroup.firstChild) {\n // 无数据\n proxy.currentRow = proxy.totalRow;\n proxy.rowEnd = proxy.currentRow;\n proxy.rowUpdatePos = proxy.rowEnd + 1;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n\n proxy.currentCol = proxy.totalCol;\n proxy.colEnd = proxy.currentCol;\n proxy.colUpdatePos = proxy.colEnd + 1;\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n } else {\n proxy.currentRow = (bodyGroup.firstChild as Group)?.rowNumber ?? proxy.totalRow;\n proxy.rowEnd = proxy.currentRow;\n proxy.rowUpdatePos = proxy.rowEnd + 1;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n\n proxy.currentCol =\n (bodyGroup.lastChild as Group)?.col ?? (colHeaderGroup.lastChild as Group)?.col ?? proxy.totalCol;\n proxy.colEnd = proxy.currentCol;\n proxy.colUpdatePos = proxy.colEnd + 1;\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n\n // 开始异步任务\n await proxy.progress();\n }\n}\n"]}
@@ -21,6 +21,7 @@ export declare class SceneProxy {
21
21
  rowUpdatePos: number;
22
22
  rowUpdateDirection: 'up' | 'down';
23
23
  screenTopRow: number;
24
+ totalActualBodyRowCount: number;
24
25
  deltaY: number;
25
26
  colLimit: number;
26
27
  bodyRightCol: number;
@@ -37,6 +38,7 @@ export declare class SceneProxy {
37
38
  referenceCol: number;
38
39
  screenLeftCol: number;
39
40
  colUpdateDirection: 'left' | 'right';
41
+ totalActualBodyColCount: number;
40
42
  deltaX: number;
41
43
  cellCache: Map<number, Group>;
42
44
  constructor(table: BaseTableAPI);
@@ -65,7 +65,8 @@ export class SceneProxy {
65
65
  setParamsForColumn() {
66
66
  this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;
67
67
  const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);
68
- this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1, this.colStart = this.bodyLeftCol;
68
+ this.totalActualBodyColCount = totalActualBodyColCount, this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1,
69
+ this.colStart = this.bodyLeftCol;
69
70
  const defaultColWidth = this.table.defaultColWidth;
70
71
  this.taskColCount = 1 * Math.ceil(this.table.tableNoFrameWidth / defaultColWidth);
71
72
  const totalBodyWidth = defaultColWidth * totalActualBodyColCount, totalWidth = defaultColWidth * (this.bodyRightCol - this.bodyLeftCol + 1);
@@ -78,7 +79,8 @@ export class SceneProxy {
78
79
  setParamsForRow() {
79
80
  this.bodyTopRow = this.table.columnHeaderLevelCount, this.bodyBottomRow = this.table.rowCount - 1 - this.table.bottomFrozenRowCount;
80
81
  const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1);
81
- this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1, this.rowStart = this.bodyTopRow;
82
+ this.totalActualBodyRowCount = totalActualBodyRowCount, this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1,
83
+ this.rowStart = this.bodyTopRow;
82
84
  const defaultRowHeight = this.table.defaultRowHeight;
83
85
  this.taskRowCount = 1 * Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight);
84
86
  const totalBodyHeight = defaultRowHeight * totalActualBodyRowCount, totalHeight = defaultRowHeight * (this.bodyBottomRow - this.bodyTopRow + 1);
@@ -163,17 +165,19 @@ export class SceneProxy {
163
165
  const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width, yOrigin = lastColumnGroup.attribute.y;
164
166
  createColGroup(this.table.scenegraph.bodyGroup, xOrigin, yOrigin, this.currentCol + 1, endCol, this.rowStart, this.rowEnd, "body", this.table),
165
167
  this.currentCol = endCol, this.colEnd = endCol, this.colUpdatePos = this.colEnd,
166
- this.referenceCol = this.colStart + Math.floor((endCol - this.colStart) / 2), this.table.scenegraph.updateContainerAttrWidthAndX(),
167
- this.table.scenegraph.updateContainer(), this.table.scenegraph.updateBorderSizeAndPosition();
168
+ this.referenceCol = this.colStart + Math.floor((endCol - this.colStart) / 2), this.table.scenegraph.updateContainer(),
169
+ this.table.scenegraph.updateBorderSizeAndPosition();
168
170
  }
169
171
  setY(y) {
170
172
  return __awaiter(this, void 0, void 0, (function*() {
171
- y < this.yLimitTop && this.rowStart === this.bodyTopRow || y > this.yLimitBottom && this.rowEnd === this.bodyBottomRow ? this.table.scenegraph.setBodyAndRowHeaderY(-y) : this.dynamicSetY(y);
173
+ const yLimitTop = this.table.getRowsHeight(this.bodyTopRow, this.bodyTopRow + this.totalActualBodyRowCount) / 2, yLimitBottom = this.table.getAllRowsHeight() - yLimitTop;
174
+ y < yLimitTop && this.rowStart === this.bodyTopRow || y > yLimitBottom && this.rowEnd === this.bodyBottomRow ? this.table.scenegraph.setBodyAndRowHeaderY(-y) : this.dynamicSetY(y);
172
175
  }));
173
176
  }
174
177
  setX(x) {
175
178
  return __awaiter(this, void 0, void 0, (function*() {
176
- x < this.xLimitLeft && this.colStart === this.bodyLeftCol || x > this.xLimitRight && this.colEnd === this.bodyRightCol ? this.table.scenegraph.setBodyAndColHeaderX(-x) : this.dynamicSetX(x);
179
+ const xLimitLeft = this.table.getColsWidth(this.bodyLeftCol, this.bodyLeftCol + this.totalActualBodyColCount) / 2, xLimitRight = this.table.getAllColsWidth() - xLimitLeft;
180
+ x < xLimitLeft && this.colStart === this.bodyLeftCol || x > xLimitRight && this.colEnd === this.bodyRightCol ? this.table.scenegraph.setBodyAndColHeaderX(-x) : this.dynamicSetX(x);
177
181
  }));
178
182
  }
179
183
  dynamicSetY(y) {
@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E,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;IAED,OAAO;QACL,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACxB,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';\nimport { sortVertical } from './update-position/sort-vertical';\nimport { sortHorizontal } from './update-position/sort-horizontal';\n\nexport class SceneProxy {\n table: BaseTableAPI;\n isRelease: boolean = false;\n mode: 'column' | 'row' | 'pivot' = 'column';\n isProgressing: boolean;\n\n rowLimit = 200;\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 get bodyLeftCol(): number {\n return this.table.frozenColCount;\n }\n\n setParamsForColumn() {\n // this.bodyLeftCol = this.table.frozenColCount;\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.min(this.colLimit, 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.min(this.rowLimit, 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 if (this.isProgressing) {\n return;\n }\n this.isProgressing = true;\n return new Promise<void>((resolve, reject) => {\n setTimeout(async () => {\n this.isProgressing = false;\n if (this.isRelease) {\n return;\n }\n // console.log('progress col', this.colUpdatePos, this.colEnd, this.currentCol, this.totalCol);\n // console.log('progress row', this.rowUpdatePos, this.rowEnd, this.currentRow, this.totalRow);\n // console.log('before: createRow', table.scenegraph.bodyGroup.lastChild.attribute);\n // if (this.isSkipProgress) {\n // await this.progress();\n // } else\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 }, 16);\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.frozenColCount) {\n // create row header row cellGroup\n let maxHeight = 0;\n for (let col = 0; col < this.table.frozenColCount; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellLocation = this.table.isListTable() ? 'body' : '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 cellLocation\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 cellLocation = this.table.isListTable() ? 'body' : '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 cellLocation\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 if (!colGroup) {\n continue;\n }\n const cellLocation = '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 cellLocation\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 let lastColumnGroup =\n this.table.scenegraph.bodyGroup.lastChild &&\n ((this.table.scenegraph.bodyGroup.lastChild instanceof Group\n ? this.table.scenegraph.bodyGroup.lastChild\n : this.table.scenegraph.bodyGroup.lastChild._prev) as Group);\n if (!lastColumnGroup) {\n lastColumnGroup =\n this.table.scenegraph.colHeaderGroup.lastChild &&\n ((this.table.scenegraph.colHeaderGroup.lastChild instanceof Group\n ? this.table.scenegraph.colHeaderGroup.lastChild\n : this.table.scenegraph.colHeaderGroup.lastChild._prev) as Group);\n }\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.updateContainerAttrWidthAndX();\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 sortCellVertical() {\n await sortVertical(this);\n }\n\n async sortCellHorizontal() {\n await sortHorizontal(this);\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.frozenColCount && // 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 release() {\n this.isRelease = true;\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;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAEnE,MAAM,OAAO,UAAU;IA8CrB,YAAY,KAAmB;QA5C/B,cAAS,GAAY,KAAK,CAA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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';\nimport { sortVertical } from './update-position/sort-vertical';\nimport { sortHorizontal } from './update-position/sort-horizontal';\n\nexport class SceneProxy {\n table: BaseTableAPI;\n isRelease: boolean = false;\n mode: 'column' | 'row' | 'pivot' = 'column';\n isProgressing: boolean;\n\n rowLimit = 200;\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 totalActualBodyRowCount: number; // 实际表格body部分的行数\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 totalActualBodyColCount: number; // 实际表格body部分的列数\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 get bodyLeftCol(): number {\n return this.table.frozenColCount;\n }\n\n setParamsForColumn() {\n // this.bodyLeftCol = this.table.frozenColCount;\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.totalActualBodyColCount = totalActualBodyColCount;\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.min(this.colLimit, 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.totalActualBodyRowCount = totalActualBodyRowCount;\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.min(this.rowLimit, 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 if (this.isProgressing) {\n return;\n }\n this.isProgressing = true;\n return new Promise<void>((resolve, reject) => {\n setTimeout(async () => {\n this.isProgressing = false;\n if (this.isRelease) {\n return;\n }\n // console.log('progress col', this.colUpdatePos, this.colEnd, this.currentCol, this.totalCol);\n // console.log('progress row', this.rowUpdatePos, this.rowEnd, this.currentRow, this.totalRow);\n // console.log('before: createRow', table.scenegraph.bodyGroup.lastChild.attribute);\n // if (this.isSkipProgress) {\n // await this.progress();\n // } else\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 }, 16);\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.frozenColCount) {\n // create row header row cellGroup\n let maxHeight = 0;\n for (let col = 0; col < this.table.frozenColCount; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellLocation = this.table.isListTable() ? 'body' : '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 cellLocation\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 cellLocation = this.table.isListTable() ? 'body' : '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 cellLocation\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 if (!colGroup) {\n continue;\n }\n const cellLocation = '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 cellLocation\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 let lastColumnGroup =\n this.table.scenegraph.bodyGroup.lastChild &&\n ((this.table.scenegraph.bodyGroup.lastChild instanceof Group\n ? this.table.scenegraph.bodyGroup.lastChild\n : this.table.scenegraph.bodyGroup.lastChild._prev) as Group);\n if (!lastColumnGroup) {\n lastColumnGroup =\n this.table.scenegraph.colHeaderGroup.lastChild &&\n ((this.table.scenegraph.colHeaderGroup.lastChild instanceof Group\n ? this.table.scenegraph.colHeaderGroup.lastChild\n : this.table.scenegraph.colHeaderGroup.lastChild._prev) as Group);\n }\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.updateContainerAttrWidthAndX();\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n async setY(y: number) {\n const yLimitTop = this.table.getRowsHeight(this.bodyTopRow, this.bodyTopRow + this.totalActualBodyRowCount) / 2;\n const yLimitBottom = this.table.getAllRowsHeight() - yLimitTop;\n if (y < yLimitTop && this.rowStart === this.bodyTopRow) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n } else if (y > 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 const xLimitLeft = this.table.getColsWidth(this.bodyLeftCol, this.bodyLeftCol + this.totalActualBodyColCount) / 2;\n const xLimitRight = this.table.getAllColsWidth() - xLimitLeft;\n if (x < xLimitLeft && this.colStart === this.bodyLeftCol) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndColHeaderX(-x);\n } else if (x > 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 sortCellVertical() {\n await sortVertical(this);\n }\n\n async sortCellHorizontal() {\n await sortHorizontal(this);\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.frozenColCount && // 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 release() {\n this.isRelease = true;\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"]}
@@ -9,7 +9,7 @@ export function updateAutoColumn(colStart, colEnd, table, direction = "left") {
9
9
  const bottomColGroup = table.scenegraph.getColGroupInBottom(col);
10
10
  bottomColGroup && moveColumnGroup(bottomColGroup, table, direction);
11
11
  }
12
- const totalActualBodyColumnCount = Math.min(table.scenegraph.proxy.colLimit, table.scenegraph.proxy.bodyRightCol - table.scenegraph.proxy.bodyLeftCol + 1), totalBodyWidth = table.getColsWidth(table.rowHeaderLevelCount, table.rowHeaderLevelCount + totalActualBodyColumnCount), totalWidth = table.getColsWidth(table.rowHeaderLevelCount, table.colCount - 1);
12
+ const totalActualBodyColumnCount = Math.min(table.scenegraph.proxy.colLimit, table.scenegraph.proxy.bodyRightCol - table.scenegraph.proxy.bodyLeftCol + 1), totalBodyWidth = table.getColsWidth(table.frozenColCount, table.frozenColCount + totalActualBodyColumnCount), totalWidth = table.getColsWidth(table.frozenColCount, table.colCount - 1);
13
13
  table.scenegraph.proxy.xLimitLeft = totalBodyWidth / 2, table.scenegraph.proxy.xLimitRight = totalWidth - totalBodyWidth / 2;
14
14
  }
15
15
 
@@ -17,12 +17,12 @@ function moveColumnGroup(colGroup, table, direction = "left") {
17
17
  if ("left" === direction) {
18
18
  let x;
19
19
  const prevCellGroup = getPrevGroup(colGroup);
20
- x = prevCellGroup ? prevCellGroup.attribute.x + table.getColWidth(colGroup._prev.col) : table.getColsWidth(table.rowHeaderLevelCount, colGroup.col - 1),
20
+ x = prevCellGroup ? prevCellGroup.attribute.x + table.getColWidth(colGroup._prev.col) : table.getColsWidth(table.frozenColCount, colGroup.col - 1),
21
21
  colGroup.setAttribute("x", x);
22
22
  } else {
23
23
  let x;
24
24
  const nextCellGroup = getNextGroup(colGroup);
25
- x = nextCellGroup ? nextCellGroup.attribute.x - table.getColWidth(colGroup.col) : table.getColsWidth(table.rowHeaderLevelCount, colGroup.col - 1),
25
+ x = nextCellGroup ? nextCellGroup.attribute.x - table.getColWidth(colGroup.col) : table.getColsWidth(table.frozenColCount, colGroup.col - 1),
26
26
  colGroup.setAttribute("x", x);
27
27
  }
28
28
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["scenegraph/group-creater/progress/update-position/update-auto-column.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEpD,MAAM,UAAU,gBAAgB,CAC9B,QAAgB,EAChB,MAAc,EACd,KAAmB,EACnB,YAA8B,MAAM;IAGpC,KAAK,IAAI,GAAG,GAAG,QAAQ,EAAE,GAAG,IAAI,MAAM,EAAE,GAAG,EAAE,EAAE;QAC7C,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACvD,IAAI,YAAY,EAAE;YAChB,eAAe,CAAC,YAAY,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;SACjD;QACD,MAAM,oBAAoB,GAAG,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACrE,IAAI,oBAAoB,EAAE;YACxB,eAAe,CAAC,oBAAoB,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;SACzD;QACD,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;QACjE,IAAI,cAAc,EAAE;YAClB,eAAe,CAAC,cAAc,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;SACnD;KACF;IAGD,MAAM,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,IAAI,aAAa,EAAE;YACjB,CAAC,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;SACjE;aAAM;YAEL,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,mBAAmB,EAAE,QAAQ,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;SACrE;QACD,QAAQ,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;KAC/B;AACH,CAAC","file":"update-auto-column.js","sourcesContent":["import type { BaseTableAPI } from '../../../../ts-types/base-table';\nimport type { Group } from '../../../graphic/group';\nimport { getNextGroup, getPrevGroup } from './util';\n\nexport function updateAutoColumn(\n colStart: number,\n colEnd: number,\n table: BaseTableAPI,\n direction: 'left' | 'right' = 'left'\n) {\n // 更新y位置\n for (let col = colStart; col <= colEnd; col++) {\n const bodyColGroup = table.scenegraph.getColGroup(col);\n if (bodyColGroup) {\n moveColumnGroup(bodyColGroup, table, direction);\n }\n const columnHeaderColGroup = table.scenegraph.getColGroup(col, true);\n if (columnHeaderColGroup) {\n moveColumnGroup(columnHeaderColGroup, table, direction);\n }\n const bottomColGroup = table.scenegraph.getColGroupInBottom(col);\n if (bottomColGroup) {\n moveColumnGroup(bottomColGroup, table, direction);\n }\n }\n\n // update x limit in proxy\n const totalActualBodyColumnCount = Math.min(\n table.scenegraph.proxy.colLimit,\n table.scenegraph.proxy.bodyRightCol - table.scenegraph.proxy.bodyLeftCol + 1\n );\n // 渐进加载总column数量\n const totalBodyWidth = table.getColsWidth(\n table.rowHeaderLevelCount,\n table.rowHeaderLevelCount + totalActualBodyColumnCount\n );\n const totalWidth = table.getColsWidth(table.rowHeaderLevelCount, table.colCount - 1);\n table.scenegraph.proxy.xLimitLeft = totalBodyWidth / 2;\n table.scenegraph.proxy.xLimitRight = totalWidth - totalBodyWidth / 2;\n}\n\nfunction moveColumnGroup(colGroup: Group, table: BaseTableAPI, direction: 'left' | 'right' = 'left') {\n if (direction === 'left') {\n let x;\n const prevCellGroup = getPrevGroup(colGroup);\n if (prevCellGroup) {\n x = prevCellGroup.attribute.x + table.getColWidth((colGroup._prev as Group).col);\n } else {\n // 估计位置\n x = table.getColsWidth(table.rowHeaderLevelCount, colGroup.col - 1);\n }\n colGroup.setAttribute('x', x);\n } else {\n let x;\n const nextCellGroup = getNextGroup(colGroup);\n if (nextCellGroup) {\n x = nextCellGroup.attribute.x - table.getColWidth(colGroup.col);\n } else {\n // 估计位置\n x = table.getColsWidth(table.rowHeaderLevelCount, colGroup.col - 1);\n }\n colGroup.setAttribute('x', x);\n }\n}\n"]}
1
+ {"version":3,"sources":["scenegraph/group-creater/progress/update-position/update-auto-column.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEpD,MAAM,UAAU,gBAAgB,CAC9B,QAAgB,EAChB,MAAc,EACd,KAAmB,EACnB,YAA8B,MAAM;IAGpC,KAAK,IAAI,GAAG,GAAG,QAAQ,EAAE,GAAG,IAAI,MAAM,EAAE,GAAG,EAAE,EAAE;QAC7C,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACvD,IAAI,YAAY,EAAE;YAChB,eAAe,CAAC,YAAY,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;SACjD;QACD,MAAM,oBAAoB,GAAG,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACrE,IAAI,oBAAoB,EAAE;YACxB,eAAe,CAAC,oBAAoB,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;SACzD;QACD,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;QACjE,IAAI,cAAc,EAAE;YAClB,eAAe,CAAC,cAAc,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;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C,CAAC;QAC7C,IAAI,aAAa,EAAE;YACjB,CAAC,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;SACjE;aAAM;YAEL,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,cAAc,EAAE,QAAQ,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;SAChE;QACD,QAAQ,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;KAC/B;AACH,CAAC","file":"update-auto-column.js","sourcesContent":["import type { BaseTableAPI } from '../../../../ts-types/base-table';\nimport type { Group } from '../../../graphic/group';\nimport { getNextGroup, getPrevGroup } from './util';\n\nexport function updateAutoColumn(\n colStart: number,\n colEnd: number,\n table: BaseTableAPI,\n direction: 'left' | 'right' = 'left'\n) {\n // 更新y位置\n for (let col = colStart; col <= colEnd; col++) {\n const bodyColGroup = table.scenegraph.getColGroup(col);\n if (bodyColGroup) {\n moveColumnGroup(bodyColGroup, table, direction);\n }\n const columnHeaderColGroup = table.scenegraph.getColGroup(col, true);\n if (columnHeaderColGroup) {\n moveColumnGroup(columnHeaderColGroup, table, direction);\n }\n const bottomColGroup = table.scenegraph.getColGroupInBottom(col);\n if (bottomColGroup) {\n moveColumnGroup(bottomColGroup, table, direction);\n }\n }\n\n // update x limit in proxy\n const totalActualBodyColumnCount = Math.min(\n table.scenegraph.proxy.colLimit,\n table.scenegraph.proxy.bodyRightCol - table.scenegraph.proxy.bodyLeftCol + 1\n );\n // 渐进加载总column数量\n const totalBodyWidth = table.getColsWidth(table.frozenColCount, table.frozenColCount + totalActualBodyColumnCount);\n const totalWidth = table.getColsWidth(table.frozenColCount, table.colCount - 1);\n table.scenegraph.proxy.xLimitLeft = totalBodyWidth / 2;\n table.scenegraph.proxy.xLimitRight = totalWidth - totalBodyWidth / 2;\n}\n\nfunction moveColumnGroup(colGroup: Group, table: BaseTableAPI, direction: 'left' | 'right' = 'left') {\n if (direction === 'left') {\n let x;\n const prevCellGroup = getPrevGroup(colGroup);\n if (prevCellGroup) {\n x = prevCellGroup.attribute.x + table.getColWidth((colGroup._prev as Group).col);\n } else {\n // 估计位置\n x = table.getColsWidth(table.frozenColCount, colGroup.col - 1);\n }\n colGroup.setAttribute('x', x);\n } else {\n let x;\n const nextCellGroup = getNextGroup(colGroup);\n if (nextCellGroup) {\n x = nextCellGroup.attribute.x - table.getColWidth(colGroup.col);\n } else {\n // 估计位置\n x = table.getColsWidth(table.frozenColCount, colGroup.col - 1);\n }\n colGroup.setAttribute('x', x);\n }\n}\n"]}
@@ -14,6 +14,8 @@ import { computeAxisComponentWidth } from "../../components/axis/get-axis-compon
14
14
 
15
15
  import { Group as VGroup } from "@visactor/vrender";
16
16
 
17
+ import { decodeReactDom } from "../component/custom";
18
+
17
19
  export function computeColsWidth(table, colStart, colEnd, update) {
18
20
  var _a, _b, _c, _d, _e;
19
21
  "undefined" != typeof window && window.performance.now();
@@ -146,7 +148,8 @@ function computeCustomRenderWidth(col, row, table) {
146
148
  };
147
149
  if (customLayout) {
148
150
  const customLayoutObj = customLayout(arg);
149
- if (customLayoutObj.rootContainer instanceof VGroup) width = null !== (_b = customLayoutObj.rootContainer.AABBBounds.width()) && void 0 !== _b ? _b : 0; else if (customLayoutObj.rootContainer) {
151
+ if (customLayoutObj.rootContainer && (customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer)),
152
+ customLayoutObj.rootContainer instanceof VGroup) width = null !== (_b = customLayoutObj.rootContainer.AABBBounds.width()) && void 0 !== _b ? _b : 0; else if (customLayoutObj.rootContainer) {
150
153
  customLayoutObj.rootContainer.isRoot = !0;
151
154
  width = null !== (_c = customLayoutObj.rootContainer.getContentSize().width) && void 0 !== _c ? _c : 0;
152
155
  } else width = 0;