@visactor/vtable 1.24.0-alpha.0 → 1.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/cjs/core/BaseTable.d.ts +7 -0
  2. package/cjs/core/BaseTable.js +55 -17
  3. package/cjs/core/BaseTable.js.map +1 -1
  4. package/cjs/core/animation.js +3 -5
  5. package/cjs/core/animation.js.map +1 -1
  6. package/cjs/core/tableHelper.js +5 -3
  7. package/cjs/core/tableHelper.js.map +1 -1
  8. package/cjs/core/utils/get-cell-position.js +23 -12
  9. package/cjs/core/utils/get-cell-position.js.map +1 -1
  10. package/cjs/dataset/DataStatistics.js +2 -1
  11. package/cjs/edit/edit-manager.js +0 -1
  12. package/cjs/event/listener/container-dom.js +7 -5
  13. package/cjs/event/listener/container-dom.js.map +1 -1
  14. package/cjs/event/listener/scroll-bar.js +77 -6
  15. package/cjs/event/listener/scroll-bar.js.map +1 -1
  16. package/cjs/event/listener/table-group.js +29 -20
  17. package/cjs/event/listener/table-group.js.map +1 -1
  18. package/cjs/event/scroll.js +34 -11
  19. package/cjs/event/scroll.js.map +1 -1
  20. package/cjs/event/util.d.ts +2 -0
  21. package/cjs/event/util.js +28 -3
  22. package/cjs/event/util.js.map +1 -1
  23. package/cjs/index.d.ts +1 -1
  24. package/cjs/index.js +1 -1
  25. package/cjs/index.js.map +1 -1
  26. package/cjs/scenegraph/component/table-component.d.ts +6 -1
  27. package/cjs/scenegraph/component/table-component.js +143 -16
  28. package/cjs/scenegraph/component/table-component.js.map +1 -1
  29. package/cjs/scenegraph/component/util.js +5 -2
  30. package/cjs/scenegraph/component/util.js.map +1 -1
  31. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +29 -10
  32. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  33. package/cjs/scenegraph/group-creater/init-scenegraph.js +36 -6
  34. package/cjs/scenegraph/group-creater/init-scenegraph.js.map +1 -1
  35. package/cjs/scenegraph/group-creater/progress/proxy.js +4 -2
  36. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  37. package/cjs/scenegraph/scenegraph.d.ts +13 -0
  38. package/cjs/scenegraph/scenegraph.js +194 -23
  39. package/cjs/scenegraph/scenegraph.js.map +1 -1
  40. package/cjs/scenegraph/select/create-select-border.js +9 -10
  41. package/cjs/scenegraph/select/create-select-border.js.map +1 -1
  42. package/cjs/scenegraph/select/delete-select-border.js.map +1 -1
  43. package/cjs/scenegraph/select/move-select-border.js.map +1 -1
  44. package/cjs/scenegraph/select/update-custom-select-border.js +9 -9
  45. package/cjs/scenegraph/select/update-custom-select-border.js.map +1 -1
  46. package/cjs/scenegraph/select/update-select-border.js +14 -73
  47. package/cjs/scenegraph/select/update-select-border.js.map +1 -1
  48. package/cjs/scenegraph/select/update-select-style.js.map +1 -1
  49. package/cjs/state/state.d.ts +7 -1
  50. package/cjs/state/state.js +61 -28
  51. package/cjs/state/state.js.map +1 -1
  52. package/cjs/ts-types/base-table.d.ts +10 -0
  53. package/cjs/ts-types/base-table.js.map +1 -1
  54. package/cjs/vrender.js.map +1 -1
  55. package/dist/vtable.js +1087 -337
  56. package/dist/vtable.min.js +2 -2
  57. package/es/core/BaseTable.d.ts +7 -0
  58. package/es/core/BaseTable.js +55 -17
  59. package/es/core/BaseTable.js.map +1 -1
  60. package/es/core/animation.js +3 -5
  61. package/es/core/animation.js.map +1 -1
  62. package/es/core/tableHelper.js +5 -3
  63. package/es/core/tableHelper.js.map +1 -1
  64. package/es/core/utils/get-cell-position.js +23 -12
  65. package/es/core/utils/get-cell-position.js.map +1 -1
  66. package/es/dataset/DataStatistics.js +2 -1
  67. package/es/edit/edit-manager.js +1 -2
  68. package/es/event/listener/container-dom.js +7 -5
  69. package/es/event/listener/container-dom.js.map +1 -1
  70. package/es/event/listener/scroll-bar.js +75 -6
  71. package/es/event/listener/scroll-bar.js.map +1 -1
  72. package/es/event/listener/table-group.js +29 -21
  73. package/es/event/listener/table-group.js.map +1 -1
  74. package/es/event/scroll.js +34 -11
  75. package/es/event/scroll.js.map +1 -1
  76. package/es/event/util.d.ts +2 -0
  77. package/es/event/util.js +24 -0
  78. package/es/event/util.js.map +1 -1
  79. package/es/index.d.ts +1 -1
  80. package/es/index.js +1 -1
  81. package/es/index.js.map +1 -1
  82. package/es/scenegraph/component/table-component.d.ts +6 -1
  83. package/es/scenegraph/component/table-component.js +141 -16
  84. package/es/scenegraph/component/table-component.js.map +1 -1
  85. package/es/scenegraph/component/util.js +5 -2
  86. package/es/scenegraph/component/util.js.map +1 -1
  87. package/es/scenegraph/graphic/contributions/group-contribution-render.js +29 -10
  88. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  89. package/es/scenegraph/group-creater/init-scenegraph.js +36 -6
  90. package/es/scenegraph/group-creater/init-scenegraph.js.map +1 -1
  91. package/es/scenegraph/group-creater/progress/proxy.js +4 -2
  92. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  93. package/es/scenegraph/scenegraph.d.ts +13 -0
  94. package/es/scenegraph/scenegraph.js +185 -18
  95. package/es/scenegraph/scenegraph.js.map +1 -1
  96. package/es/scenegraph/select/create-select-border.js +9 -10
  97. package/es/scenegraph/select/create-select-border.js.map +1 -1
  98. package/es/scenegraph/select/delete-select-border.js.map +1 -1
  99. package/es/scenegraph/select/move-select-border.js.map +1 -1
  100. package/es/scenegraph/select/update-custom-select-border.js +9 -9
  101. package/es/scenegraph/select/update-custom-select-border.js.map +1 -1
  102. package/es/scenegraph/select/update-select-border.js +14 -73
  103. package/es/scenegraph/select/update-select-border.js.map +1 -1
  104. package/es/scenegraph/select/update-select-style.js.map +1 -1
  105. package/es/state/state.d.ts +7 -1
  106. package/es/state/state.js +61 -28
  107. package/es/state/state.js.map +1 -1
  108. package/es/ts-types/base-table.d.ts +10 -0
  109. package/es/ts-types/base-table.js.map +1 -1
  110. package/es/vrender.js.map +1 -1
  111. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3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C;KAClC;IACD,IAAI,cAAc,CAAC,GAAG,GAAG,GAAG,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,KAAK,cAAc,CAAC,GAAG,GAAG,CAAC,EAAE;QAC3E,OAAO,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;KAClC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","file":"proxy.js","sourcesContent":["import { isNumber, isValid } 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';\nimport { updateAutoColumn } from './update-position/update-auto-column';\nimport { getDefaultHeight, getDefaultWidth } from './default-width-height';\nimport { handleTextStick } from '../../stick-text';\nimport type { ColumnInfo, RowInfo } from '../../../ts-types';\nimport { TABLE_EVENT_TYPE } from '../../../core/TABLE_EVENT_TYPE';\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'; // 当前行更新的方向,up表示从下往上挨个更新,down表示从上往下挨个更新\n screenTopRow: number = 0; // 当前屏幕范围内显示的第一行的row number\n totalActualBodyRowCount: number; // 实际表格body部分的行数\n deltaY: number = 0;\n deltaHeight: 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 deltaWidth: 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 this.rowLimit = Math.max(100, Math.ceil((table.tableNoFrameHeight * 2) / table.defaultRowHeight));\n this.colLimit = Math.max(100, Math.ceil((table.tableNoFrameWidth * 2) / table.defaultColWidth));\n } else if (this.table.isAutoRowHeight(table.columnHeaderLevelCount)) {\n // this.rowLimit = 100;\n this.rowLimit = Math.max(100, Math.ceil((table.tableNoFrameHeight * 2) / table.defaultRowHeight));\n } else if (this.table.widthMode === 'autoWidth') {\n // this.colLimit = 100;\n this.colLimit = Math.max(100, Math.ceil((table.tableNoFrameWidth * 2) / table.defaultColWidth));\n } else {\n this.rowLimit = Math.max(200, Math.ceil((table.tableNoFrameHeight * 2) / table.defaultRowHeight));\n this.colLimit = Math.max(100, Math.ceil((table.tableNoFrameWidth * 2) / table.defaultColWidth));\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 if (this.table.options.maintainedColumnCount) {\n this.colLimit = this.table.options.maintainedColumnCount;\n }\n if (this.table.heightMode === 'adaptive') {\n this.rowLimit = this.table.rowCount;\n }\n if (this.table.widthMode === 'adaptive') {\n this.colLimit = this.table.colCount;\n }\n }\n\n get bodyLeftCol(): number {\n return this.table.frozenColCount;\n }\n get bodyTopRow(): number {\n return this.table.frozenRowCount;\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 this.colEnd = this.totalCol; // temp for first screen, will replace in createGroupForFirstScreen()\n const defaultColWidth = this.table.defaultColWidth;\n // const defaultColWidth = getDefaultHeight(this.table);\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 = Math.max(\n 15, // min firstScreenColLimit\n this.bodyLeftCol + Math.min(this.colLimit, Math.ceil(widthLimit / defaultColWidth))\n );\n // this.firstScreenRowLimit = this.bodyBottomRow;\n\n this.colUpdatePos = this.bodyRightCol;\n }\n\n setParamsForRow() {\n // this.bodyTopRow = this.table.frozenRowCount;\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 this.rowEnd = this.totalRow; // temp for first screen, will replace in createGroupForFirstScreen()\n const defaultRowHeight = this.table.defaultRowHeight;\n // const defaultRowHeight = getDefaultWidth(this.table);\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 = Math.max(\n 30, // min firstScreenRowLimit\n this.bodyTopRow + Math.min(this.rowLimit, Math.ceil(heightLimit / defaultRowHeight))\n );\n // this.firstScreenRowLimit = this.bodyBottomRow;\n\n this.rowUpdatePos = this.bodyBottomRow;\n }\n\n refreshRowCount() {\n // this.bodyTopRow = this.table.frozenRowCount;\n this.bodyBottomRow = this.table.rowCount - 1 - this.table.bottomFrozenRowCount;\n const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1); // 渐进加载总row数量\n this.totalActualBodyRowCount = totalActualBodyRowCount;\n this.totalRow = this.rowStart + totalActualBodyRowCount - 1; // 目标渐进完成的row\n\n // this.rowStart = this.bodyTopRow;\n // this.rowEnd = this.totalRow; // temp for first screen, will replace in createGroupForFirstScreen()\n }\n\n refreshColCount() {\n this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;\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\n this.colStart = this.bodyLeftCol;\n this.colEnd = this.totalCol; // temp for first screen, will replace in createGroupForFirstScreen()\n }\n\n resize() {\n const defaultColWidth = this.table.defaultColWidth;\n this.taskColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth) * 1;\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\n const defaultRowHeight = this.table.defaultRowHeight;\n this.taskRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight) * 1;\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 }\n\n 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 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('before: createRow', table.scenegraph.bodyGroup.lastChild.attribute);\n // if (this.isSkipProgress) {\n // await this.progress();\n // } else\n if (this.colUpdatePos <= this.colEnd) {\n // console.log('progress colUpdatePos', this.colUpdatePos);\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 handleTextStick(this.table);\n this.table.scenegraph.updateNextFrame();\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 if (this.table.heightMode !== 'adaptive') {\n computeRowsHeight(this.table, this.currentRow + 1, endRow, false);\n }\n\n this.rowEnd = endRow;\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.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.isPivotChart() ? 'rowHeader' : 'body'; // isHeader\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.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 = col < this.table.rowHeaderLevelCount ? 'rowHeader' : '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.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.rowUpdatePos = this.rowEnd;\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 if (this.table.widthMode !== 'adaptive') {\n computeColsWidth(this.table, this.currentCol + 1, endCol);\n }\n\n this.colEnd = endCol;\n\n // update last merge cell size\n for (let row = 0; row < this.table.rowCount; row++) {\n const cellGroup = this.highPerformanceGetCell(this.currentCol, row);\n if (cellGroup.role === 'cell' && isNumber(cellGroup.mergeStartCol) && cellGroup.mergeStartCol > this.currentCol) {\n this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);\n }\n }\n\n // create column\n if (this.table.frozenRowCount) {\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.frozenRowCount - 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.colUpdatePos = this.colEnd;\n\n // update container group size and border\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n async setY(y: number, isEnd = false) {\n const yLimitTop =\n this.table.getRowsHeight(this.bodyTopRow, this.bodyTopRow + (this.rowEnd - this.rowStart + 1)) / 2;\n const yLimitBottom = this.table.getAllRowsHeight() - yLimitTop;\n\n const screenTop = this.table.getTargetRowAt(y + this.table.scenegraph.colHeaderGroup.attribute.height);\n if (screenTop) {\n this.screenTopRow = screenTop.row;\n }\n\n if (y < yLimitTop && this.rowStart === this.bodyTopRow) {\n // 执行真实body group坐标修改\n this.updateDeltaY(y);\n this.updateBody(y - this.deltaY);\n } else if (y > yLimitBottom && this.rowEnd === this.bodyBottomRow) {\n // 执行真实body group坐标修改\n this.updateDeltaY(y);\n this.updateBody(y - this.deltaY);\n } else if (\n (!this.table.scenegraph.bodyGroup.firstChild ||\n this.table.scenegraph.bodyGroup.firstChild.type !== 'group' ||\n this.table.scenegraph.bodyGroup.firstChild.childrenCount === 0) &&\n (!this.table.scenegraph.rowHeaderGroup.firstChild ||\n this.table.scenegraph.rowHeaderGroup.firstChild.type !== 'group' ||\n this.table.scenegraph.rowHeaderGroup.firstChild.childrenCount === 0)\n ) {\n this.updateDeltaY(y);\n // 兼容异步加载数据promise的情况 childrenCount=0 如果用户立即调用setScrollTop执行dynamicSetY会出错\n this.updateBody(y - this.deltaY);\n } else {\n // 执行动态更新节点\n this.dynamicSetY(y, screenTop, isEnd);\n }\n }\n\n async setX(x: number, isEnd = false) {\n const xLimitLeft =\n this.table.getColsWidth(this.bodyLeftCol, this.bodyLeftCol + (this.colEnd - this.colStart + 1)) / 2;\n const xLimitRight = this.table.getAllColsWidth() - xLimitLeft;\n\n const screenLeft = this.table.getTargetColAt(x + this.table.scenegraph.rowHeaderGroup.attribute.width);\n if (screenLeft) {\n this.screenLeftCol = screenLeft.col;\n }\n\n if (x < xLimitLeft && this.colStart === this.bodyLeftCol) {\n // 执行真实body group坐标修改\n this.updateDeltaX(x);\n this.table.scenegraph.setBodyAndColHeaderX(-x + this.deltaX);\n } else if (x > xLimitRight && this.colEnd === this.bodyRightCol) {\n // 执行真实body group坐标修改\n this.updateDeltaX(x);\n this.table.scenegraph.setBodyAndColHeaderX(-x + this.deltaX);\n } else if (\n // 注意判断关系 这里不是 || 而是 &&\n this.table.scenegraph.bodyGroup.firstChild &&\n this.table.scenegraph.bodyGroup.firstChild.type === 'group' &&\n this.table.scenegraph.bodyGroup.firstChild.childrenCount === 0\n ) {\n // 兼容异步加载数据promise的情况 childrenCount=0 如果用户立即调用setScrollLeft执行dynamicSetX会出错\n this.updateDeltaX(x);\n this.table.scenegraph.setBodyAndColHeaderX(-x + this.deltaX);\n } else {\n // 执行动态更新节点\n this.dynamicSetX(x, screenLeft, isEnd);\n }\n }\n\n async dynamicSetY(y: number, screenTop: RowInfo | null, isEnd = false) {\n dynamicSetY(y, screenTop, isEnd, this);\n }\n async dynamicSetX(x: number, screenLeft: ColumnInfo | null, isEnd = false) {\n dynamicSetX(x, screenLeft, isEnd, 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.isAutoRowHeight(this.rowUpdatePos)) {\n computeRowsHeight(this.table, this.rowUpdatePos, distRow, false);\n }\n\n updateRowContent(this.rowUpdatePos, distRow, this);\n\n if (this.table.isAutoRowHeight(this.rowUpdatePos)) {\n // body group\n updateAutoRow(\n this.bodyLeftCol, // colStart\n this.bodyRightCol, // colEnd\n this.rowUpdatePos, // rowStart\n distRow, // rowEnd\n this.table,\n this.rowUpdateDirection,\n true\n );\n // row header group\n updateAutoRow(\n 0, // colStart\n this.table.frozenColCount - 1, // colEnd\n this.rowUpdatePos, // rowStart\n distRow, // rowEnd\n this.table,\n this.rowUpdateDirection,\n true\n );\n // right frozen group\n updateAutoRow(\n this.table.colCount - this.table.rightFrozenColCount, // colStart\n this.table.colCount - 1, // colEnd\n this.rowUpdatePos, // rowStart\n distRow, // rowEnd\n this.table,\n this.rowUpdateDirection,\n true\n );\n }\n\n this.rowUpdatePos = distRow + 1;\n }\n /** 更新底部冻结行的单元格内容 包括两边的角头 */\n updateBottomFrozenCellGroups() {\n const startRow = this.table.rowCount - this.table.bottomFrozenRowCount;\n const endRow = this.table.rowCount - 1;\n if (this.table.isAutoRowHeight(startRow)) {\n computeRowsHeight(this.table, startRow, endRow, false);\n }\n updateRowContent(startRow, endRow, this);\n\n if (this.table.isAutoRowHeight(startRow)) {\n // body group\n updateAutoRow(\n this.bodyLeftCol, // colStart\n this.bodyRightCol, // colEnd\n startRow, // rowStart\n endRow, // rowEnd\n this.table,\n this.rowUpdateDirection\n );\n // row header group\n updateAutoRow(\n 0, // colStart\n this.table.frozenColCount - 1, // colEnd\n startRow, // rowStart\n endRow, // rowEnd\n this.table,\n this.rowUpdateDirection\n );\n // right frozen group\n updateAutoRow(\n this.table.colCount - this.table.rightFrozenColCount, // colStart\n this.table.colCount - 1, // colEnd\n startRow, // rowStart\n endRow, // rowEnd\n this.table,\n this.rowUpdateDirection\n );\n }\n }\n /** 更新底部冻结行的单元格内容 包括两边的角头 */\n updateRightFrozenCellGroups() {\n const startCol = this.table.colCount - this.table.rightFrozenColCount;\n const endCol = this.table.colCount - 1;\n if (this.table.widthMode === 'autoWidth') {\n computeColsWidth(this.table, startCol, endCol, false);\n }\n // console.log('updateRightFrozenCellGroups', startCol, endCol);\n updateColContent(startCol, endCol, this);\n\n if (this.table.isAutoRowHeight(this.rowStart)) {\n // body group\n updateAutoColumn(startCol, endCol, this.table, this.colUpdateDirection);\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 if (this.table.widthMode === 'autoWidth') {\n computeColsWidth(this.table, this.colUpdatePos, distCol);\n }\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.mergeStartCol = undefined;\n cellGroup.mergeStartRow = undefined;\n cellGroup.mergeEndCol = undefined;\n cellGroup.mergeEndRow = undefined;\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 || cellGroup.role !== 'cell') {\n return cellGroup;\n }\n\n const newCellGroup = this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);\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.frozenRowCount && // 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 updateDeltaY(y: number, screenTopY?: number, screenTopRow?: number) {\n if (this.rowStart === this.bodyTopRow) {\n const cellGroup = this.table.scenegraph.highPerformanceGetCell(this.colStart, this.rowStart, true);\n if (cellGroup.role === 'cell') {\n const deltaY = cellGroup.attribute.y;\n this.deltaY = -deltaY;\n }\n } else if (this.rowEnd === this.bodyBottomRow) {\n const cellGroup = this.table.scenegraph.highPerformanceGetCell(this.colStart, this.rowEnd, true);\n if (cellGroup.role === 'cell') {\n // const deltaY =\n // cellGroup.attribute.y +\n // cellGroup.attribute.height -\n // (this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight()) -\n // y;\n const actualRowHeight = this.table.getRowHeight(this.rowEnd); // 获取实际行高\n // 使用实际行高而不是cellGroup.attribute.height\n const deltaY =\n cellGroup.attribute.y +\n actualRowHeight -\n (this.table.getAllRowsHeight() - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight());\n this.deltaY = -deltaY;\n }\n } else if (isValid(screenTopY) && isValid(screenTopRow)) {\n let cellGroup = this.table.scenegraph.highPerformanceGetCell(this.colStart, screenTopRow, true);\n if (cellGroup.role !== 'cell') {\n cellGroup = this.table.scenegraph.highPerformanceGetCell(0, screenTopRow, true);\n }\n const bodyY = y - this.deltaY;\n const distRowYOffset = screenTopY - bodyY; // dist cell 距离表格顶部的位置差\n const currentRowYOffset = cellGroup.attribute.y - bodyY + this.table.getFrozenRowsHeight(); // current cell 距离表格顶部的位置差\n // const deltaY = screenTopY - (cellGroup.attribute.y + );\n this.deltaY = distRowYOffset - currentRowYOffset;\n }\n }\n\n updateDeltaX(x: number, screenLeftX?: number, screenLeftCol?: number) {\n if (this.colStart === this.bodyLeftCol) {\n const colGroup = this.table.scenegraph.getColGroup(this.colStart);\n if (colGroup) {\n const deltaX = colGroup.attribute.x;\n this.deltaX = -deltaX;\n }\n } else if (this.colEnd === this.bodyRightCol) {\n const colGroup = this.table.scenegraph.getColGroup(this.colEnd);\n if (colGroup) {\n const deltaX =\n colGroup.attribute.x +\n colGroup.attribute.width -\n (this.table.getAllColsWidth() - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth());\n this.deltaX = -deltaX;\n }\n } else if (isValid(screenLeftX) && isValid(screenLeftCol)) {\n const colGroup =\n this.table.scenegraph.getColGroup(screenLeftCol) || this.table.scenegraph.getColGroup(screenLeftCol, true);\n // const deltaX = screenLeftX - (colGroup.attribute.x + this.table.getFrozenColsWidth() + this.deltaX);\n // this.deltaX = deltaX + this.deltaX;\n const bodyX = x - this.deltaX;\n const distColXOffset = screenLeftX - bodyX; // dist col 距离表格左侧的位置差\n const currentColXOffset = colGroup.attribute.x - bodyX + this.table.getFrozenColsWidth(); // current col 距离表格左侧的位置差\n this.deltaX = distColXOffset - currentColXOffset;\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 }\n const prev = cacheCellGroup._prev as Group;\n const next = cacheCellGroup._next as Group;\n // cacheCellGroup may have wrong order\n if (cacheCellGroup.row > row && prev && prev.row === cacheCellGroup.row - 1) {\n return getCellByCache(prev, row);\n }\n if (cacheCellGroup.row < row && next && next.row === cacheCellGroup.row + 1) {\n return getCellByCache(next, row);\n }\n return null;\n}\n"]}
