@visactor/vtable 1.6.1 → 1.6.2-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/cjs/core/BaseTable.js +1 -1
  2. package/cjs/core/BaseTable.js.map +1 -1
  3. package/cjs/index.d.ts +1 -1
  4. package/cjs/index.js +1 -1
  5. package/cjs/index.js.map +1 -1
  6. package/cjs/scenegraph/group-creater/progress/proxy.js +6 -3
  7. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  8. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +2 -1
  9. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
  10. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +8 -6
  11. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  12. package/cjs/ts-types/base-table.d.ts +7 -1
  13. package/cjs/ts-types/base-table.js.map +1 -1
  14. package/cjs/vrender.js.map +1 -1
  15. package/dist/vtable.js +19 -14
  16. package/dist/vtable.min.js +1 -1
  17. package/es/core/BaseTable.js +1 -1
  18. package/es/core/BaseTable.js.map +1 -1
  19. package/es/index.d.ts +1 -1
  20. package/es/index.js +1 -1
  21. package/es/index.js.map +1 -1
  22. package/es/scenegraph/group-creater/progress/proxy.js +6 -3
  23. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  24. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +2 -1
  25. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
  26. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +8 -6
  27. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  28. package/es/ts-types/base-table.d.ts +7 -1
  29. package/es/ts-types/base-table.js.map +1 -1
  30. package/es/vrender.js.map +1 -1
  31. package/package.json +4 -4
package/cjs/index.d.ts CHANGED
@@ -20,7 +20,7 @@ export { getDataCellPath } from './tools/get-data-path';
20
20
  export * from './render/jsx';
21
21
  export { getTargetCell } from './event/util';
22
22
  import * as VRender from './vrender';
23
- export declare const version = "1.6.1";
23
+ export declare const version = "1.6.2-alpha.2";
24
24
  export { TYPES, core, ListTable, ListTableSimple, ListTableConstructorOptions, PivotTable, PivotTableSimple, PivotTableConstructorOptions, PivotChartConstructorOptions, PivotChart, IHeaderTreeDefine, IDimension, IIndicator, ITitleDefine, ICornerDefine, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, themes, data, MousePointerCellEvent, getIcons, clearGlobal, register, DataStatistics, CustomLayout, updateCell, renderChart, graphicUtil, setCustomAlphabetCharSet, restoreMeasureText, VRender };
25
25
  declare function getIcons(): {
26
26
  [key: string]: TYPES.ColumnIconOption;
package/cjs/index.js CHANGED
@@ -173,7 +173,7 @@ function clearGlobal() {
173
173
  register.clearAll();
174
174
  }
175
175
 
176
- exports.VRender = VRender, exports.version = "1.6.1", exports.getIcons = getIcons,
176
+ exports.VRender = VRender, exports.version = "1.6.2-alpha.2", exports.getIcons = getIcons,
177
177
  exports.clearGlobal = clearGlobal, TYPES.AggregationType, __exportStar(require("./components"), exports),
178
178
  __exportStar(require("./scenegraph/group-creater/cell-type"), exports);
179
179
 
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uCAA4D;AAuG1D,4FAvGO,qBAAW,OAuGP;AAtGb,IAAA,4BAAkB,GAAE,CAAC;AAErB,kDAAoC;AA4DlC,sBAAK;AA3DP,6CAA+B;AA4D7B,oBAAI;AA3DN,6CAA+B;AAqF7B,oBAAI;AApFN,+CAAiC;AACjC,qDAAuC;AAwFrC,4BAAQ;AAvFV,iDAAmC;AAiFjC,wBAAM;AAhFR,yEAA2D;AA0FzD,wCAAc;AApEhB,mDAA4D;AAkC1D,0FAlCuB,4BAAS,OAkCvB;AAjCX,yDAAqD;AAkCnD,gGAlCO,kCAAe,OAkCP;AAhCjB,qDAA+D;AAkC7D,2FAlCwB,8BAAU,OAkCxB;AAjCZ,2DAAuD;AAkCrD,iGAlCO,oCAAgB,OAkCP;AAjClB,6CAA0C;AAoCxC,2FApCO,uBAAU,OAoCP;AAlCZ,8DAAgD;AA8D9C,oCAAY;AA5Dd,wEAAoE;AA6DlE,2FA7DO,wBAAU,OA6DP;AA5DZ,gGAAqF;AA6DnF,4FA7DO,iCAAW,OA6DP;AA5Db,kEAA+F;AA+D7F,mGA/DO,iCAAkB,OA+DP;AADlB,yGA9D2B,uCAAwB,OA8D3B;AAzD1B,uDAAwD;AAA/C,gHAAA,eAAe,OAAA;AACxB,+CAA6B;AAC7B,qCAA6C;AAApC,qGAAA,aAAa,OAAA;AAGtB,mDAAqC;AAsDnC,0BAAO;AApDI,QAAA,OAAO,GAAG,OAAO,CAAC;AAwD/B,SAAS,QAAQ;IAGf,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC;AACrB,CAAC;AAtBC,4BAAQ;AAwBV,SAAS,WAAW;IAClB,QAAQ,CAAC,QAAQ,EAAE,CAAC;AAGtB,CAAC;AA3BC,kCAAW;AA4Bb,KAAK,CAAC,eAAe,CAAC;AAEtB,+CAA6B;AAC7B,uEAAqD;AAErD,4DAA2D;AAAlD,oHAAA,gBAAgB,OAAA;AACzB,wFAA+G;AAAtG,gIAAA,sBAAsB,OAAA;AAAE,gIAAA,sBAAsB,OAAA","file":"index.js","sourcesContent":["/* eslint-disable sort-imports */\nimport { graphicUtil, registerForVrender } from './vrender';\nregisterForVrender();\n\nimport * as TYPES from './ts-types';\nimport * as core from './core';\nimport * as data from './data';\nimport * as icons from './icons';\nimport * as register from './register';\nimport * as themes from './themes';\nimport * as DataStatistics from './dataset/DataStatistics';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n ListTableConstructorOptions,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n TextAlignType,\n TextBaselineType\n} from './ts-types';\nimport { ListTableAll as ListTable } from './ListTable-all';\nimport { ListTableSimple } from './ListTable-simple';\n// import { PivotTable } from './PivotTable';\nimport { PivotTableAll as PivotTable } from './PivotTable-all';\nimport { PivotTableSimple } from './PivotTable-simple';\nimport { PivotChart } from './PivotChart';\nimport type { MousePointerCellEvent } from './ts-types/events';\nimport * as CustomLayout from './render/layout';\n\nimport { updateCell } from './scenegraph/group-creater/cell-helper';\nimport { renderChart } from './scenegraph/graphic/contributions/chart-render-helper';\nimport { restoreMeasureText, setCustomAlphabetCharSet } from './scenegraph/utils/text-measure';\n\n// import { container, loadCanvasPicker } from '@src/vrender';\n// loadCanvasPicker(container);\n\nexport { getDataCellPath } from './tools/get-data-path';\nexport * from './render/jsx';\nexport { getTargetCell } from './event/util';\n\n// export * as VRender from './vrender';\nimport * as VRender from './vrender';\n\nexport const version = \"1.6.1\";\n/**\n * @namespace VTable\n */\nexport {\n /**\n * Types\n * @namespace VTable.TYPES\n */\n TYPES,\n core,\n ListTable,\n ListTableSimple,\n ListTableConstructorOptions,\n PivotTable,\n PivotTableSimple,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n PivotChart,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n themes,\n data,\n MousePointerCellEvent,\n getIcons,\n clearGlobal,\n //plugin registers\n register,\n /**\n * 暂不推荐使用\n */\n DataStatistics,\n CustomLayout,\n updateCell,\n renderChart,\n graphicUtil,\n setCustomAlphabetCharSet,\n restoreMeasureText,\n VRender\n};\n\n/** @private */\nfunction getIcons(): {\n [key: string]: TYPES.ColumnIconOption;\n} {\n return icons.get();\n}\n/** 清理内部的全局变量 如注册的icon theme等 以及共享的header column类实例 */\nfunction clearGlobal() {\n register.clearAll();\n // headers.type.clearGlobal();\n // columns.type.clearGlobal();\n}\nTYPES.AggregationType;\n\nexport * from './components';\nexport * from './scenegraph/group-creater/cell-type';\n\nexport { TABLE_EVENT_TYPE } from './core/TABLE_EVENT_TYPE';\nexport { PIVOT_CHART_EVENT_TYPE, PIVOT_TABLE_EVENT_TYPE } from './ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE';\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uCAA4D;AAuG1D,4FAvGO,qBAAW,OAuGP;AAtGb,IAAA,4BAAkB,GAAE,CAAC;AAErB,kDAAoC;AA4DlC,sBAAK;AA3DP,6CAA+B;AA4D7B,oBAAI;AA3DN,6CAA+B;AAqF7B,oBAAI;AApFN,+CAAiC;AACjC,qDAAuC;AAwFrC,4BAAQ;AAvFV,iDAAmC;AAiFjC,wBAAM;AAhFR,yEAA2D;AA0FzD,wCAAc;AApEhB,mDAA4D;AAkC1D,0FAlCuB,4BAAS,OAkCvB;AAjCX,yDAAqD;AAkCnD,gGAlCO,kCAAe,OAkCP;AAhCjB,qDAA+D;AAkC7D,2FAlCwB,8BAAU,OAkCxB;AAjCZ,2DAAuD;AAkCrD,iGAlCO,oCAAgB,OAkCP;AAjClB,6CAA0C;AAoCxC,2FApCO,uBAAU,OAoCP;AAlCZ,8DAAgD;AA8D9C,oCAAY;AA5Dd,wEAAoE;AA6DlE,2FA7DO,wBAAU,OA6DP;AA5DZ,gGAAqF;AA6DnF,4FA7DO,iCAAW,OA6DP;AA5Db,kEAA+F;AA+D7F,mGA/DO,iCAAkB,OA+DP;AADlB,yGA9D2B,uCAAwB,OA8D3B;AAzD1B,uDAAwD;AAA/C,gHAAA,eAAe,OAAA;AACxB,+CAA6B;AAC7B,qCAA6C;AAApC,qGAAA,aAAa,OAAA;AAGtB,mDAAqC;AAsDnC,0BAAO;AApDI,QAAA,OAAO,GAAG,eAAe,CAAC;AAwDvC,SAAS,QAAQ;IAGf,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC;AACrB,CAAC;AAtBC,4BAAQ;AAwBV,SAAS,WAAW;IAClB,QAAQ,CAAC,QAAQ,EAAE,CAAC;AAGtB,CAAC;AA3BC,kCAAW;AA4Bb,KAAK,CAAC,eAAe,CAAC;AAEtB,+CAA6B;AAC7B,uEAAqD;AAErD,4DAA2D;AAAlD,oHAAA,gBAAgB,OAAA;AACzB,wFAA+G;AAAtG,gIAAA,sBAAsB,OAAA;AAAE,gIAAA,sBAAsB,OAAA","file":"index.js","sourcesContent":["/* eslint-disable sort-imports */\nimport { graphicUtil, registerForVrender } from './vrender';\nregisterForVrender();\n\nimport * as TYPES from './ts-types';\nimport * as core from './core';\nimport * as data from './data';\nimport * as icons from './icons';\nimport * as register from './register';\nimport * as themes from './themes';\nimport * as DataStatistics from './dataset/DataStatistics';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n ListTableConstructorOptions,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n TextAlignType,\n TextBaselineType\n} from './ts-types';\nimport { ListTableAll as ListTable } from './ListTable-all';\nimport { ListTableSimple } from './ListTable-simple';\n// import { PivotTable } from './PivotTable';\nimport { PivotTableAll as PivotTable } from './PivotTable-all';\nimport { PivotTableSimple } from './PivotTable-simple';\nimport { PivotChart } from './PivotChart';\nimport type { MousePointerCellEvent } from './ts-types/events';\nimport * as CustomLayout from './render/layout';\n\nimport { updateCell } from './scenegraph/group-creater/cell-helper';\nimport { renderChart } from './scenegraph/graphic/contributions/chart-render-helper';\nimport { restoreMeasureText, setCustomAlphabetCharSet } from './scenegraph/utils/text-measure';\n\n// import { container, loadCanvasPicker } from '@src/vrender';\n// loadCanvasPicker(container);\n\nexport { getDataCellPath } from './tools/get-data-path';\nexport * from './render/jsx';\nexport { getTargetCell } from './event/util';\n\n// export * as VRender from './vrender';\nimport * as VRender from './vrender';\n\nexport const version = \"1.6.2-alpha.2\";\n/**\n * @namespace VTable\n */\nexport {\n /**\n * Types\n * @namespace VTable.TYPES\n */\n TYPES,\n core,\n ListTable,\n ListTableSimple,\n ListTableConstructorOptions,\n PivotTable,\n PivotTableSimple,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n PivotChart,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n themes,\n data,\n MousePointerCellEvent,\n getIcons,\n clearGlobal,\n //plugin registers\n register,\n /**\n * 暂不推荐使用\n */\n DataStatistics,\n CustomLayout,\n updateCell,\n renderChart,\n graphicUtil,\n setCustomAlphabetCharSet,\n restoreMeasureText,\n VRender\n};\n\n/** @private */\nfunction getIcons(): {\n [key: string]: TYPES.ColumnIconOption;\n} {\n return icons.get();\n}\n/** 清理内部的全局变量 如注册的icon theme等 以及共享的header column类实例 */\nfunction clearGlobal() {\n register.clearAll();\n // headers.type.clearGlobal();\n // columns.type.clearGlobal();\n}\nTYPES.AggregationType;\n\nexport * from './components';\nexport * from './scenegraph/group-creater/cell-type';\n\nexport { TABLE_EVENT_TYPE } from './core/TABLE_EVENT_TYPE';\nexport { PIVOT_CHART_EVENT_TYPE, PIVOT_TABLE_EVENT_TYPE } from './ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE';\n"]}
@@ -42,18 +42,20 @@ class SceneProxy {
42
42
  this.colLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameWidth / table.defaultColWidth))) : "autoHeight" === this.table.heightMode ? this.rowLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight)) : ("autoWidth" === this.table.widthMode || (this.rowLimit = Math.max(200, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight))),