1
+ {"version":3,"sources":["../src/scenegraph/group-creater/progress/proxy.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAErD,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;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAInD,MAAM,OAAO,UAAU;IAgDrB,YAAY,KAAmB;QA9C/B,cAAS,GAAY,KAAK,CAAC;QAC3B,SAAI,GAA+B,QAAQ,CAAC;QAG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G,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;IACD,MAAM,IAAI,GAAG,cAAc,CAAC,KAAc,CAAC;IAC3C,MAAM,IAAI,GAAG,cAAc,CAAC,KAAc,CAAC;IAE3C,IAAI,cAAc,CAAC,GAAG,GAAG,GAAG,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,KAAK,cAAc,CAAC,GAAG,GAAG,CAAC,EAAE;QAC3E,OAAO,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;KAClC;IACD,IAAI,cAAc,CAAC,GAAG,GAAG,GAAG,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,KAAK,cAAc,CAAC,GAAG,GAAG,CAAC,EAAE;QAC3E,OAAO,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;KAClC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","file":"proxy.js","sourcesContent":["import { isNumber, isValid } 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';\nimport { updateAutoColumn } from './update-position/update-auto-column';\nimport { getDefaultHeight, getDefaultWidth } from './default-width-height';\nimport { handleTextStick } from '../../stick-text';\nimport type { ColumnInfo, RowInfo } from '../../../ts-types';\nimport { TABLE_EVENT_TYPE } from '../../../core/TABLE_EVENT_TYPE';\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'; // 当前行更新的方向,up表示从下往上挨个更新,down表示从上往下挨个更新\n screenTopRow: number = 0; // 当前屏幕范围内显示的第一行的row number\n totalActualBodyRowCount: number; // 实际表格body部分的行数\n deltaY: number = 0;\n deltaHeight: 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 deltaWidth: 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 this.rowLimit = Math.max(100, Math.ceil((table.tableNoFrameHeight * 2) / table.defaultRowHeight));\n this.colLimit = Math.max(100, Math.ceil((table.tableNoFrameWidth * 2) / table.defaultColWidth));\n } else if (this.table.isAutoRowHeight(table.columnHeaderLevelCount)) {\n // this.rowLimit = 100;\n this.rowLimit = Math.max(100, Math.ceil((table.tableNoFrameHeight * 2) / table.defaultRowHeight));\n } else if (this.table.widthMode === 'autoWidth') {\n // this.colLimit = 100;\n this.colLimit = Math.max(100, Math.ceil((table.tableNoFrameWidth * 2) / table.defaultColWidth));\n } else {\n this.rowLimit = Math.max(200, Math.ceil((table.tableNoFrameHeight * 2) / table.defaultRowHeight));\n this.colLimit = Math.max(100, Math.ceil((table.tableNoFrameWidth * 2) / table.defaultColWidth));\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 if (this.table.options.maintainedColumnCount) {\n this.colLimit = this.table.options.maintainedColumnCount;\n }\n if (this.table.heightMode === 'adaptive') {\n this.rowLimit = this.table.rowCount;\n }\n if (this.table.widthMode === 'adaptive') {\n this.colLimit = this.table.colCount;\n }\n }\n\n get bodyLeftCol(): number {\n return this.table.frozenColCount;\n }\n get bodyTopRow(): number {\n return this.table.frozenRowCount;\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 this.colEnd = this.totalCol; // temp for first screen, will replace in createGroupForFirstScreen()\n const defaultColWidth = this.table.defaultColWidth;\n // const defaultColWidth = getDefaultHeight(this.table);\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 = Math.max(\n 15, // min firstScreenColLimit\n this.bodyLeftCol + Math.min(this.colLimit, Math.ceil(widthLimit / defaultColWidth))\n );\n // this.firstScreenRowLimit = this.bodyBottomRow;\n\n this.colUpdatePos = this.bodyRightCol;\n }\n\n setParamsForRow() {\n // this.bodyTopRow = this.table.frozenRowCount;\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 this.rowEnd = this.totalRow; // temp for first screen, will replace in createGroupForFirstScreen()\n const defaultRowHeight = this.table.defaultRowHeight;\n // const defaultRowHeight = getDefaultWidth(this.table);\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 = Math.max(\n 30, // min firstScreenRowLimit\n this.bodyTopRow + Math.min(this.rowLimit, Math.ceil(heightLimit / defaultRowHeight))\n );\n // this.firstScreenRowLimit = this.bodyBottomRow;\n\n this.rowUpdatePos = this.bodyBottomRow;\n }\n\n refreshRowCount() {\n // this.bodyTopRow = this.table.frozenRowCount;\n this.bodyBottomRow = this.table.rowCount - 1 - this.table.bottomFrozenRowCount;\n const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1); // 渐进加载总row数量\n this.totalActualBodyRowCount = totalActualBodyRowCount;\n this.totalRow = this.rowStart + totalActualBodyRowCount - 1; // 目标渐进完成的row\n\n // this.rowStart = this.bodyTopRow;\n // this.rowEnd = this.totalRow; // temp for first screen, will replace in createGroupForFirstScreen()\n }\n\n refreshColCount() {\n this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;\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\n this.colStart = this.bodyLeftCol;\n this.colEnd = this.totalCol; // temp for first screen, will replace in createGroupForFirstScreen()\n }\n\n resize() {\n const defaultColWidth = this.table.defaultColWidth;\n this.taskColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth) * 1;\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\n const defaultRowHeight = this.table.defaultRowHeight;\n this.taskRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight) * 1;\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 }\n\n 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 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('before: createRow', table.scenegraph.bodyGroup.lastChild.attribute);\n // if (this.isSkipProgress) {\n // await this.progress();\n // } else\n if (this.colUpdatePos <= this.colEnd) {\n // console.log('progress colUpdatePos', this.colUpdatePos);\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 handleTextStick(this.table);\n this.table.scenegraph.updateNextFrame();\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 if (this.table.heightMode !== 'adaptive') {\n computeRowsHeight(this.table, this.currentRow + 1, endRow, false);\n }\n\n this.rowEnd = endRow;\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.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.isPivotChart() ? 'rowHeader' : 'body'; // isHeader\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.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 = col < this.table.rowHeaderLevelCount ? 'rowHeader' : '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.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.rowUpdatePos = this.rowEnd;\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 if (this.table.widthMode !== 'adaptive') {\n computeColsWidth(this.table, this.currentCol + 1, endCol);\n }\n\n this.colEnd = endCol;\n\n // update last merge cell size\n for (let row = 0; row < this.table.rowCount; row++) {\n const cellGroup = this.highPerformanceGetCell(this.currentCol, row);\n if (cellGroup.role === 'cell' && isNumber(cellGroup.mergeStartCol) && cellGroup.mergeStartCol > this.currentCol) {\n this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);\n }\n }\n\n // create column\n if (this.table.frozenRowCount) {\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.frozenRowCount - 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.colUpdatePos = this.colEnd;\n\n // update container group size and border\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n async setY(y: number, isEnd = false) {\n const yLimitTop =\n this.table.getRowsHeight(this.bodyTopRow, this.bodyTopRow + (this.rowEnd - this.rowStart + 1)) / 2;\n const yLimitBottom = this.table.getAllRowsHeight() - yLimitTop;\n\n const screenTop = this.table.getTargetRowAt(y + this.table.scenegraph.colHeaderGroup.attribute.height);\n if (screenTop) {\n this.screenTopRow = screenTop.row;\n }\n\n if (y < yLimitTop && this.rowStart === this.bodyTopRow) {\n // 执行真实body group坐标修改\n this.updateDeltaY(y);\n this.updateBody(y - this.deltaY);\n } else if (y > yLimitBottom && this.rowEnd === this.bodyBottomRow) {\n // 执行真实body group坐标修改\n this.updateDeltaY(y);\n this.updateBody(y - this.deltaY);\n } else if (\n (!this.table.scenegraph.bodyGroup.firstChild ||\n this.table.scenegraph.bodyGroup.firstChild.type !== 'group' ||\n this.table.scenegraph.bodyGroup.firstChild.childrenCount === 0) &&\n (!this.table.scenegraph.rowHeaderGroup.firstChild ||\n this.table.scenegraph.rowHeaderGroup.firstChild.type !== 'group' ||\n this.table.scenegraph.rowHeaderGroup.firstChild.childrenCount === 0)\n ) {\n this.updateDeltaY(y);\n // 兼容异步加载数据promise的情况 childrenCount=0 如果用户立即调用setScrollTop执行dynamicSetY会出错\n this.updateBody(y - this.deltaY);\n } else {\n // 执行动态更新节点\n this.dynamicSetY(y, screenTop, isEnd);\n }\n }\n\n async setX(x: number, isEnd = false) {\n const xLimitLeft =\n this.table.getColsWidth(this.bodyLeftCol, this.bodyLeftCol + (this.colEnd - this.colStart + 1)) / 2;\n const xLimitRight = this.table.getAllColsWidth() - xLimitLeft;\n\n const screenLeft = this.table.getTargetColAt(\n x + this.table.scenegraph.rowHeaderGroup.attribute.width + (this.table.getFrozenColsOffset?.() ?? 0)\n );\n if (screenLeft) {\n this.screenLeftCol = screenLeft.col;\n }\n\n if (x < xLimitLeft && this.colStart === this.bodyLeftCol) {\n // 执行真实body group坐标修改\n this.updateDeltaX(x);\n this.table.scenegraph.setBodyAndColHeaderX(-x + this.deltaX);\n } else if (x > xLimitRight && this.colEnd === this.bodyRightCol) {\n // 执行真实body group坐标修改\n this.updateDeltaX(x);\n this.table.scenegraph.setBodyAndColHeaderX(-x + this.deltaX);\n } else if (\n // 注意判断关系 这里不是 || 而是 &&\n this.table.scenegraph.bodyGroup.firstChild &&\n this.table.scenegraph.bodyGroup.firstChild.type === 'group' &&\n this.table.scenegraph.bodyGroup.firstChild.childrenCount === 0\n ) {\n // 兼容异步加载数据promise的情况 childrenCount=0 如果用户立即调用setScrollLeft执行dynamicSetX会出错\n this.updateDeltaX(x);\n this.table.scenegraph.setBodyAndColHeaderX(-x + this.deltaX);\n } else {\n // 执行动态更新节点\n this.dynamicSetX(x, screenLeft, isEnd);\n }\n }\n\n async dynamicSetY(y: number, screenTop: RowInfo | null, isEnd = false) {\n dynamicSetY(y, screenTop, isEnd, this);\n }\n async dynamicSetX(x: number, screenLeft: ColumnInfo | null, isEnd = false) {\n dynamicSetX(x, screenLeft, isEnd, 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.isAutoRowHeight(this.rowUpdatePos)) {\n computeRowsHeight(this.table, this.rowUpdatePos, distRow, false);\n }\n\n updateRowContent(this.rowUpdatePos, distRow, this);\n\n if (this.table.isAutoRowHeight(this.rowUpdatePos)) {\n // body group\n updateAutoRow(\n this.bodyLeftCol, // colStart\n this.bodyRightCol, // colEnd\n this.rowUpdatePos, // rowStart\n distRow, // rowEnd\n this.table,\n this.rowUpdateDirection,\n true\n );\n // row header group\n updateAutoRow(\n 0, // colStart\n this.table.frozenColCount - 1, // colEnd\n this.rowUpdatePos, // rowStart\n distRow, // rowEnd\n this.table,\n this.rowUpdateDirection,\n true\n );\n // right frozen group\n updateAutoRow(\n this.table.colCount - this.table.rightFrozenColCount, // colStart\n this.table.colCount - 1, // colEnd\n this.rowUpdatePos, // rowStart\n distRow, // rowEnd\n this.table,\n this.rowUpdateDirection,\n true\n );\n }\n\n this.rowUpdatePos = distRow + 1;\n }\n /** 更新底部冻结行的单元格内容 包括两边的角头 */\n updateBottomFrozenCellGroups() {\n const startRow = this.table.rowCount - this.table.bottomFrozenRowCount;\n const endRow = this.table.rowCount - 1;\n if (this.table.isAutoRowHeight(startRow)) {\n computeRowsHeight(this.table, startRow, endRow, false);\n }\n updateRowContent(startRow, endRow, this);\n\n if (this.table.isAutoRowHeight(startRow)) {\n // body group\n updateAutoRow(\n this.bodyLeftCol, // colStart\n this.bodyRightCol, // colEnd\n startRow, // rowStart\n endRow, // rowEnd\n this.table,\n this.rowUpdateDirection\n );\n // row header group\n updateAutoRow(\n 0, // colStart\n this.table.frozenColCount - 1, // colEnd\n startRow, // rowStart\n endRow, // rowEnd\n this.table,\n this.rowUpdateDirection\n );\n // right frozen group\n updateAutoRow(\n this.table.colCount - this.table.rightFrozenColCount, // colStart\n this.table.colCount - 1, // colEnd\n startRow, // rowStart\n endRow, // rowEnd\n this.table,\n this.rowUpdateDirection\n );\n }\n }\n /** 更新底部冻结行的单元格内容 包括两边的角头 */\n updateRightFrozenCellGroups() {\n const startCol = this.table.colCount - this.table.rightFrozenColCount;\n const endCol = this.table.colCount - 1;\n if (this.table.widthMode === 'autoWidth') {\n computeColsWidth(this.table, startCol, endCol, false);\n }\n // console.log('updateRightFrozenCellGroups', startCol, endCol);\n updateColContent(startCol, endCol, this);\n\n if (this.table.isAutoRowHeight(this.rowStart)) {\n // body group\n updateAutoColumn(startCol, endCol, this.table, this.colUpdateDirection);\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 if (this.table.widthMode === 'autoWidth') {\n computeColsWidth(this.table, this.colUpdatePos, distCol);\n }\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.mergeStartCol = undefined;\n cellGroup.mergeStartRow = undefined;\n cellGroup.mergeEndCol = undefined;\n cellGroup.mergeEndRow = undefined;\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 || cellGroup.role !== 'cell') {\n return cellGroup;\n }\n\n const newCellGroup = this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);\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.frozenRowCount && // 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 updateDeltaY(y: number, screenTopY?: number, screenTopRow?: number) {\n if (this.rowStart === this.bodyTopRow) {\n const cellGroup = this.table.scenegraph.highPerformanceGetCell(this.colStart, this.rowStart, true);\n if (cellGroup.role === 'cell') {\n const deltaY = cellGroup.attribute.y;\n this.deltaY = -deltaY;\n }\n } else if (this.rowEnd === this.bodyBottomRow) {\n const cellGroup = this.table.scenegraph.highPerformanceGetCell(this.colStart, this.rowEnd, true);\n if (cellGroup.role === 'cell') {\n // const deltaY =\n // cellGroup.attribute.y +\n // cellGroup.attribute.height -\n // (this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight()) -\n // y;\n const actualRowHeight = this.table.getRowHeight(this.rowEnd); // 获取实际行高\n // 使用实际行高而不是cellGroup.attribute.height\n const deltaY =\n cellGroup.attribute.y +\n actualRowHeight -\n (this.table.getAllRowsHeight() - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight());\n this.deltaY = -deltaY;\n }\n } else if (isValid(screenTopY) && isValid(screenTopRow)) {\n let cellGroup = this.table.scenegraph.highPerformanceGetCell(this.colStart, screenTopRow, true);\n if (cellGroup.role !== 'cell') {\n cellGroup = this.table.scenegraph.highPerformanceGetCell(0, screenTopRow, true);\n }\n const bodyY = y - this.deltaY;\n const distRowYOffset = screenTopY - bodyY; // dist cell 距离表格顶部的位置差\n const currentRowYOffset = cellGroup.attribute.y - bodyY + this.table.getFrozenRowsHeight(); // current cell 距离表格顶部的位置差\n // const deltaY = screenTopY - (cellGroup.attribute.y + );\n this.deltaY = distRowYOffset - currentRowYOffset;\n }\n }\n\n updateDeltaX(x: number, screenLeftX?: number, screenLeftCol?: number) {\n if (this.colStart === this.bodyLeftCol) {\n const colGroup = this.table.scenegraph.getColGroup(this.colStart);\n if (colGroup) {\n const deltaX = colGroup.attribute.x;\n this.deltaX = -deltaX;\n }\n } else if (this.colEnd === this.bodyRightCol) {\n const colGroup = this.table.scenegraph.getColGroup(this.colEnd);\n if (colGroup) {\n const deltaX =\n colGroup.attribute.x +\n colGroup.attribute.width -\n (this.table.getAllColsWidth() -\n (this.table.getFrozenColsContentWidth?.() ?? this.table.getFrozenColsWidth()) -\n (this.table.getRightFrozenColsContentWidth?.() ?? this.table.getRightFrozenColsWidth()));\n this.deltaX = -deltaX;\n }\n } else if (isValid(screenLeftX) && isValid(screenLeftCol)) {\n const colGroup =\n this.table.scenegraph.getColGroup(screenLeftCol) || this.table.scenegraph.getColGroup(screenLeftCol, true);\n // const deltaX = screenLeftX - (colGroup.attribute.x + this.table.getFrozenColsWidth() + this.deltaX);\n // this.deltaX = deltaX + this.deltaX;\n const bodyX = x - this.deltaX;\n const distColXOffset = screenLeftX - bodyX; // dist col 距离表格左侧的位置差\n const currentColXOffset = colGroup.attribute.x - bodyX + this.table.getFrozenColsWidth(); // current col 距离表格左侧的位置差\n this.deltaX = distColXOffset - currentColXOffset;\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 }\n const prev = cacheCellGroup._prev as Group;\n const next = cacheCellGroup._next as Group;\n // cacheCellGroup may have wrong order\n if (cacheCellGroup.row > row && prev && prev.row === cacheCellGroup.row - 1) {\n return getCellByCache(prev, row);\n }\n if (cacheCellGroup.row < row && next && next.row === cacheCellGroup.row + 1) {\n return getCellByCache(next, row);\n }\n return null;\n}\n"]}
@@ -23,6 +23,15 @@ export declare class Scenegraph {
23
23
  leftBottomCornerGroup: Group;
24
24
  rightBottomCornerGroup: Group;
25
25
  componentGroup: Group;
26
+ bodySelectGroup: Group;
27
+ rowHeaderSelectGroup: Group;
28
+ bottomFrozenSelectGroup: Group;
29
+ colHeaderSelectGroup: Group;
30
+ rightFrozenSelectGroup: Group;
31
+ rightTopCornerSelectGroup: Group;
32
+ leftBottomCornerSelectGroup: Group;
33
+ rightBottomCornerSelectGroup: Group;
34
+ cornerHeaderSelectGroup: Group;
26
35
  selectedRangeComponents: Map<string, {
27
36
  rect: IRect;
28
37
  fillhandle?: IRect;
@@ -153,12 +162,16 @@ export declare class Scenegraph {
153
162
  updateCellLayoutWidthCertainWidth(columnGroup: Group, detaRow: number, col: number): boolean;
154
163
  updateHeaderPosition(updateColStart: number, updateColEnd: number, updateRowStart: number, updateRowEnd: number, moveType: 'column' | 'row'): void;
155
164
  updateContainerAttrWidthAndX(): void;
165
+ setFrozenColsScrollLeft(left: number): void;
166
+ setRightFrozenColsScrollLeft(left: number): void;
156
167
  updateContainerAttrHeightAndY(): void;
157
168
  updateContainer(updateConfig?: {
158
169
  async?: boolean;
159
170
  needUpdateCellY?: boolean;
160
171
  }): void;
161
172
  updateContainerSync(needUpdateCellY?: boolean): void;
173
+ syncSelectOverlayGroups(): void;
174
+ getSelectOverlayGroup(selectRangeType: CellSubLocation): Group;
162
175
  updateCellContentWhileResize(col: number, row: number): void;
163
176
  createFrameBorder(): void;
164
177
  getResizeColAt(abstractX: number, abstractY: number, cellGroup?: Group): {
@@ -175,7 +175,7 @@ export class Scenegraph {
175
175
  }));
176
176
  }
177
177
  clearCells() {
178
- var _a, _b;
178
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
179
179
  this.table.animationManager.clear(), (this.table.isPivotChart() || this.table._hasCustomRenderOrLayout()) && this.stage.pluginService.findPluginsByName("poptipForText").forEach((plugin => {
180
180
  plugin.deactivate(this.stage.pluginService);
181
181
  })), this.clear = !0, this.hasFrozen = !1, this.mergeMap.clear(), this.colHeaderGroup.clear(),
@@ -184,7 +184,12 @@ export class Scenegraph {
184
184
  delete this.bodyGroup.border, this.bottomFrozenGroup.clear(), delete this.bottomFrozenGroup.border,
185
185
  this.rightFrozenGroup.clear(), delete this.rightFrozenGroup.border, this.rightTopCornerGroup.clear(),
186
186
  delete this.rightTopCornerGroup.border, this.rightBottomCornerGroup.clear(), delete this.rightBottomCornerGroup.border,
187
- this.leftBottomCornerGroup.clear(), delete this.leftBottomCornerGroup.border, this.colHeaderGroup.setAttributes({
187
+ this.leftBottomCornerGroup.clear(), delete this.leftBottomCornerGroup.border, null === (_a = this.bodySelectGroup) || void 0 === _a || _a.clear(),
188
+ null === (_b = this.rowHeaderSelectGroup) || void 0 === _b || _b.clear(), null === (_c = this.bottomFrozenSelectGroup) || void 0 === _c || _c.clear(),
189
+ null === (_d = this.colHeaderSelectGroup) || void 0 === _d || _d.clear(), null === (_e = this.rightFrozenSelectGroup) || void 0 === _e || _e.clear(),
190
+ null === (_f = this.rightTopCornerSelectGroup) || void 0 === _f || _f.clear(), null === (_g = this.leftBottomCornerSelectGroup) || void 0 === _g || _g.clear(),
191
+ null === (_h = this.rightBottomCornerSelectGroup) || void 0 === _h || _h.clear(),
192
+ null === (_j = this.cornerHeaderSelectGroup) || void 0 === _j || _j.clear(), this.colHeaderGroup.setAttributes({
188
193
  x: 0,
189
194
  y: 0,
190
195
  width: 0,
@@ -232,14 +237,64 @@ export class Scenegraph {
232
237
  width: 0,
233
238
  height: 0,
234
239
  visible: !1
240
+ }), null === (_k = this.bodySelectGroup) || void 0 === _k || _k.setAttributes({
241
+ x: 0,
242
+ y: 0,
243
+ width: 0,
244
+ height: 0
245
+ }), null === (_l = this.rowHeaderSelectGroup) || void 0 === _l || _l.setAttributes({
246
+ x: 0,
247
+ y: 0,
248
+ width: 0,
249
+ height: 0
250
+ }), null === (_m = this.bottomFrozenSelectGroup) || void 0 === _m || _m.setAttributes({
251
+ x: 0,
252
+ y: 0,
253
+ width: 0,
254
+ height: 0,
255
+ visible: !1
256
+ }), null === (_o = this.colHeaderSelectGroup) || void 0 === _o || _o.setAttributes({
257
+ x: 0,
258
+ y: 0,
259
+ width: 0,
260
+ height: 0
261
+ }), null === (_p = this.rightFrozenSelectGroup) || void 0 === _p || _p.setAttributes({
262
+ x: 0,
263
+ y: 0,
264
+ width: 0,
265
+ height: 0,
266
+ visible: !1
267
+ }), null === (_q = this.rightTopCornerSelectGroup) || void 0 === _q || _q.setAttributes({
268
+ x: 0,
269
+ y: 0,
270
+ width: 0,
271
+ height: 0,
272
+ visible: !1
273
+ }), null === (_r = this.leftBottomCornerSelectGroup) || void 0 === _r || _r.setAttributes({
274
+ x: 0,
275
+ y: 0,
276
+ width: 0,
277
+ height: 0,
278
+ visible: !1
279
+ }), null === (_s = this.rightBottomCornerSelectGroup) || void 0 === _s || _s.setAttributes({
280
+ x: 0,
281
+ y: 0,
282
+ width: 0,
283
+ height: 0,
284
+ visible: !1
285
+ }), null === (_t = this.cornerHeaderSelectGroup) || void 0 === _t || _t.setAttributes({
286
+ x: 0,
287
+ y: 0,
288
+ width: 0,
289
+ height: 0
235
290
  }), this.tableGroup.setAttributes({
236
291
  x: this.table.tableX,
237
292
  y: this.table.tableY,
238
293
  width: 0,
239
294
  height: 0
240
295
  }), this.tableGroup.border && (this.tableGroup.parent.removeChild(this.tableGroup.border),
241
- delete this.tableGroup.border), null === (_a = this.proxy) || void 0 === _a || _a.release(),
242
- null === (_b = this.table.reactCustomLayout) || void 0 === _b || _b.clearCache();
296
+ delete this.tableGroup.border), null === (_u = this.proxy) || void 0 === _u || _u.release(),
297
+ null === (_v = this.table.reactCustomLayout) || void 0 === _v || _v.clearCache();
243
298
  }
244
299
  updateStageBackground() {
245
300
  this.stage.background = this.table.theme.underlayBackgroundColor, this.stage.renderNextFrame();
@@ -644,23 +699,39 @@ export class Scenegraph {
644
699
  0 === y && firstBodyCell && firstBodyCell.row === this.table.frozenRowCount && firstBodyCell.attribute.y + y < 0 ? y = -firstBodyCell.attribute.y : lastBodyCell && this.table.tableNoFrameHeight < this.table.getAllRowsHeight() && lastBodyCell.row === this.table.rowCount - this.table.bottomFrozenRowCount - 1 && lastBodyCell.attribute.y + this.table.getRowHeight(lastBodyCell.row) + y < this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() && (y = this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() - lastBodyCell.attribute.y - this.table.getRowHeight(lastBodyCell.row)),
645
700
  this.colHeaderGroup.attribute.height + y !== this.bodyGroup.attribute.y && (this.bodyGroup.setAttribute("y", this.colHeaderGroup.attribute.height + y),
646
701
  this.rowHeaderGroup.setAttribute("y", this.cornerHeaderGroup.attribute.height + y),
647
- this.table.rightFrozenColCount > 0 && this.rightFrozenGroup.setAttribute("y", this.rightTopCornerGroup.attribute.height + y),
702
+ this.bodySelectGroup.setAttribute("y", this.bodyGroup.attribute.y), this.rowHeaderSelectGroup.setAttribute("y", this.rowHeaderGroup.attribute.y),
703
+ this.colHeaderSelectGroup.setAttribute("y", this.colHeaderGroup.attribute.y), this.cornerHeaderSelectGroup.setAttribute("y", this.cornerHeaderGroup.attribute.y),
704
+ this.table.rightFrozenColCount > 0 && (this.rightFrozenGroup.setAttribute("y", this.rightTopCornerGroup.attribute.height + y),
705
+ this.rightFrozenSelectGroup.setAttribute("y", this.rightFrozenGroup.attribute.y),
706
+ this.rightTopCornerSelectGroup.setAttribute("y", this.rightTopCornerGroup.attribute.y)),
707
+ this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenSelectGroup.setAttribute("y", this.bottomFrozenGroup.attribute.y),
708
+ this.leftBottomCornerSelectGroup.setAttribute("y", this.leftBottomCornerGroup.attribute.y)),
709
+ this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0 && this.rightBottomCornerSelectGroup.setAttribute("y", this.rightBottomCornerGroup.attribute.y),
648
710
  this.updateNextFrame());
649
711
  }
650
712
  setBodyAndColHeaderX(x) {
651
713
  const firstBodyCol = this.bodyGroup.firstChild, lastBodyCol = this.bodyGroup.lastChild;
652
714
  0 === x && firstBodyCol && firstBodyCol.col === this.table.frozenColCount && firstBodyCol.attribute.x + x < 0 ? x = -firstBodyCol.attribute.x : lastBodyCol && this.table.tableNoFrameWidth < this.table.getAllColsWidth() && lastBodyCol.col === this.table.colCount - this.table.rightFrozenColCount - 1 && lastBodyCol.attribute.x + lastBodyCol.attribute.width + x < this.table.tableNoFrameWidth - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth() && (x = this.table.tableNoFrameWidth - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth() - lastBodyCol.attribute.x - lastBodyCol.attribute.width),
653
715
  this.table.getFrozenColsWidth() + x !== this.bodyGroup.attribute.x && (this.bodyGroup.setAttribute("x", this.table.getFrozenColsWidth() + x),
654
- this.colHeaderGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.table.bottomFrozenRowCount > 0 && this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth() + x),
716
+ this.colHeaderGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.bodySelectGroup.setAttribute("x", this.bodyGroup.attribute.x),
717
+ this.colHeaderSelectGroup.setAttribute("x", this.colHeaderGroup.attribute.x), this.rowHeaderSelectGroup.setAttribute("x", this.rowHeaderGroup.attribute.x),
718
+ this.cornerHeaderSelectGroup.setAttribute("x", this.cornerHeaderGroup.attribute.x),
719
+ this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth() + x),
720
+ this.bottomFrozenSelectGroup.setAttribute("x", this.bottomFrozenGroup.attribute.x),
721
+ this.leftBottomCornerSelectGroup.setAttribute("x", this.leftBottomCornerGroup.attribute.x)),
722
+ this.table.rightFrozenColCount > 0 && (this.rightFrozenSelectGroup.setAttribute("x", this.rightFrozenGroup.attribute.x),
723
+ this.rightTopCornerSelectGroup.setAttribute("x", this.rightTopCornerGroup.attribute.x)),
724
+ this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0 && this.rightBottomCornerSelectGroup.setAttribute("x", this.rightBottomCornerGroup.attribute.x),
655
725
  this.updateNextFrame());
656
726
  }
657
727
  afterScenegraphCreated() {
658
- var _a;
728
+ var _a, _b;
659
729
  this.isPivot || this.table.transpose ? this.table.options.frozenColCount ? this.component.setFrozenColumnShadow(this.table.frozenColCount - 1) : this.table.options.rightFrozenColCount ? this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount) : this.component.setFrozenColumnShadow(-1) : (this.component.setFrozenColumnShadow(this.table.frozenColCount - 1),
660
730
  this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount)),
661
731
  this.table.stateManager.checkFrozen(), this.updateContainer(), this.createFrameBorder(),
662
732
  this.updateBorderSizeAndPosition(), this.component.updateScrollBar(), handleTextStick(this.table),
663
733
  this.table.options.animationAppear && dealWithAnimationAppear(this.table), !1 === (null === (_a = this.table.options.menu) || void 0 === _a ? void 0 : _a.contextMenuWorkOnlyCell) && this.canvasShowMenu(),
734
+ (null === (_b = this.table.stateManager.select.ranges) || void 0 === _b ? void 0 : _b.length) && this.recreateAllSelectRangeComponents(),
664
735
  this.updateNextFrame();
665
736
  }
666
737
  dealWidthMode() {
@@ -780,21 +851,34 @@ export class Scenegraph {
780
851
  moveHeaderPosition(updateColStart, updateColEnd, updateRowStart, updateRowEnd, moveType, this.table);
781
852
  }
782
853
  updateContainerAttrWidthAndX() {
783
- var _a, _b, _c;
784
- const cornerX = updateContainerChildrenX(this.cornerHeaderGroup, 0), rowHeaderX = updateContainerChildrenX(this.rowHeaderGroup, 0), colHeaderX = this.colHeaderGroup.hasChildNodes() && this.colHeaderGroup.firstChild ? updateContainerChildrenX(this.colHeaderGroup, this.colHeaderGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_a = this.table.frozenColCount) && void 0 !== _a ? _a : 0, this.colHeaderGroup.firstChild.col - 1) : 0) : 0, bodyX = this.bodyGroup.hasChildNodes() && this.bodyGroup.firstChild ? updateContainerChildrenX(this.bodyGroup, this.bodyGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_b = this.table.frozenColCount) && void 0 !== _b ? _b : 0, this.bodyGroup.firstChild.col - 1) : 0) : 0, rightX = updateContainerChildrenX(this.rightFrozenGroup.childrenCount > 0 ? this.rightFrozenGroup : this.rightTopCornerGroup, 0);
785
- this.bottomFrozenGroup.hasChildNodes() && this.bottomFrozenGroup.firstChild && updateContainerChildrenX(this.bottomFrozenGroup, this.bottomFrozenGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_c = this.table.frozenColCount) && void 0 !== _c ? _c : 0, this.bottomFrozenGroup.firstChild.col - 1) : 0),
786
- updateContainerChildrenX(this.leftBottomCornerGroup, 0), updateContainerChildrenX(this.rightTopCornerGroup, 0),
787
- updateContainerChildrenX(this.rightBottomCornerGroup, 0), this.cornerHeaderGroup.setDeltaWidth(cornerX - this.cornerHeaderGroup.attribute.width),
788
- this.leftBottomCornerGroup.setDeltaWidth(cornerX - this.leftBottomCornerGroup.attribute.width),
854
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
855
+ const frozenStartX = -(null !== (_c = null === (_b = (_a = this.table).getFrozenColsScrollLeft) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0), frozenViewportWidth = this.table.getFrozenColsWidth(), rightFrozenStartX = -this.table.getRightFrozenColsOffset() + (null !== (_f = null === (_e = (_d = this.table).getRightFrozenColsScrollLeft) || void 0 === _e ? void 0 : _e.call(_d)) && void 0 !== _f ? _f : 0), rightFrozenContentWidth = this.table.getRightFrozenColsContentWidth();
856
+ updateContainerChildrenX(this.cornerHeaderGroup, frozenStartX), updateContainerChildrenX(this.rowHeaderGroup, frozenStartX);
857
+ const colHeaderX = this.colHeaderGroup.hasChildNodes() && this.colHeaderGroup.firstChild ? updateContainerChildrenX(this.colHeaderGroup, this.colHeaderGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_g = this.table.frozenColCount) && void 0 !== _g ? _g : 0, this.colHeaderGroup.firstChild.col - 1) : 0) : 0, bodyX = this.bodyGroup.hasChildNodes() && this.bodyGroup.firstChild ? updateContainerChildrenX(this.bodyGroup, this.bodyGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_h = this.table.frozenColCount) && void 0 !== _h ? _h : 0, this.bodyGroup.firstChild.col - 1) : 0) : 0;
858
+ this.rightFrozenGroup.childrenCount > 0 && updateContainerChildrenX(this.rightFrozenGroup, rightFrozenStartX),
859
+ this.bottomFrozenGroup.hasChildNodes() && this.bottomFrozenGroup.firstChild && updateContainerChildrenX(this.bottomFrozenGroup, this.bottomFrozenGroup.firstChild.col > 0 ? this.table.getColsWidth(null !== (_j = this.table.frozenColCount) && void 0 !== _j ? _j : 0, this.bottomFrozenGroup.firstChild.col - 1) : 0),
860
+ updateContainerChildrenX(this.leftBottomCornerGroup, frozenStartX), updateContainerChildrenX(this.rightTopCornerGroup, rightFrozenStartX),
861
+ updateContainerChildrenX(this.rightBottomCornerGroup, rightFrozenStartX), this.cornerHeaderGroup.setDeltaWidth(frozenViewportWidth - this.cornerHeaderGroup.attribute.width),
862
+ this.leftBottomCornerGroup.setDeltaWidth(frozenViewportWidth - this.leftBottomCornerGroup.attribute.width),
789
863
  this.colHeaderGroup.setDeltaWidth(colHeaderX - this.colHeaderGroup.attribute.width),