43
43
  this.colLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameWidth / table.defaultColWidth))),
44
44
  this.table.internalProps.transpose ? this.mode = "row" : this.table.isPivotTable() && (this.mode = "pivot"),
45
- this.table.options.maintainedDataCount && (this.rowLimit = this.table.options.maintainedDataCount);
45
+ (this.table.options.maintainedDataCount || this.table.options.maintainedRowCount) && (this.rowLimit = this.table.options.maintainedDataCount || this.table.options.maintainedRowCount),
46
+ this.table.options.maintainedColumnCount && (this.colLimit = this.table.options.maintainedColumnCount);
46
47
  }
47
48
  get bodyLeftCol() {
48
49
  return this.table.frozenColCount;
49
50
  }
50
51
  setParamsForColumn() {
52
+ var _a;
51
53
  this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;
52
54
  const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);
53
55
  this.totalActualBodyColCount = totalActualBodyColCount, this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1,
54
56
  this.colStart = this.bodyLeftCol, this.colEnd = this.totalCol;
55
57
  const defaultColWidth = this.table.defaultColWidth;
56
- this.taskColCount = 1 * Math.ceil(this.table.tableNoFrameWidth / defaultColWidth);
58
+ this.taskColCount = null !== (_a = this.table.options.progressColumnUpdateCount) && void 0 !== _a ? _a : 1 * Math.ceil(this.table.tableNoFrameWidth / defaultColWidth);
57
59
  const totalBodyWidth = defaultColWidth * totalActualBodyColCount, totalWidth = defaultColWidth * (this.bodyRightCol - this.bodyLeftCol + 1);
58
60
  this.xLimitLeft = totalBodyWidth / 2, this.xLimitRight = totalWidth - totalBodyWidth / 2;
59
61
  const widthLimit = 5 * this.table.tableNoFrameWidth;
@@ -62,12 +64,13 @@ class SceneProxy {
62
64
  this.colUpdatePos = this.bodyRightCol;
63
65
  }
64
66
  setParamsForRow() {
67
+ var _a;
65
68
  this.bodyTopRow = this.table.frozenRowCount, this.bodyBottomRow = this.table.rowCount - 1 - this.table.bottomFrozenRowCount;
66
69
  const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1);
67
70
  this.totalActualBodyRowCount = totalActualBodyRowCount, this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1,
68
71
  this.rowStart = this.bodyTopRow, this.rowEnd = this.totalRow;
69
72
  const defaultRowHeight = this.table.defaultRowHeight;
70
- this.taskRowCount = 1 * Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight);
73
+ this.taskRowCount = null !== (_a = this.table.options.progressRowUpdateCount) && void 0 !== _a ? _a : 1 * Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight);
71
74
  const totalBodyHeight = defaultRowHeight * totalActualBodyRowCount, totalHeight = defaultRowHeight * (this.bodyBottomRow - this.bodyTopRow + 1);