790
- this.rowHeaderGroup.setDeltaWidth(rowHeaderX - this.rowHeaderGroup.attribute.width),
864
+ this.rowHeaderGroup.setDeltaWidth(frozenViewportWidth - this.rowHeaderGroup.attribute.width),
791
865
  this.bottomFrozenGroup.setDeltaWidth(colHeaderX - this.bottomFrozenGroup.attribute.width),
792
- this.rightFrozenGroup.setDeltaWidth(rightX - this.rightFrozenGroup.attribute.width),
793
- this.rightTopCornerGroup.setDeltaWidth(rightX - this.rightTopCornerGroup.attribute.width),
794
- this.rightBottomCornerGroup.setDeltaWidth(rightX - this.rightBottomCornerGroup.attribute.width),
866
+ this.rightFrozenGroup.setDeltaWidth(rightFrozenContentWidth - this.rightFrozenGroup.attribute.width),
867
+ this.rightTopCornerGroup.setDeltaWidth(rightFrozenContentWidth - this.rightTopCornerGroup.attribute.width),
868
+ this.rightBottomCornerGroup.setDeltaWidth(rightFrozenContentWidth - this.rightBottomCornerGroup.attribute.width),
795
869
  this.bodyGroup.setDeltaWidth(bodyX - this.bodyGroup.attribute.width), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width),
796
870
  this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth()), this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width);
797
871
  }
872
+ setFrozenColsScrollLeft(left) {
873
+ const frozenStartX = -left;
874
+ updateContainerChildrenX(this.cornerHeaderGroup, frozenStartX), updateContainerChildrenX(this.rowHeaderGroup, frozenStartX),
875
+ updateContainerChildrenX(this.leftBottomCornerGroup, frozenStartX), this.updateNextFrame();
876
+ }
877
+ setRightFrozenColsScrollLeft(left) {
878
+ const rightStartX = -this.table.getRightFrozenColsOffset() + left;
879
+ updateContainerChildrenX(this.rightFrozenGroup, rightStartX), updateContainerChildrenX(this.rightTopCornerGroup, rightStartX),
880
+ updateContainerChildrenX(this.rightBottomCornerGroup, rightStartX), this.updateNextFrame();
881
+ }
798
882
  updateContainerAttrHeightAndY() {
799
883
  var _a, _b, _c;
800
884
  for (let i = 0; i < this.cornerHeaderGroup.children.length; i++) updateContainerChildrenY(this.cornerHeaderGroup.children[i], 0);
@@ -821,7 +905,90 @@ export class Scenegraph {
821
905
  updateContainerSync(needUpdateCellY = !1) {
822
906
  this._needUpdateContainer && (this._needUpdateContainer = !1, this.updateContainerAttrWidthAndX(),
823
907
  needUpdateCellY && this.updateContainerAttrHeightAndY(), this.updateTableSize(),
824
- this.component.updateScrollBar(), this.updateNextFrame());
908
+ this.syncSelectOverlayGroups(), this.component.updateScrollBar(), this.updateNextFrame());
909
+ }
910
+ syncSelectOverlayGroups() {
911
+ this.bodySelectGroup.setAttributes({
912
+ x: this.bodyGroup.attribute.x,
913
+ y: this.bodyGroup.attribute.y,
914
+ width: this.bodyGroup.attribute.width,
915
+ height: this.bodyGroup.attribute.height
916
+ }), this.rowHeaderSelectGroup.setAttributes({
917
+ x: this.rowHeaderGroup.attribute.x,
918
+ y: this.rowHeaderGroup.attribute.y,
919
+ width: this.rowHeaderGroup.attribute.width,
920
+ height: this.rowHeaderGroup.attribute.height
921
+ }), this.colHeaderSelectGroup.setAttributes({
922
+ x: this.colHeaderGroup.attribute.x,
923
+ y: this.colHeaderGroup.attribute.y,
924
+ width: this.colHeaderGroup.attribute.width,
925
+ height: this.colHeaderGroup.attribute.height
926
+ }), this.cornerHeaderSelectGroup.setAttributes({
927
+ x: this.cornerHeaderGroup.attribute.x,
928
+ y: this.cornerHeaderGroup.attribute.y,
929
+ width: this.cornerHeaderGroup.attribute.width,
930
+ height: this.cornerHeaderGroup.attribute.height
931
+ }), this.rightFrozenSelectGroup.setAttributes({
932
+ x: this.rightFrozenGroup.attribute.x,
933
+ y: this.rightFrozenGroup.attribute.y,
934
+ width: this.rightFrozenGroup.attribute.width,
935
+ height: this.rightFrozenGroup.attribute.height,
936
+ visible: this.rightFrozenGroup.attribute.visible
937
+ }), this.bottomFrozenSelectGroup.setAttributes({
938
+ x: this.bottomFrozenGroup.attribute.x,
939
+ y: this.bottomFrozenGroup.attribute.y,
940
+ width: this.bottomFrozenGroup.attribute.width,
941
+ height: this.bottomFrozenGroup.attribute.height,
942
+ visible: this.bottomFrozenGroup.attribute.visible
943
+ }), this.rightTopCornerSelectGroup.setAttributes({
944
+ x: this.rightTopCornerGroup.attribute.x,
945
+ y: this.rightTopCornerGroup.attribute.y,
946
+ width: this.rightTopCornerGroup.attribute.width,
947
+ height: this.rightTopCornerGroup.attribute.height,
948
+ visible: this.rightTopCornerGroup.attribute.visible
949
+ }), this.leftBottomCornerSelectGroup.setAttributes({
950
+ x: this.leftBottomCornerGroup.attribute.x,
951
+ y: this.leftBottomCornerGroup.attribute.y,
952
+ width: this.leftBottomCornerGroup.attribute.width,
953
+ height: this.leftBottomCornerGroup.attribute.height,
954
+ visible: this.leftBottomCornerGroup.attribute.visible
955
+ }), this.rightBottomCornerSelectGroup.setAttributes({
956
+ x: this.rightBottomCornerGroup.attribute.x,
957
+ y: this.rightBottomCornerGroup.attribute.y,
958
+ width: this.rightBottomCornerGroup.attribute.width,
959
+ height: this.rightBottomCornerGroup.attribute.height,
960
+ visible: this.rightBottomCornerGroup.attribute.visible
961
+ });
962
+ }
963
+ getSelectOverlayGroup(selectRangeType) {
964
+ switch (selectRangeType) {
965
+ case "body":
966
+ return this.bodySelectGroup;
967
+
968
+ case "rowHeader":
969
+ return this.rowHeaderSelectGroup;
970
+
971
+ case "bottomFrozen":
972
+ return this.bottomFrozenSelectGroup;
973
+
974
+ case "columnHeader":
975
+ return this.colHeaderSelectGroup;
976
+
977
+ case "rightFrozen":
978
+ return this.rightFrozenSelectGroup;
979
+
980
+ case "rightTopCorner":
981
+ return this.rightTopCornerSelectGroup;
982
+
983
+ case "leftBottomCorner":
984
+ return this.leftBottomCornerSelectGroup;
985
+
986
+ case "rightBottomCorner":
987
+ return this.rightBottomCornerSelectGroup;
988
+
989
+ default:
990
+ return this.cornerHeaderSelectGroup;
991
+ }
825
992
  }
826
993
  updateCellContentWhileResize(col, row) {
827
994
  var _a;