72
75
  this.yLimitTop = totalBodyHeight / 2, this.yLimitBottom = totalHeight - totalBodyHeight / 2;
73
76
  const heightLimit = 5 * this.table.tableNoFrameHeight;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/group-creater/progress/proxy.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAqD;AAErD,+CAA4C;AAC5C,sEAAkE;AAClE,wEAAoE;AACpE,yDAAqD;AACrD,sCAA2C;AAC3C,oDAAuD;AACvD,mFAA4E;AAC5E,mEAAgF;AAChF,mEAAgF;AAChF,uEAAkE;AAClE,mEAA+D;AAC/D,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AAC,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';\n\nexport class SceneProxy {\n table: BaseTableAPI;\n isRelease: boolean = false;\n mode: 'column' | 'row' | 'pivot' = 'column';\n isProgressing: boolean;\n\n rowLimit = 200;\n currentRow = 0; // 目前渐进生成的row number\n totalRow: number; // 渐进完成最后一行的row number\n yLimitTop: number; // y > yLimitTop动态更新,否则直接修改xy\n yLimitBottom: number; // y < yLimitBottom动态更新,否则直接修改xy\n rowStart = 0; // 当前维护的部分第一行的row number\n rowEnd = 0; // 当前维护的部分最后一行的row number\n referenceRow = 0; // 当前维护的部分中间一行的row number,认为referenceRow对应当前屏幕显示范围的第一行\n bodyTopRow: number; // table body部分的第一行row number\n bodyBottomRow: number; // table body部分的最后一行row number\n screenRowCount: number; // 预计屏幕范围内显示的row count\n firstScreenRowLimit: number; // 首屏同步加载部分最后一行的row number\n taskRowCount: number; // 一次任务生成/更新的row count\n rowUpdatePos: number; // 异步任务目前更新到的行的row number\n rowUpdateDirection: 'up' | 'down'; // 当前行更新的方向\n screenTopRow: number = 0; // 当前屏幕范围内显示的第一行的row number\n totalActualBodyRowCount: number; // 实际表格body部分的行数\n deltaY: number = 0;\n 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.heightMode === 'autoHeight') {\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 }\n\n get bodyLeftCol(): number {\n return this.table.frozenColCount;\n }\n\n setParamsForColumn() {\n // this.bodyLeftCol = this.table.frozenColCount;\n this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;\n\n // compute the column info about progress creation\n const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);\n this.totalActualBodyColCount = totalActualBodyColCount;\n this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1; // 目标渐进完成的col\n this.colStart = this.bodyLeftCol;\n 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 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('progress col', this.colUpdatePos, this.colEnd, this.currentCol, this.totalCol);\n // console.log('progress row', this.rowUpdatePos, this.rowEnd, this.currentRow, this.totalRow);\n // console.log('before: createRow', table.scenegraph.bodyGroup.lastChild.attribute);\n // if (this.isSkipProgress) {\n // await this.progress();\n // } else\n if (this.colUpdatePos <= this.colEnd) {\n // 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 computeRowsHeight(this.table, this.currentRow + 1, endRow, false);\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.internalProps.defaultRowHeight,\n this.table,\n cellLocation\n );\n maxHeight = Math.max(maxHeight, height);\n this.table.scenegraph.rowHeaderGroup.setAttribute('height', maxHeight);\n }\n }\n\n if (this.table.rightFrozenColCount) {\n // create row header row cellGroup\n let maxHeight = 0;\n for (let col = this.table.colCount - this.table.rightFrozenColCount; col < this.table.colCount; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellLocation = this.table.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.internalProps.defaultRowHeight,\n this.table,\n cellLocation\n );\n maxHeight = Math.max(maxHeight, height);\n this.table.scenegraph.rightFrozenGroup.setAttribute('height', maxHeight);\n }\n }\n\n // create body row cellGroup\n let maxHeight = 0;\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n if (!colGroup) {\n continue;\n }\n const cellLocation = 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.internalProps.defaultRowHeight,\n this.table,\n cellLocation\n );\n maxHeight = Math.max(maxHeight, height);\n }\n this.table.scenegraph.bodyGroup.setAttribute('height', maxHeight);\n\n this.currentRow = endRow;\n this.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 computeColsWidth(this.table, this.currentCol + 1, endCol);\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 || this.table.scenegraph.bodyGroup.firstChild.childrenCount === 0) &&\n (!this.table.scenegraph.rowHeaderGroup.firstChild ||\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 this.table.scenegraph.bodyGroup.firstChild && //注意判断关系 这里不是 || 而是 &&\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.heightMode === 'autoHeight') {\n computeRowsHeight(this.table, this.rowUpdatePos, distRow, false);\n }\n\n updateRowContent(this.rowUpdatePos, distRow, this);\n\n if (this.table.heightMode === 'autoHeight') {\n // 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.heightMode === 'autoHeight') {\n computeRowsHeight(this.table, startRow, endRow, false);\n }\n console.log('updateBottomFrozenCellGroups', startRow, endRow);\n updateRowContent(startRow, endRow, this);\n\n if (this.table.heightMode === 'autoHeight') {\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.heightMode === 'autoHeight') {\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 computeColsWidth(this.table, this.colUpdatePos, distCol);\n updateColContent(this.colUpdatePos, distCol, this);\n this.colUpdatePos = distCol + 1;\n }\n\n updateCellGroupPosition(cellGroup: Group, newRow: number, y: number) {\n // 更新位置&row\n cellGroup.row = newRow;\n cellGroup.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 deltaY =\n cellGroup.attribute.y +\n cellGroup.attribute.height -\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\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,6CAAqD;AAErD,+CAA4C;AAC5C,sEAAkE;AAClE,wEAAoE;AACpE,yDAAqD;AACrD,sCAA2C;AAC3C,oDAAuD;AACvD,mFAA4E;AAC5E,mEAAgF;AAChF,mEAAgF;AAChF,uEAAkE;AAClE,mEAA+D;AAC/D,uEAAmE;AACnE,6EAAwE;AAExE,iDAAmD;AAGnD,MAAa,UAAU;IAgDrB,YAAY,KAAmB;QA9C/B,cAAS,GAAY,KAAK,CAAC;QAC3B,SAAI,GAA+B,QAAQ,CAAC;QAG5C,aAAQ,GAAG,GAAG,CAAC;QACf,eAAU,GAAG,CAAC,CAAC;QAIf,aAAQ,GAAG,CAAC,CAAC;QACb,WAAM,GAAG,CAAC,CAAC;QACX,iBAAY,GAAG,CAAC,CAAC;QAQjB,iBAAY,GAAW,CAAC,CAAC;QAEzB,WAAM,GAAW,CAAC,CAAC;QACnB,gBAAW,GAAW,CAAC,CAAC;QAExB,aAAQ,GAAG,GAAG,CAAC;QAcf,kBAAa,GAAW,CAAC,CAAC;QAG1B,WAAM,GAAW,CAAC,CAAC;Q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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';\n\nexport class SceneProxy {\n table: BaseTableAPI;\n isRelease: boolean = false;\n mode: 'column' | 'row' | 'pivot' = 'column';\n isProgressing: boolean;\n\n rowLimit = 200;\n currentRow = 0; // 目前渐进生成的row number\n totalRow: number; // 渐进完成最后一行的row number\n yLimitTop: number; // y > yLimitTop动态更新,否则直接修改xy\n yLimitBottom: number; // y < yLimitBottom动态更新,否则直接修改xy\n rowStart = 0; // 当前维护的部分第一行的row number\n rowEnd = 0; // 当前维护的部分最后一行的row number\n referenceRow = 0; // 当前维护的部分中间一行的row number,认为referenceRow对应当前屏幕显示范围的第一行\n bodyTopRow: number; // table body部分的第一行row number\n bodyBottomRow: number; // table body部分的最后一行row number\n screenRowCount: number; // 预计屏幕范围内显示的row count\n firstScreenRowLimit: number; // 首屏同步加载部分最后一行的row number\n taskRowCount: number; // 一次任务生成/更新的row count\n rowUpdatePos: number; // 异步任务目前更新到的行的row number\n rowUpdateDirection: 'up' | 'down'; // 当前行更新的方向\n screenTopRow: number = 0; // 当前屏幕范围内显示的第一行的row number\n totalActualBodyRowCount: number; // 实际表格body部分的行数\n deltaY: number = 0;\n 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.heightMode === 'autoHeight') {\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\n if (this.table.options.maintainedDataCount || this.table.options.maintainedRowCount) {\n this.rowLimit = this.table.options.maintainedDataCount || this.table.options.maintainedRowCount;\n }\n if (this.table.options.maintainedColumnCount) {\n this.colLimit = this.table.options.maintainedColumnCount;\n }\n }\n\n get bodyLeftCol(): number {\n return this.table.frozenColCount;\n }\n\n setParamsForColumn() {\n // this.bodyLeftCol = this.table.frozenColCount;\n this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;\n\n // compute the column info about progress creation\n const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);\n this.totalActualBodyColCount = totalActualBodyColCount;\n this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1; // 目标渐进完成的col\n this.colStart = this.bodyLeftCol;\n 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 =\n this.table.options.progressColumnUpdateCount ?? 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 =\n this.table.options.progressRowUpdateCount ?? 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 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('progress col', this.colUpdatePos, this.colEnd, this.currentCol, this.totalCol);\n // console.log('progress row', this.rowUpdatePos, this.rowEnd, this.currentRow, this.totalRow);\n // console.log('before: createRow', table.scenegraph.bodyGroup.lastChild.attribute);\n // if (this.isSkipProgress) {\n // await this.progress();\n // } else\n if (this.colUpdatePos <= this.colEnd) {\n // 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 computeRowsHeight(this.table, this.currentRow + 1, endRow, false);\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.internalProps.defaultRowHeight,\n this.table,\n cellLocation\n );\n maxHeight = Math.max(maxHeight, height);\n this.table.scenegraph.rowHeaderGroup.setAttribute('height', maxHeight);\n }\n }\n\n if (this.table.rightFrozenColCount) {\n // create row header row cellGroup\n let maxHeight = 0;\n for (let col = this.table.colCount - this.table.rightFrozenColCount; col < this.table.colCount; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellLocation = this.table.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.internalProps.defaultRowHeight,\n this.table,\n cellLocation\n );\n maxHeight = Math.max(maxHeight, height);\n this.table.scenegraph.rightFrozenGroup.setAttribute('height', maxHeight);\n }\n }\n\n // create body row cellGroup\n let maxHeight = 0;\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n if (!colGroup) {\n continue;\n }\n const cellLocation = 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.internalProps.defaultRowHeight,\n this.table,\n cellLocation\n );\n maxHeight = Math.max(maxHeight, height);\n }\n this.table.scenegraph.bodyGroup.setAttribute('height', maxHeight);\n\n this.currentRow = endRow;\n this.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 computeColsWidth(this.table, this.currentCol + 1, endCol);\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 || this.table.scenegraph.bodyGroup.firstChild.childrenCount === 0) &&\n (!this.table.scenegraph.rowHeaderGroup.firstChild ||\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 this.table.scenegraph.bodyGroup.firstChild && //注意判断关系 这里不是 || 而是 &&\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.heightMode === 'autoHeight') {\n computeRowsHeight(this.table, this.rowUpdatePos, distRow, false);\n }\n\n updateRowContent(this.rowUpdatePos, distRow, this);\n\n if (this.table.heightMode === 'autoHeight') {\n // 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.heightMode === 'autoHeight') {\n computeRowsHeight(this.table, startRow, endRow, false);\n }\n console.log('updateBottomFrozenCellGroups', startRow, endRow);\n updateRowContent(startRow, endRow, this);\n\n if (this.table.heightMode === 'autoHeight') {\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.heightMode === 'autoHeight') {\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 computeColsWidth(this.table, this.colUpdatePos, distCol);\n updateColContent(this.colUpdatePos, distCol, this);\n this.colUpdatePos = distCol + 1;\n }\n\n updateCellGroupPosition(cellGroup: Group, newRow: number, y: number) {\n // 更新位置&row\n cellGroup.row = newRow;\n cellGroup.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 deltaY =\n cellGroup.attribute.y +\n cellGroup.attribute.height -\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\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"]}
@@ -105,8 +105,9 @@ function updateColGroupContent(colGroup, proxy) {
105
105
  }
106
106
 
107
107
  function updateColGroupContentAsync(colGroup, proxy) {
108
+ var _a, _b;
108
109
  if (!colGroup) return;
109
- const screenTopRow = proxy.screenTopRow, topRow = Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount), bottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount);
110
+ const screenTopRow = proxy.screenTopRow, topRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * (null !== (_a = proxy.table.options.rowUpdateBufferCount) && void 0 !== _a ? _a : 1)), bottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * (1 + (null !== (_b = proxy.table.options.rowUpdateBufferCount) && void 0 !== _b ? _b : 1)));
110
111
  for (let row = topRow; row <= bottomRow; row++) {
111
112
  const cellGroup = proxy.highPerformanceGetCell(colGroup.col, row, !0);
112
113
  proxy.updateCellGroupContent(cellGroup);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/group-creater/progress/update-position/dynamic-set-x.ts"],"names":[],"mappings":";;;;;;;;;;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,CAAC,WAAW,CAAE,QAAQ,CAAC,KAAe,CAAC,GAAG,CAAC,CACnG,CAAC;SACH;IACH,CAAC,CAAC,CAAC;AACL,CAAC","file":"dynamic-set-x.js","sourcesContent":["import type { ColumnInfo } from '../../../../ts-types';\nimport type { BaseTableAPI } from '../../../../ts-types/base-table';\nimport type { Group } from '../../../graphic/group';\nimport { computeColsWidth } from '../../../layout/compute-col-width';\nimport type { SceneProxy } from '../proxy';\nimport { updateAutoColumn } from './update-auto-column';\nimport { checkFirstColMerge, getFirstChild, getLastChild } from './util';\n\nexport async function dynamicSetX(x: number, screenLeft: ColumnInfo | null, isEnd: boolean, proxy: SceneProxy) {\n if (!screenLeft) {\n return;\n }\n const screenLeftCol = screenLeft.col;\n const screenLeftX = screenLeft.left;\n\n let deltaCol;\n if (isEnd) {\n deltaCol = proxy.bodyRightCol - proxy.colEnd;\n } else {\n deltaCol = proxy.screenLeftCol - proxy.referenceCol;\n }\n // const deltaCol = proxy.screenLeftCol - proxy.referenceCol;\n move(deltaCol, screenLeftCol, screenLeftX, x, proxy);\n\n if (isEnd) {\n const colGroup = proxy.table.scenegraph.getColGroup(proxy.colEnd);\n if (colGroup) {\n const deltaX =\n colGroup.attribute.x +\n colGroup.attribute.width -\n (proxy.table.tableNoFrameWidth - proxy.table.getFrozenColsWidth() - proxy.table.getRightFrozenColsWidth()) -\n x;\n proxy.deltaX = -deltaX;\n proxy.table.scenegraph.setBodyAndColHeaderX(-x + proxy.deltaX);\n }\n }\n\n proxy.table.scenegraph.updateNextFrame();\n}\n\nfunction move(deltaCol: number, screenLeftCol: number, screenLeftX: number, x: number, proxy: SceneProxy) {\n if (deltaCol > 0) {\n // 向右滚动,左部column group移到右部\n moveColumn(deltaCol, 'left', proxy.screenLeftCol, screenLeftX, x, proxy);\n proxy.updateDeltaX(x, screenLeftX, screenLeftCol);\n proxy.table.scenegraph.setBodyAndColHeaderX(-x + proxy.deltaX);\n } else if (deltaCol < 0) {\n // 向左滚动,右部cell group移到左部\n moveColumn(-deltaCol, 'right', proxy.screenLeftCol, screenLeftX, x, proxy);\n proxy.updateDeltaX(x, screenLeftX, screenLeftCol);\n proxy.table.scenegraph.setBodyAndColHeaderX(-x + proxy.deltaX);\n } else {\n // 不改变row,更新body group范围\n proxy.updateDeltaX(x, screenLeftX, screenLeftCol);\n proxy.table.scenegraph.setBodyAndColHeaderX(-x + proxy.deltaX);\n }\n}\n\nasync function moveColumn(\n count: number,\n direction: 'left' | 'right',\n screenLeftCol: number,\n screenLeftX: number,\n x: number,\n proxy: SceneProxy\n) {\n // 限制count范围\n if (direction === 'left' && proxy.colEnd + count > proxy.bodyRightCol) {\n count = proxy.bodyRightCol - proxy.colEnd;\n } else if (direction === 'right' && proxy.colStart - count < proxy.bodyLeftCol) {\n count = proxy.colStart - proxy.bodyLeftCol;\n }\n if (count === 0) {\n return;\n }\n if (count < 0) {\n direction = direction === 'left' ? 'right' : 'left';\n count = -count;\n }\n // 两种更新模式\n // 1. count < colEnd - colStart:从顶/底部移动count数量的单元格到底/顶部\n // 2. count >= colEnd - colStart:整体移动到目标位置\n if (count < proxy.colEnd - proxy.colStart) {\n // 计算更新区域\n const startCol = direction === 'left' ? proxy.colStart : proxy.colEnd - count + 1;\n const endCol = direction === 'left' ? proxy.colStart + count - 1 : proxy.colEnd;\n const distStartCol = direction === 'left' ? proxy.colEnd + 1 : proxy.colStart - count;\n const distEndCol = direction === 'left' ? proxy.colEnd + count : proxy.colStart - 1;\n // update column width\n computeColsWidth(proxy.table, distStartCol, distEndCol);\n updatePartColPosition(startCol, endCol, direction, proxy);\n\n const syncLeftCol = distStartCol;\n const syncRightCol = distEndCol;\n\n proxy.colStart = direction === 'left' ? proxy.colStart + count : proxy.colStart - count;\n proxy.colEnd = direction === 'left' ? proxy.colEnd + count : proxy.colEnd - count;\n\n updateColContent(syncLeftCol, syncRightCol, proxy);\n\n updateAutoColumn(\n syncLeftCol, // colStart\n syncRightCol, // colEnd\n proxy.table,\n direction\n );\n\n const colGroup =\n proxy.table.scenegraph.getColGroup(screenLeftCol) || proxy.table.scenegraph.getColGroup(screenLeftCol, true);\n const deltaX =\n screenLeftX - (colGroup.attribute.x + proxy.table.getFrozenColsWidth() + proxy.table.scenegraph.proxy.deltaX);\n proxy.table.scenegraph.proxy.deltaX += deltaX;\n\n proxy.currentCol = direction === 'left' ? proxy.currentCol + count : proxy.currentCol - count;\n proxy.totalCol = Math.max(\n 0,\n Math.min(proxy.table.colCount - 1, direction === 'left' ? proxy.totalCol + count : proxy.totalCol - count)\n );\n\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n proxy.colUpdatePos = distStartCol;\n proxy.colUpdateDirection = direction;\n\n proxy.table.scenegraph.updateNextFrame();\n\n // 开始异步任务\n // await proxy.progress();\n } else {\n const distStartCol = direction === 'left' ? proxy.colStart + count : proxy.colStart - count;\n const distEndCol = direction === 'left' ? proxy.colEnd + count : proxy.colEnd - count;\n\n // update column width\n computeColsWidth(proxy.table, distStartCol, distEndCol);\n const distStartColY = proxy.table.getColsWidth(proxy.bodyLeftCol, distStartCol - 1);\n\n // 更新同步范围\n updateAllColPosition(distStartColY, count, direction, proxy);\n const syncLeftCol = distStartCol;\n const syncRightCol = distEndCol;\n\n proxy.colStart = distStartCol;\n proxy.colEnd = distEndCol;\n updateColContent(syncLeftCol, syncRightCol, proxy);\n\n updateAutoColumn(\n syncLeftCol, // colStart\n syncRightCol, // colEnd\n proxy.table,\n distEndCol > proxy.bodyRightCol - (proxy.colEnd - proxy.colStart + 1) ? 'right' : 'left' // 跳转到右侧时,从右向左对齐\n );\n // // update body position when click scroll bar\n // if (syncLeftCol === proxy.bodyLeftCol) {\n // const colGroup = proxy.table.scenegraph.getColGroup(syncLeftCol);\n // const deltaX = colGroup.attribute.x - x;\n // proxy.table.scenegraph.proxy.deltaX = deltaX;\n // } else if (syncRightCol === proxy.bodyRightCol) {\n // const colGroup = proxy.table.scenegraph.getColGroup(syncRightCol);\n // const deltaX =\n // colGroup.attribute.x +\n // colGroup.attribute.width -\n // (proxy.table.tableNoFrameWidth - proxy.table.getFrozenColsWidth()) -\n // x;\n // proxy.table.scenegraph.proxy.deltaX = -deltaX;\n // } else {\n // // proxy.table.scenegraph.proxy.deltaX = 0;\n // const colGroup =\n // proxy.table.scenegraph.getColGroup(screenLeftCol) || proxy.table.scenegraph.getColGroup(screenLeftCol, true);\n // const deltaX =\n // screenLeftX - (colGroup.attribute.x + proxy.table.getFrozenColsWidth() + proxy.table.scenegraph.proxy.deltaX);\n // proxy.table.scenegraph.proxy.deltaX = deltaX;\n // }\n\n proxy.currentCol = direction === 'left' ? proxy.currentCol + count : proxy.currentCol - count;\n proxy.totalCol = Math.max(\n 0,\n Math.min(proxy.table.colCount - 1, direction === 'left' ? proxy.totalCol + count : proxy.totalCol - count)\n );\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n proxy.colUpdatePos = proxy.colStart;\n proxy.colUpdateDirection = distEndCol > proxy.bodyRightCol - (proxy.colEnd - proxy.colStart + 1) ? 'right' : 'left';\n\n proxy.table.scenegraph.updateNextFrame();\n // await proxy.progress();\n }\n}\n\nfunction updateColGroupPosition(colGroup: Group, newCol: number, x: number) {\n // 更新位置&col\n colGroup.col = newCol;\n colGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.col = newCol;\n cellGroup.needUpdate = true;\n });\n colGroup.setAttribute('x', x);\n colGroup.needUpdate = true;\n}\n\nfunction updateColGroupContent(colGroup: Group, proxy: SceneProxy) {\n if (!colGroup) {\n return;\n }\n let cellGroup = colGroup.firstChild;\n while (cellGroup) {\n const newCellGroup = proxy.updateCellGroupContent(cellGroup as Group);\n cellGroup = newCellGroup._next;\n }\n colGroup.needUpdate = false;\n colGroup.setAttribute('width', proxy.table.getColWidth(colGroup.col));\n}\n\n// update cells async\nfunction updateColGroupContentAsync(colGroup: Group, proxy: SceneProxy) {\n if (!colGroup) {\n return;\n }\n const screenTopRow = proxy.screenTopRow;\n const topRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);\n const bottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2);\n\n for (let row = topRow; row <= bottomRow; row++) {\n // const cellGroup = proxy.table.scenegraph.getCell(col, row);\n const cellGroup = proxy.highPerformanceGetCell(colGroup.col, row, true);\n proxy.updateCellGroupContent(cellGroup);\n }\n proxy.rowUpdatePos = proxy.rowStart;\n\n colGroup.needUpdate = false;\n colGroup.setAttribute('width', proxy.table.getColWidth(colGroup.col));\n}\n\nfunction updatePartColPosition(startCol: number, endCol: number, direction: 'left' | 'right', proxy: SceneProxy) {\n for (let col = startCol; col <= endCol; col++) {\n if (\n proxy.table.scenegraph.bodyGroup.childrenCount > 0 &&\n proxy.table.scenegraph.bodyGroup.firstChild.type === 'group'\n ) {\n updateColPosition(proxy.table.scenegraph.bodyGroup, direction, proxy);\n }\n if (\n proxy.table.scenegraph.colHeaderGroup.childrenCount > 0 &&\n proxy.table.scenegraph.colHeaderGroup.firstChild.type === 'group'\n ) {\n updateColPosition(proxy.table.scenegraph.colHeaderGroup, direction, proxy);\n }\n if (\n proxy.table.scenegraph.bottomFrozenGroup.childrenCount > 0 &&\n proxy.table.scenegraph.bottomFrozenGroup.firstChild.type === 'group'\n ) {\n updateColPosition(proxy.table.scenegraph.bottomFrozenGroup, direction, proxy);\n }\n }\n}\n\nfunction updateColPosition(containerGroup: Group, direction: 'left' | 'right', proxy: SceneProxy) {\n if (direction === 'left') {\n const colGroup = getFirstChild(containerGroup);\n const lastChild = getLastChild(containerGroup);\n updateColGroupPosition(colGroup, lastChild.col + 1, lastChild.attribute.x + proxy.table.getColWidth(lastChild.col));\n containerGroup.appendChild(colGroup);\n // console.log('after', colGroup.col, colGroup.attribute.x, containerGroup._uid);\n if (containerGroup.border) {\n containerGroup.appendChild(containerGroup.border);\n }\n } else {\n const colGroup = getLastChild(containerGroup);\n const firstChild = getFirstChild(containerGroup);\n updateColGroupPosition(\n colGroup,\n firstChild.col - 1,\n firstChild.attribute.x - proxy.table.getColWidth(firstChild.col - 1)\n );\n containerGroup.insertBefore(colGroup, containerGroup.firstChild);\n }\n}\n\nexport function updateColContent(syncLeftCol: number, syncRightCol: number, proxy: SceneProxy) {\n for (let col = syncLeftCol; col <= syncRightCol; col++) {\n const colHeaderColGroup = proxy.table.scenegraph.getColGroup(col, true);\n colHeaderColGroup && updateColGroupContent(colHeaderColGroup, proxy);\n\n const bottomColGroup = proxy.table.scenegraph.getColGroupInBottom(col);\n bottomColGroup && updateColGroupContent(bottomColGroup, proxy);\n\n const rightTopColGroup = proxy.table.scenegraph.getColGroupInRightTopCorner(col);\n rightTopColGroup && updateColGroupContent(rightTopColGroup, proxy);\n\n const rightBottomColGroup = proxy.table.scenegraph.getColGroupInRightBottomCorner(col);\n rightBottomColGroup && updateColGroupContent(rightBottomColGroup, proxy);\n\n const colGroup = proxy.table.scenegraph.getColGroup(col);\n colGroup && updateColGroupContentAsync(colGroup, proxy);\n }\n proxy.progress();\n}\n\nfunction updateAllColPosition(distStartColY: number, count: number, direction: 'left' | 'right', proxy: SceneProxy) {\n proxy.table.scenegraph.colHeaderGroup.forEachChildren((colGroup: Group, index: number) => {\n if (colGroup.type === 'group') {\n updateColGroupPosition(\n colGroup,\n direction === 'left' ? colGroup.col + count : colGroup.col - count,\n // (bodyGroup.lastChild as Group).attribute.x + (bodyGroup.lastChild as Group).attribute.width\n index === 0 // row === proxy.rowStart\n ? distStartColY\n : (colGroup._prev as Group).attribute.x + proxy.table.getColWidth((colGroup._prev as Group).col)\n );\n }\n });\n proxy.table.scenegraph.bottomFrozenGroup.forEachChildren((colGroup: Group, index: number) => {\n if (colGroup.type === 'group') {\n updateColGroupPosition(\n colGroup,\n direction === 'left' ? colGroup.col + count : colGroup.col - count,\n // (bodyGroup.lastChild as Group).attribute.x + (bodyGroup.lastChild as Group).attribute.width\n index === 0 // row === proxy.rowStart\n ? distStartColY\n : (colGroup._prev as Group).attribute.x + proxy.table.getColWidth((colGroup._prev as Group).col)\n );\n }\n });\n proxy.table.scenegraph.bodyGroup.forEachChildren((colGroup: Group, index: number) => {\n if (colGroup.type === 'group') {\n updateColGroupPosition(\n colGroup,\n direction === 'left' ? colGroup.col + count : colGroup.col - count,\n // (bodyGroup.lastChild as Group).attribute.x + (bodyGroup.lastChild as Group).attribute.width\n index === 0 // row === proxy.rowStart\n ? distStartColY\n : (colGroup._prev as Group).attribute.x + proxy.table.getColWidth((colGroup._prev as Group).col)\n );\n }\n });\n}\n"]}
1
+ {"version":3,"sources":["../src/scenegraph/group-creater/progress/update-position/dynamic-set-x.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,yEAAqE;AAErE,6DAAwD;AACxD,iCAAyE;AAEzE,SAAsB,WAAW,CAAC,CAAS,EAAE,UAA6B,EAAE,KAAc,EAAE,KAAiB;;QAC3G,IAAI,CAAC,UAAU,EAAE;YACf,OAAO;SACR;QACD,MAAM,aAAa,GAAG,UAAU,CAAC,GAAG,CAAC;QACrC,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,CAAC;QAEpC,IAAI,QAAQ,CAAC;QACb,IAAI,KAAK,EAAE;YACT,QAAQ,GAAG,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC;SAC9C;aAAM;YACL,QAAQ,GAAG,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC,YAAY,CAAC;SACrD;QAED,IAAI,CAAC,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;QAErD,IAAI,KAAK,EAAE;YACT,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAClE,IAAI,QAAQ,EAAE;gBACZ,MAAM,MAAM,GACV,QAAQ,CAAC,SAAS,CAAC,CAAC;oBACpB,QAAQ,CAAC,SAAS,CAAC,KAAK;oBACxB,CAAC,KAAK,CAAC,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Ae,CAAC,SAAS,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAAE,QAAQ,CAAC,KAAe,CAAC,GAAG,CAAC,CACnG,CAAC;SACH;IACH,CAAC,CAAC,CAAC;IACH,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,QAAe,EAAE,KAAa,EAAE,EAAE;QAClF,IAAI,QAAQ,CAAC,IAAI,KAAK,OAAO,EAAE;YAC7B,sBAAsB,CACpB,QAAQ,EACR,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,GAAG,KAAK,EAElE,KAAK,KAAK,CAAC;gBACT,CAAC,CAAC,aAAa;gBACf,CAAC,CAAE,QAAQ,CAAC,KAAe,CAAC,SAAS,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAAE,QAAQ,CAAC,KAAe,CAAC,GAAG,CAAC,CACnG,CAAC;SACH;IACH,CAAC,CAAC,CAAC;AACL,CAAC","file":"dynamic-set-x.js","sourcesContent":["import type { ColumnInfo } from '../../../../ts-types';\nimport type { BaseTableAPI } from '../../../../ts-types/base-table';\nimport type { Group } from '../../../graphic/group';\nimport { computeColsWidth } from '../../../layout/compute-col-width';\nimport type { SceneProxy } from '../proxy';\nimport { updateAutoColumn } from './update-auto-column';\nimport { checkFirstColMerge, getFirstChild, getLastChild } from './util';\n\nexport async function dynamicSetX(x: number, screenLeft: ColumnInfo | null, isEnd: boolean, proxy: SceneProxy) {\n if (!screenLeft) {\n return;\n }\n const screenLeftCol = screenLeft.col;\n const screenLeftX = screenLeft.left;\n\n let deltaCol;\n if (isEnd) {\n deltaCol = proxy.bodyRightCol - proxy.colEnd;\n } else {\n deltaCol = proxy.screenLeftCol - proxy.referenceCol;\n }\n // const deltaCol = proxy.screenLeftCol - proxy.referenceCol;\n move(deltaCol, screenLeftCol, screenLeftX, x, proxy);\n\n if (isEnd) {\n const colGroup = proxy.table.scenegraph.getColGroup(proxy.colEnd);\n if (colGroup) {\n const deltaX =\n colGroup.attribute.x +\n colGroup.attribute.width -\n (proxy.table.tableNoFrameWidth - proxy.table.getFrozenColsWidth() - proxy.table.getRightFrozenColsWidth()) -\n x;\n proxy.deltaX = -deltaX;\n proxy.table.scenegraph.setBodyAndColHeaderX(-x + proxy.deltaX);\n }\n }\n\n proxy.table.scenegraph.updateNextFrame();\n}\n\nfunction move(deltaCol: number, screenLeftCol: number, screenLeftX: number, x: number, proxy: SceneProxy) {\n if (deltaCol > 0) {\n // 向右滚动,左部column group移到右部\n moveColumn(deltaCol, 'left', proxy.screenLeftCol, screenLeftX, x, proxy);\n proxy.updateDeltaX(x, screenLeftX, screenLeftCol);\n proxy.table.scenegraph.setBodyAndColHeaderX(-x + proxy.deltaX);\n } else if (deltaCol < 0) {\n // 向左滚动,右部cell group移到左部\n moveColumn(-deltaCol, 'right', proxy.screenLeftCol, screenLeftX, x, proxy);\n proxy.updateDeltaX(x, screenLeftX, screenLeftCol);\n proxy.table.scenegraph.setBodyAndColHeaderX(-x + proxy.deltaX);\n } else {\n // 不改变row,更新body group范围\n proxy.updateDeltaX(x, screenLeftX, screenLeftCol);\n proxy.table.scenegraph.setBodyAndColHeaderX(-x + proxy.deltaX);\n }\n}\n\nasync function moveColumn(\n count: number,\n direction: 'left' | 'right',\n screenLeftCol: number,\n screenLeftX: number,\n x: number,\n proxy: SceneProxy\n) {\n // 限制count范围\n if (direction === 'left' && proxy.colEnd + count > proxy.bodyRightCol) {\n count = proxy.bodyRightCol - proxy.colEnd;\n } else if (direction === 'right' && proxy.colStart - count < proxy.bodyLeftCol) {\n count = proxy.colStart - proxy.bodyLeftCol;\n }\n if (count === 0) {\n return;\n }\n if (count < 0) {\n direction = direction === 'left' ? 'right' : 'left';\n count = -count;\n }\n // 两种更新模式\n // 1. count < colEnd - colStart:从顶/底部移动count数量的单元格到底/顶部\n // 2. count >= colEnd - colStart:整体移动到目标位置\n if (count < proxy.colEnd - proxy.colStart) {\n // 计算更新区域\n const startCol = direction === 'left' ? proxy.colStart : proxy.colEnd - count + 1;\n const endCol = direction === 'left' ? proxy.colStart + count - 1 : proxy.colEnd;\n const distStartCol = direction === 'left' ? proxy.colEnd + 1 : proxy.colStart - count;\n const distEndCol = direction === 'left' ? proxy.colEnd + count : proxy.colStart - 1;\n // update column width\n computeColsWidth(proxy.table, distStartCol, distEndCol);\n updatePartColPosition(startCol, endCol, direction, proxy);\n\n const syncLeftCol = distStartCol;\n const syncRightCol = distEndCol;\n\n proxy.colStart = direction === 'left' ? proxy.colStart + count : proxy.colStart - count;\n proxy.colEnd = direction === 'left' ? proxy.colEnd + count : proxy.colEnd - count;\n\n updateColContent(syncLeftCol, syncRightCol, proxy);\n\n updateAutoColumn(\n syncLeftCol, // colStart\n syncRightCol, // colEnd\n proxy.table,\n direction\n );\n\n const colGroup =\n proxy.table.scenegraph.getColGroup(screenLeftCol) || proxy.table.scenegraph.getColGroup(screenLeftCol, true);\n const deltaX =\n screenLeftX - (colGroup.attribute.x + proxy.table.getFrozenColsWidth() + proxy.table.scenegraph.proxy.deltaX);\n proxy.table.scenegraph.proxy.deltaX += deltaX;\n\n proxy.currentCol = direction === 'left' ? proxy.currentCol + count : proxy.currentCol - count;\n proxy.totalCol = Math.max(\n 0,\n Math.min(proxy.table.colCount - 1, direction === 'left' ? proxy.totalCol + count : proxy.totalCol - count)\n );\n\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n proxy.colUpdatePos = distStartCol;\n proxy.colUpdateDirection = direction;\n\n proxy.table.scenegraph.updateNextFrame();\n\n // 开始异步任务\n // await proxy.progress();\n } else {\n const distStartCol = direction === 'left' ? proxy.colStart + count : proxy.colStart - count;\n const distEndCol = direction === 'left' ? proxy.colEnd + count : proxy.colEnd - count;\n\n // update column width\n computeColsWidth(proxy.table, distStartCol, distEndCol);\n const distStartColY = proxy.table.getColsWidth(proxy.bodyLeftCol, distStartCol - 1);\n\n // 更新同步范围\n updateAllColPosition(distStartColY, count, direction, proxy);\n const syncLeftCol = distStartCol;\n const syncRightCol = distEndCol;\n\n proxy.colStart = distStartCol;\n proxy.colEnd = distEndCol;\n updateColContent(syncLeftCol, syncRightCol, proxy);\n\n updateAutoColumn(\n syncLeftCol, // colStart\n syncRightCol, // colEnd\n proxy.table,\n distEndCol > proxy.bodyRightCol - (proxy.colEnd - proxy.colStart + 1) ? 'right' : 'left' // 跳转到右侧时,从右向左对齐\n );\n // // update body position when click scroll bar\n // if (syncLeftCol === proxy.bodyLeftCol) {\n // const colGroup = proxy.table.scenegraph.getColGroup(syncLeftCol);\n // const deltaX = colGroup.attribute.x - x;\n // proxy.table.scenegraph.proxy.deltaX = deltaX;\n // } else if (syncRightCol === proxy.bodyRightCol) {\n // const colGroup = proxy.table.scenegraph.getColGroup(syncRightCol);\n // const deltaX =\n // colGroup.attribute.x +\n // colGroup.attribute.width -\n // (proxy.table.tableNoFrameWidth - proxy.table.getFrozenColsWidth()) -\n // x;\n // proxy.table.scenegraph.proxy.deltaX = -deltaX;\n // } else {\n // // proxy.table.scenegraph.proxy.deltaX = 0;\n // const colGroup =\n // proxy.table.scenegraph.getColGroup(screenLeftCol) || proxy.table.scenegraph.getColGroup(screenLeftCol, true);\n // const deltaX =\n // screenLeftX - (colGroup.attribute.x + proxy.table.getFrozenColsWidth() + proxy.table.scenegraph.proxy.deltaX);\n // proxy.table.scenegraph.proxy.deltaX = deltaX;\n // }\n\n proxy.currentCol = direction === 'left' ? proxy.currentCol + count : proxy.currentCol - count;\n proxy.totalCol = Math.max(\n 0,\n Math.min(proxy.table.colCount - 1, direction === 'left' ? proxy.totalCol + count : proxy.totalCol - count)\n );\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n proxy.colUpdatePos = proxy.colStart;\n proxy.colUpdateDirection = distEndCol > proxy.bodyRightCol - (proxy.colEnd - proxy.colStart + 1) ? 'right' : 'left';\n\n proxy.table.scenegraph.updateNextFrame();\n // await proxy.progress();\n }\n}\n\nfunction updateColGroupPosition(colGroup: Group, newCol: number, x: number) {\n // 更新位置&col\n colGroup.col = newCol;\n colGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.col = newCol;\n cellGroup.needUpdate = true;\n });\n colGroup.setAttribute('x', x);\n colGroup.needUpdate = true;\n}\n\nfunction updateColGroupContent(colGroup: Group, proxy: SceneProxy) {\n if (!colGroup) {\n return;\n }\n let cellGroup = colGroup.firstChild;\n while (cellGroup) {\n const newCellGroup = proxy.updateCellGroupContent(cellGroup as Group);\n cellGroup = newCellGroup._next;\n }\n colGroup.needUpdate = false;\n colGroup.setAttribute('width', proxy.table.getColWidth(colGroup.col));\n}\n\n// update cells async\nfunction updateColGroupContentAsync(colGroup: Group, proxy: SceneProxy) {\n if (!colGroup) {\n return;\n }\n const screenTopRow = proxy.screenTopRow;\n const topRow = Math.max(\n proxy.bodyTopRow,\n screenTopRow - proxy.screenRowCount * (proxy.table.options.rowUpdateBufferCount ?? 1)\n );\n const bottomRow = Math.min(\n proxy.bodyBottomRow,\n screenTopRow + proxy.screenRowCount * (1 + (proxy.table.options.rowUpdateBufferCount ?? 1))\n );\n\n for (let row = topRow; row <= bottomRow; row++) {\n // const cellGroup = proxy.table.scenegraph.getCell(col, row);\n const cellGroup = proxy.highPerformanceGetCell(colGroup.col, row, true);\n proxy.updateCellGroupContent(cellGroup);\n }\n proxy.rowUpdatePos = proxy.rowStart;\n\n colGroup.needUpdate = false;\n colGroup.setAttribute('width', proxy.table.getColWidth(colGroup.col));\n}\n\nfunction updatePartColPosition(startCol: number, endCol: number, direction: 'left' | 'right', proxy: SceneProxy) {\n for (let col = startCol; col <= endCol; col++) {\n if (\n proxy.table.scenegraph.bodyGroup.childrenCount > 0 &&\n proxy.table.scenegraph.bodyGroup.firstChild.type === 'group'\n ) {\n updateColPosition(proxy.table.scenegraph.bodyGroup, direction, proxy);\n }\n if (\n proxy.table.scenegraph.colHeaderGroup.childrenCount > 0 &&\n proxy.table.scenegraph.colHeaderGroup.firstChild.type === 'group'\n ) {\n updateColPosition(proxy.table.scenegraph.colHeaderGroup, direction, proxy);\n }\n if (\n proxy.table.scenegraph.bottomFrozenGroup.childrenCount > 0 &&\n proxy.table.scenegraph.bottomFrozenGroup.firstChild.type === 'group'\n ) {\n updateColPosition(proxy.table.scenegraph.bottomFrozenGroup, direction, proxy);\n }\n }\n}\n\nfunction updateColPosition(containerGroup: Group, direction: 'left' | 'right', proxy: SceneProxy) {\n if (direction === 'left') {\n const colGroup = getFirstChild(containerGroup);\n const lastChild = getLastChild(containerGroup);\n updateColGroupPosition(colGroup, lastChild.col + 1, lastChild.attribute.x + proxy.table.getColWidth(lastChild.col));\n containerGroup.appendChild(colGroup);\n // console.log('after', colGroup.col, colGroup.attribute.x, containerGroup._uid);\n if (containerGroup.border) {\n containerGroup.appendChild(containerGroup.border);\n }\n } else {\n const colGroup = getLastChild(containerGroup);\n const firstChild = getFirstChild(containerGroup);\n updateColGroupPosition(\n colGroup,\n firstChild.col - 1,\n firstChild.attribute.x - proxy.table.getColWidth(firstChild.col - 1)\n );\n containerGroup.insertBefore(colGroup, containerGroup.firstChild);\n }\n}\n\nexport function updateColContent(syncLeftCol: number, syncRightCol: number, proxy: SceneProxy) {\n for (let col = syncLeftCol; col <= syncRightCol; col++) {\n const colHeaderColGroup = proxy.table.scenegraph.getColGroup(col, true);\n colHeaderColGroup && updateColGroupContent(colHeaderColGroup, proxy);\n\n const bottomColGroup = proxy.table.scenegraph.getColGroupInBottom(col);\n bottomColGroup && updateColGroupContent(bottomColGroup, proxy);\n\n const rightTopColGroup = proxy.table.scenegraph.getColGroupInRightTopCorner(col);\n rightTopColGroup && updateColGroupContent(rightTopColGroup, proxy);\n\n const rightBottomColGroup = proxy.table.scenegraph.getColGroupInRightBottomCorner(col);\n rightBottomColGroup && updateColGroupContent(rightBottomColGroup, proxy);\n\n const colGroup = proxy.table.scenegraph.getColGroup(col);\n colGroup && updateColGroupContentAsync(colGroup, proxy);\n }\n proxy.progress();\n}\n\nfunction updateAllColPosition(distStartColY: number, count: number, direction: 'left' | 'right', proxy: SceneProxy) {\n proxy.table.scenegraph.colHeaderGroup.forEachChildren((colGroup: Group, index: number) => {\n if (colGroup.type === 'group') {\n updateColGroupPosition(\n colGroup,\n direction === 'left' ? colGroup.col + count : colGroup.col - count,\n // (bodyGroup.lastChild as Group).attribute.x + (bodyGroup.lastChild as Group).attribute.width\n index === 0 // row === proxy.rowStart\n ? distStartColY\n : (colGroup._prev as Group).attribute.x + proxy.table.getColWidth((colGroup._prev as Group).col)\n );\n }\n });\n proxy.table.scenegraph.bottomFrozenGroup.forEachChildren((colGroup: Group, index: number) => {\n if (colGroup.type === 'group') {\n updateColGroupPosition(\n colGroup,\n direction === 'left' ? colGroup.col + count : colGroup.col - count,\n // (bodyGroup.lastChild as Group).attribute.x + (bodyGroup.lastChild as Group).attribute.width\n index === 0 // row === proxy.rowStart\n ? distStartColY\n : (colGroup._prev as Group).attribute.x + proxy.table.getColWidth((colGroup._prev as Group).col)\n );\n }\n });\n proxy.table.scenegraph.bodyGroup.forEachChildren((colGroup: Group, index: number) => {\n if (colGroup.type === 'group') {\n updateColGroupPosition(\n colGroup,\n direction === 'left' ? colGroup.col + count : colGroup.col - count,\n // (bodyGroup.lastChild as Group).attribute.x + (bodyGroup.lastChild as Group).attribute.width\n index === 0 // row === proxy.rowStart\n ? distStartColY\n : (colGroup._prev as Group).attribute.x + proxy.table.getColWidth((colGroup._prev as Group).col)\n );\n }\n });\n}\n"]}
@@ -56,6 +56,7 @@ function move(deltaRow, screenTopRow, screenTopY, y, proxy) {
56
56
  }
57
57
 
58
58
  function moveCell(count, direction, screenTopRow, screenTopY, y, proxy) {
59
+ var _a, _b, _c, _d;
59
60
  return __awaiter(this, void 0, void 0, (function*() {
60
61
  if ("up" === direction && proxy.rowEnd + count > proxy.bodyBottomRow ? count = proxy.bodyBottomRow - proxy.rowEnd : "down" === direction && proxy.rowStart - count < proxy.bodyTopRow && (count = proxy.rowStart - proxy.bodyTopRow),
61
62
  0 !== count) if (count < 0 && (direction = "up" === direction ? "down" : "up", count = -count),
@@ -63,8 +64,8 @@ function moveCell(count, direction, screenTopRow, screenTopY, y, proxy) {
63
64
  const startRow = "up" === direction ? proxy.rowStart : proxy.rowEnd - count + 1, endRow = "up" === direction ? proxy.rowStart + count - 1 : proxy.rowEnd, distStartRow = "up" === direction ? proxy.rowEnd + 1 : proxy.rowStart - count, distEndRow = "up" === direction ? proxy.rowEnd + count : proxy.rowStart - 1;
64
65
  let syncTopRow, syncBottomRow;
65
66
  if ("autoHeight" === proxy.table.heightMode) syncTopRow = distStartRow, syncBottomRow = distEndRow; else {
66
- syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount),
67
- syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount);
67
+ syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * (null !== (_a = proxy.table.options.rowUpdateBufferCount) && void 0 !== _a ? _a : 1)),
68
+ syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * (1 + (null !== (_b = proxy.table.options.rowUpdateBufferCount) && void 0 !== _b ? _b : 1)));
68
69
  }
69
70
  (0, compute_row_height_1.computeRowsHeight)(proxy.table, syncTopRow, syncBottomRow, !1),
70
71
  updatePartRowPosition(startRow, endRow, direction, proxy), proxy.rowStart = "up" === direction ? proxy.rowStart + count : proxy.rowStart - count,
@@ -82,8 +83,8 @@ function moveCell(count, direction, screenTopRow, screenTopY, y, proxy) {
82
83
  } else {
83
84
  const distStartRow = "up" === direction ? proxy.rowStart + count : proxy.rowStart - count, distEndRow = "up" === direction ? proxy.rowEnd + count : proxy.rowEnd - count, distStartRowY = proxy.table.getRowsHeight(proxy.bodyTopRow, distStartRow - 1);
84
85
  let syncTopRow, syncBottomRow;
85
- "autoHeight" === proxy.table.heightMode ? (syncTopRow = distStartRow, syncBottomRow = distEndRow) : (syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount),
86
- syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount)),
86
+ "autoHeight" === proxy.table.heightMode ? (syncTopRow = distStartRow, syncBottomRow = distEndRow) : (syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * (null !== (_c = proxy.table.options.rowUpdateBufferCount) && void 0 !== _c ? _c : 1)),
87
+ syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * (1 + (null !== (_d = proxy.table.options.rowUpdateBufferCount) && void 0 !== _d ? _d : 1)))),
87
88
  (0, compute_row_height_1.computeRowsHeight)(proxy.table, syncTopRow, syncBottomRow, !1),
88
89
  updateAllRowPosition(distStartRowY, count, direction, proxy), proxy.rowStart = distStartRow,
89
90
  proxy.rowEnd = distEndRow;
@@ -150,6 +151,7 @@ function updateAllRowPosition(distStartRowY, count, direction, proxy) {
150
151
  }
151
152
 
152
153
  function updateRowContent(syncTopRow, syncBottomRow, proxy, async = !1) {
154
+ var _a, _b;
153
155
  for (let col = 0; col < proxy.table.frozenColCount; col++) for (let row = syncTopRow; row <= syncBottomRow; row++) {
154
156
  const cellGroup = proxy.highPerformanceGetCell(col, row, !0);
155
157
  proxy.updateCellGroupContent(cellGroup);
@@ -161,8 +163,8 @@ function updateRowContent(syncTopRow, syncBottomRow, proxy, async = !1) {
161
163
  let leftCol = proxy.bodyLeftCol, rightCol = proxy.bodyRightCol, sync = !0;
162
164
  if (async) {
163
165
  const screenLeftCol = proxy.screenLeftCol;
164
- leftCol = Math.max(proxy.bodyLeftCol, screenLeftCol - 1 * proxy.screenColCount),
165
- rightCol = Math.min(proxy.bodyRightCol, screenLeftCol + 2 * proxy.screenColCount),
166
+ leftCol = Math.max(proxy.bodyLeftCol, screenLeftCol - proxy.screenColCount * (null !== (_a = proxy.table.options.columnUpdateBufferCount) && void 0 !== _a ? _a : 1)),
167
+ rightCol = Math.min(proxy.bodyRightCol, screenLeftCol + proxy.screenColCount * (1 + (null !== (_b = proxy.table.options.columnUpdateBufferCount) && void 0 !== _b ? _b : 1))),
166
168
  leftCol === proxy.bodyLeftCol && rightCol === proxy.bodyRightCol || (sync = !1);
167
169
  }
168
170
  for (let col = leftCol; col <= rightCol; col++) for (let row = syncTopRow; row <= syncBottomRow; row++) {