@visactor/vtable 1.11.6-alpha.3 → 1.11.6-alpha.5

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 (49) hide show
  1. package/cjs/core/BaseTable.js +12 -11
  2. package/cjs/core/BaseTable.js.map +1 -1
  3. package/cjs/header-helper/header-helper.js +1 -1
  4. package/cjs/header-helper/style.js +2 -1
  5. package/cjs/index.d.ts +1 -1
  6. package/cjs/index.js +1 -1
  7. package/cjs/index.js.map +1 -1
  8. package/cjs/layout/layout-helper.js +1 -2
  9. package/cjs/plugins/chartModules.js +1 -1
  10. package/cjs/plugins/custom-cell-style.js +1 -1
  11. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +2 -2
  12. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  13. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +9 -1
  14. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
  15. package/cjs/scenegraph/group-creater/progress/update-position/util.js +2 -2
  16. package/cjs/scenegraph/group-creater/progress/update-position/util.js.map +1 -1
  17. package/cjs/scenegraph/layout/update-width.js +1 -2
  18. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  19. package/cjs/scenegraph/scenegraph.js +6 -3
  20. package/cjs/scenegraph/scenegraph.js.map +1 -1
  21. package/cjs/ts-types/base-table.d.ts +1 -0
  22. package/cjs/ts-types/base-table.js.map +1 -1
  23. package/cjs/vrender.js.map +1 -1
  24. package/dist/vtable.js +40 -11
  25. package/dist/vtable.min.js +2 -2
  26. package/es/core/BaseTable.js +13 -10
  27. package/es/core/BaseTable.js.map +1 -1
  28. package/es/header-helper/header-helper.js +1 -1
  29. package/es/header-helper/style.js +2 -1
  30. package/es/index.d.ts +1 -1
  31. package/es/index.js +1 -1
  32. package/es/index.js.map +1 -1
  33. package/es/layout/layout-helper.js +1 -2
  34. package/es/plugins/chartModules.js +1 -1
  35. package/es/plugins/custom-cell-style.js +1 -1
  36. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +2 -2
  37. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  38. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +9 -1
  39. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
  40. package/es/scenegraph/group-creater/progress/update-position/util.js +2 -2
  41. package/es/scenegraph/group-creater/progress/update-position/util.js.map +1 -1
  42. package/es/scenegraph/layout/update-width.js +1 -2
  43. package/es/scenegraph/layout/update-width.js.map +1 -1
  44. package/es/scenegraph/scenegraph.js +6 -3
  45. package/es/scenegraph/scenegraph.js.map +1 -1
  46. package/es/ts-types/base-table.d.ts +1 -0
  47. package/es/ts-types/base-table.js.map +1 -1
  48. package/es/vrender.js.map +1 -1
  49. package/package.json +7 -7
@@ -212,4 +212,4 @@ export class HeaderHelper {
212
212
  setEditor(this._table.options.columns, this._table.internalProps.columns);
213
213
  }
214
214
  }
215
- //# sourceMappingURL=header-helper.js.map
215
+ //# sourceMappingURL=header-helper.js.map
@@ -13,4 +13,5 @@ export function of(headerStyle, defaultHeaderStyle, styleArg, StyleClass, global
13
13
  return headerStyle || defaultHeaderStyle ? headerStyle instanceof Style ? headerStyle : "function" == typeof headerStyle ? of(headerStyle(styleArg), defaultHeaderStyle, styleArg, StyleClass, globalAutoWrapText, theme) : (headerStyle || (headerStyle = {}),
14
14
  globalAutoWrapText && !isValid(headerStyle.autoWrapText) && (headerStyle.autoWrapText = !0),
15
15
  StyleClass === CheckboxStyle ? new CheckboxStyle(null != headerStyle ? headerStyle : {}, null != defaultHeaderStyle ? defaultHeaderStyle : {}, null !== (_a = theme.checkboxStyle) && void 0 !== _a ? _a : {}) : new StyleClass(null != headerStyle ? headerStyle : {}, null != defaultHeaderStyle ? defaultHeaderStyle : {})) : StyleClass.DEFAULT;
16
- }
16
+ }
17
+ //# sourceMappingURL=style.js.map
package/es/index.d.ts CHANGED
@@ -19,7 +19,7 @@ import { restoreMeasureText, setCustomAlphabetCharSet } from './scenegraph/utils
19
19
  export { getDataCellPath } from './tools/get-data-path';
20
20
  export * from './render/jsx';
21
21
  export { getTargetCell } from './event/util';
22
- export declare const version = "1.11.6-alpha.3";
22
+ export declare const version = "1.11.6-alpha.5";
23
23
  export { TYPES, core, ListTable, ListTableSimple, ListTableConstructorOptions, PivotTable, PivotTableSimple, PivotTableConstructorOptions, PivotChartConstructorOptions, PivotChart, GanttConstructorOptions, 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 };
24
24
  declare function getIcons(): {
25
25
  [key: string]: TYPES.ColumnIconOption;
package/es/index.js CHANGED
@@ -40,7 +40,7 @@ export * from "./render/jsx";
40
40
 
41
41
  export { getTargetCell } from "./event/util";
42
42
 
43
- export const version = "1.11.6-alpha.3";
43
+ export const version = "1.11.6-alpha.5";
44
44
 
45
45
  export { TYPES, core, ListTable, ListTableSimple, PivotTable, PivotTableSimple, PivotChart, themes, data, getIcons, clearGlobal, register, DataStatistics, CustomLayout, updateCell, renderChart, graphicUtil, setCustomAlphabetCharSet, restoreMeasureText };
46
46
 
package/es/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC5D,kBAAkB,EAAE,CAAC;AAErB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,QAAQ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E,CAAC;AAGtB,CAAC;AACD,KAAK,CAAC,eAAe,CAAC;AAEtB,cAAc,cAAc,CAAC;AAC7B,cAAc,sCAAsC,CAAC;AAErD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAE/G,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC","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 GanttConstructorOptions,\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';\n// import * as VRender from './vrender';\n\nexport const version = \"1.11.6-alpha.3\";\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 GanttConstructorOptions,\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 // should use import {xxx} from '@visactor/vtable/es/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\nexport { EventTarget } from './event/EventTarget';\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC5D,kBAAk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kB,EAEnB,CAAC;AAGF,SAAS,QAAQ;IAGf,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC;AACrB,CAAC;AAED,SAAS,WAAW;IAClB,QAAQ,CAAC,QAAQ,EAAE,CAAC;AAGtB,CAAC;AACD,KAAK,CAAC,eAAe,CAAC;AAEtB,cAAc,cAAc,CAAC;AAC7B,cAAc,sCAAsC,CAAC;AAErD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAE/G,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC","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 GanttConstructorOptions,\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';\n// import * as VRender from './vrender';\n\nexport const version = \"1.11.6-alpha.5\";\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 GanttConstructorOptions,\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 // should use import {xxx} from '@visactor/vtable/es/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\nexport { EventTarget } from './event/EventTarget';\n"]}
@@ -133,5 +133,4 @@ export function supplementIndicatorNodesForCustomTree(customTree, indicators) {
133
133
  value: null !== (_a = indicator.title) && void 0 !== _a ? _a : indicator.indicatorKey
134
134
  };
135
135
  })), customTree;
136
- }
137
- //# sourceMappingURL=layout-helper.js.map
136
+ }
@@ -1,2 +1,2 @@
1
1
  export const chartTypes = {};
2
- //# sourceMappingURL=chartModules.js.map
2
+ //# sourceMappingURL=chartModules.js.map
@@ -84,4 +84,4 @@ export function mergeStyle(cacheStyle, customCellStyle) {
84
84
  export const registerCustomCellStylePlugin = () => {
85
85
  Factory.registerComponent("customCellStylePlugin", CustomCellStylePlugin);
86
86
  };
87
- //# sourceMappingURL=custom-cell-style.js.map
87
+ //# sourceMappingURL=custom-cell-style.js.map
@@ -9,8 +9,8 @@ export function createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, row
9
9
  const {table: table} = proxy, {leftBottomCornerGroup: leftBottomCornerGroup, rightTopCornerGroup: rightTopCornerGroup, rightBottomCornerGroup: rightBottomCornerGroup} = table.scenegraph;
10
10
  let distCol, distRow, distColForCompute, distRowForCompute;
11
11
  proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode || "autoHeight" === table.heightMode) ? (distColForCompute = table.colCount - 1,
12
- distCol = Math.min(proxy.firstScreenColLimit, table.colCount - 1)) : distCol = Math.min(proxy.firstScreenColLimit, table.colCount - 1),
13
- "adaptive" === table.heightMode ? (distRowForCompute = table.rowCount - 1, distRow = Math.min(proxy.firstScreenRowLimit, table.rowCount - 1)) : distRow = Math.min(proxy.firstScreenRowLimit, table.rowCount - 1),
12
+ distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1)) : distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1),
13
+ "adaptive" === table.heightMode ? (distRowForCompute = table.rowCount - 1, distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1)) : distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1),
14
14
  0 === table.internalProps._widthResizedColMap.size && computeColsWidth(table, 0, null != distColForCompute ? distColForCompute : distCol),
15
15
  0 === table.internalProps._heightResizedRowMap.size && computeRowsHeight(table, 0, null != distRowForCompute ? distRowForCompute : distRow),
16
16
  distCol < table.colCount - table.rightFrozenColCount && computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1),
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/group-creater/progress/create-group-for-first-screen.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3C,MAAM,UAAU,yBAAyB,CACvC,iBAAwB,EACxB,cAAqB,EACrB,cAAqB,EACrB,gBAAuB,EACvB,iBAAwB,EACxB,SAAgB,EAChB,OAAe,EACf,OAAe,EACf,KAAiB;;IAEjB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IACxB,MAAM,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC;IAGhG,KAAK,CAAC,eAAe,EAAE,CAAC;IACxB,KAAK,CAAC,kBAAkB,EAAE,CAAC;IAE3B,IAAI,OAAO,CAAC;IACZ,IAAI,OAAO,CAAC;IACZ,IAAI,iBAAiB,CAAC;IACtB,IAAI,iBAAiB,CAAC;IACtB,IACE,KAAK,CAAC,SAAS,KAAK,UAAU;QAC9B,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC,KAAK,CAAC,UAAU,KAAK,UAAU,IAAI,KAAK,CAAC,UAAU,KAAK,YAAY,CAAC,CAAC,EACtG;QAIA,iBAAiB,GAAG,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC;QACvC,OAAO,GAAG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G,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;QAEtF,KAAK,CAAC,UAAU;YACd,MAAA,MAAA,MAAA,MAAA,MAAC,SAAS,CAAC,SAAmB,0CAAE,GAAG,mCACnC,MAAC,cAAc,CAAC,SAAmB,0CAAE,GAAG,mCACxC,MAAC,cAAc,CAAC,SAAmB,0CAAE,GAAG,mCACxC,MAAC,iBAAiB,CAAC,SAAmB,0CAAE,GAAG,mCAC3C,KAAK,CAAC,QAAQ,CAAC;QACjB,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC;QAChC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QACtC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;QAGtF,KAAK,CAAC,QAAQ,EAAE,CAAC;KAClB;AACH,CAAC","file":"create-group-for-first-screen.js","sourcesContent":["import type { ListTable } from '../../../ListTable';\nimport { ListTableAPI } from '../../../ts-types';\nimport type { Group } from '../../graphic/group';\nimport { computeColsWidth } from '../../layout/compute-col-width';\nimport { computeRowsHeight } from '../../layout/compute-row-height';\nimport { createColGroup } from '../column';\nimport type { SceneProxy } from './proxy';\n\nexport function createGroupForFirstScreen(\n cornerHeaderGroup: Group,\n colHeaderGroup: Group,\n rowHeaderGroup: Group,\n rightFrozenGroup: Group,\n bottomFrozenGroup: Group,\n bodyGroup: Group,\n xOrigin: number,\n yOrigin: number,\n proxy: SceneProxy\n) {\n const { table } = proxy;\n const { leftBottomCornerGroup, rightTopCornerGroup, rightBottomCornerGroup } = table.scenegraph;\n\n // compute parameters\n proxy.setParamsForRow();\n proxy.setParamsForColumn();\n\n let distCol;\n let distRow;\n let distColForCompute;\n let distRowForCompute;\n if (\n table.widthMode === 'adaptive' ||\n (table.options.autoWrapText && (table.heightMode === 'adaptive' || table.heightMode === 'autoHeight'))\n ) {\n // distCol = table.colCount - 1;\n // proxy.colEnd = distCol;\n\n distColForCompute = table.colCount - 1;\n distCol = Math.min(proxy.firstScreenColLimit, table.colCount - 1);\n } else {\n distCol = Math.min(proxy.firstScreenColLimit, table.colCount - 1);\n }\n if (table.heightMode === 'adaptive') {\n // distRow = table.rowCount - 1;\n // proxy.rowEnd = distRow;\n\n distRowForCompute = table.rowCount - 1;\n distRow = Math.min(proxy.firstScreenRowLimit, table.rowCount - 1);\n } else {\n distRow = Math.min(proxy.firstScreenRowLimit, table.rowCount - 1);\n }\n if (table.internalProps._widthResizedColMap.size === 0) {\n // compute colums width in first screen\n computeColsWidth(table, 0, distColForCompute ?? distCol);\n }\n\n if (table.internalProps._heightResizedRowMap.size === 0) {\n // compute rows height in first screen\n computeRowsHeight(table, 0, distRowForCompute ?? distRow);\n }\n\n if (distCol < table.colCount - table.rightFrozenColCount) {\n // compute right frozen row height\n computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1);\n }\n if (distRow < table.rowCount - table.bottomFrozenRowCount) {\n // compute bottom frozen row height\n computeRowsHeight(table, table.rowCount - table.bottomFrozenRowCount, table.rowCount - 1);\n }\n\n // update colHeaderGroup rowHeaderGroup bodyGroup position\n table.scenegraph.colHeaderGroup.setAttribute('x', table.getFrozenColsWidth());\n table.scenegraph.rowHeaderGroup.setAttribute('y', table.getFrozenRowsHeight());\n table.scenegraph.bottomFrozenGroup.setAttribute('x', table.getFrozenColsWidth());\n table.scenegraph.rightFrozenGroup.setAttribute('y', table.getFrozenRowsHeight());\n table.scenegraph.bodyGroup.setAttributes({\n x: table.getFrozenColsWidth(),\n y: table.getFrozenRowsHeight()\n });\n\n // create cornerHeaderGroup\n createColGroup(\n cornerHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.frozenColCount - 1, // colEnd\n 0, // rowStart\n table.frozenRowCount - 1, // rowEnd\n table.isListTable() ? 'columnHeader' : 'cornerHeader', // CellType\n table\n );\n\n // create colHeaderGroup\n distCol - table.rightFrozenColCount >= table.frozenColCount &&\n createColGroup(\n colHeaderGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n // Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n distCol - table.rightFrozenColCount,\n 0, // rowStart\n table.frozenRowCount - 1, // rowEnd\n 'columnHeader', // isHeader\n table\n );\n\n // create rowHeaderGroup\n if (table.frozenColCount > 0) {\n if (table.leftRowSeriesNumberCount > 0) {\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.leftRowSeriesNumberCount - 1, // colEnd\n table.frozenRowCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n 'rowHeader', // isHeader\n table\n );\n }\n if (table.rowHeaderLevelCount > 0) {\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n table.leftRowSeriesNumberCount, // colStart\n table.leftRowSeriesNumberCount + table.rowHeaderLevelCount - 1, // colEnd\n table.frozenRowCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n 'rowHeader', // isHeader\n table\n );\n }\n if (table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount) {\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, // colStart\n table.frozenColCount - 1, // colEnd\n table.frozenRowCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n 'body',\n table\n );\n }\n }\n\n if (table.bottomFrozenRowCount > 0) {\n // if (!table.isPivotChart()) {\n // create left bottom frozen\n // if (table.rowHeaderLevelCount > 0) {\n // createColGroup(\n // leftBottomCornerGroup,\n // xOrigin,\n // yOrigin,\n // 0, // colStart\n // table.rowHeaderLevelCount - 1, // colEnd\n // table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n // table.rowCount - 1, // rowEnd\n // 'rowHeader', // isHeader\n // table\n // );\n // }\n // if (table.frozenColCount > table.rowHeaderLevelCount) {\n // createColGroup(\n // leftBottomCornerGroup,\n // xOrigin,\n // yOrigin,\n // table.rowHeaderLevelCount, // colStart\n // table.frozenColCount - 1, // colEnd\n // table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n // table.rowCount - 1, // rowEnd\n // 'body',\n // table\n // );\n // }\n\n if (table.frozenColCount > 0) {\n if (table.leftRowSeriesNumberCount > 0) {\n createColGroup(\n leftBottomCornerGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.leftRowSeriesNumberCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n 'rowHeader', // isHeader\n table\n );\n }\n if (table.rowHeaderLevelCount > 0) {\n createColGroup(\n leftBottomCornerGroup,\n xOrigin,\n yOrigin,\n table.leftRowSeriesNumberCount, // colStart\n table.leftRowSeriesNumberCount + table.rowHeaderLevelCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n 'rowHeader', // isHeader\n table\n );\n }\n if (table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount) {\n createColGroup(\n leftBottomCornerGroup,\n xOrigin,\n yOrigin,\n table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, // colStart\n table.frozenColCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n 'body',\n table\n );\n }\n }\n // }\n // create bottomFrozenGroup\n distCol - table.rightFrozenColCount >= table.frozenColCount &&\n createColGroup(\n bottomFrozenGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n // Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n distCol - table.rightFrozenColCount,\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n table.isPivotChart() ? 'rowHeader' : 'body', // isHeader\n table\n );\n }\n\n if (table.rightFrozenColCount > 0) {\n // if (!table.isPivotChart()) {\n // create right top frozen Group\n createColGroup(\n rightTopCornerGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n 0, // rowStart\n table.frozenRowCount - 1, // rowEnd\n 'columnHeader', // isHeader\n table\n );\n // }\n // create rightFrozenGroup\n createColGroup(\n rightFrozenGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n table.frozenRowCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n table.isPivotChart() ? 'rowHeader' : 'body', // isHeader\n table\n );\n }\n\n if (table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0) {\n // create right bottom frozen Group\n createColGroup(\n rightBottomCornerGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n 'body', // isHeader\n table\n );\n }\n\n // create bodyGroup\n distCol - table.rightFrozenColCount >= table.frozenColCount &&\n createColGroup(\n bodyGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n // Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n distCol - table.rightFrozenColCount,\n table.frozenRowCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n 'body', // isHeader\n table\n );\n\n // update progress information\n if (\n !bodyGroup.firstChild &&\n !colHeaderGroup.firstChild &&\n !cornerHeaderGroup.firstChild &&\n !rowHeaderGroup.firstChild\n ) {\n // 无数据\n proxy.currentRow = proxy.totalRow;\n proxy.rowEnd = proxy.currentRow;\n proxy.rowUpdatePos = proxy.rowEnd + 1;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n\n proxy.currentCol = proxy.totalCol;\n proxy.colEnd = proxy.currentCol;\n proxy.colUpdatePos = proxy.colEnd + 1;\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n } else {\n proxy.currentRow =\n (bodyGroup.firstChild as Group)?.rowNumber ?? (rowHeaderGroup.firstChild as Group)?.rowNumber ?? proxy.totalRow;\n proxy.rowEnd = proxy.currentRow;\n proxy.rowUpdatePos = proxy.rowEnd + 1;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n\n proxy.currentCol =\n (bodyGroup.lastChild as Group)?.col ??\n (colHeaderGroup.lastChild as Group)?.col ??\n (rowHeaderGroup.lastChild as Group)?.col ??\n (cornerHeaderGroup.lastChild as Group)?.col ??\n proxy.totalCol;\n proxy.colEnd = proxy.currentCol;\n proxy.colUpdatePos = proxy.colEnd + 1;\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n\n // 开始异步任务\n proxy.progress();\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/scenegraph/group-creater/progress/create-group-for-first-screen.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3C,MAAM,UAAU,y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Q,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;QAGtF,KAAK,CAAC,QAAQ,EAAE,CAAC;KAClB;AACH,CAAC","file":"create-group-for-first-screen.js","sourcesContent":["import type { ListTable } from '../../../ListTable';\nimport { ListTableAPI } from '../../../ts-types';\nimport type { Group } from '../../graphic/group';\nimport { computeColsWidth } from '../../layout/compute-col-width';\nimport { computeRowsHeight } from '../../layout/compute-row-height';\nimport { createColGroup } from '../column';\nimport type { SceneProxy } from './proxy';\n\nexport function createGroupForFirstScreen(\n cornerHeaderGroup: Group,\n colHeaderGroup: Group,\n rowHeaderGroup: Group,\n rightFrozenGroup: Group,\n bottomFrozenGroup: Group,\n bodyGroup: Group,\n xOrigin: number,\n yOrigin: number,\n proxy: SceneProxy\n) {\n const { table } = proxy;\n const { leftBottomCornerGroup, rightTopCornerGroup, rightBottomCornerGroup } = table.scenegraph;\n\n // compute parameters\n proxy.setParamsForRow();\n proxy.setParamsForColumn();\n\n let distCol;\n let distRow;\n let distColForCompute;\n let distRowForCompute;\n if (\n table.widthMode === 'adaptive' ||\n (table.options.autoWrapText && (table.heightMode === 'adaptive' || table.heightMode === 'autoHeight'))\n ) {\n // distCol = table.colCount - 1;\n // proxy.colEnd = distCol;\n\n distColForCompute = table.colCount - 1;\n distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1);\n } else {\n distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1);\n }\n if (table.heightMode === 'adaptive') {\n // distRow = table.rowCount - 1;\n // proxy.rowEnd = distRow;\n\n distRowForCompute = table.rowCount - 1;\n distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1);\n } else {\n distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1);\n }\n if (table.internalProps._widthResizedColMap.size === 0) {\n // compute colums width in first screen\n computeColsWidth(table, 0, distColForCompute ?? distCol);\n }\n\n if (table.internalProps._heightResizedRowMap.size === 0) {\n // compute rows height in first screen\n computeRowsHeight(table, 0, distRowForCompute ?? distRow);\n }\n\n if (distCol < table.colCount - table.rightFrozenColCount) {\n // compute right frozen row height\n computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1);\n }\n if (distRow < table.rowCount - table.bottomFrozenRowCount) {\n // compute bottom frozen row height\n computeRowsHeight(table, table.rowCount - table.bottomFrozenRowCount, table.rowCount - 1);\n }\n\n // update colHeaderGroup rowHeaderGroup bodyGroup position\n table.scenegraph.colHeaderGroup.setAttribute('x', table.getFrozenColsWidth());\n table.scenegraph.rowHeaderGroup.setAttribute('y', table.getFrozenRowsHeight());\n table.scenegraph.bottomFrozenGroup.setAttribute('x', table.getFrozenColsWidth());\n table.scenegraph.rightFrozenGroup.setAttribute('y', table.getFrozenRowsHeight());\n table.scenegraph.bodyGroup.setAttributes({\n x: table.getFrozenColsWidth(),\n y: table.getFrozenRowsHeight()\n });\n\n // create cornerHeaderGroup\n createColGroup(\n cornerHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.frozenColCount - 1, // colEnd\n 0, // rowStart\n table.frozenRowCount - 1, // rowEnd\n table.isListTable() ? 'columnHeader' : 'cornerHeader', // CellType\n table\n );\n\n // create colHeaderGroup\n distCol - table.rightFrozenColCount >= table.frozenColCount &&\n createColGroup(\n colHeaderGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n // Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n distCol - table.rightFrozenColCount,\n 0, // rowStart\n table.frozenRowCount - 1, // rowEnd\n 'columnHeader', // isHeader\n table\n );\n\n // create rowHeaderGroup\n if (table.frozenColCount > 0) {\n if (table.leftRowSeriesNumberCount > 0) {\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.leftRowSeriesNumberCount - 1, // colEnd\n table.frozenRowCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n 'rowHeader', // isHeader\n table\n );\n }\n if (table.rowHeaderLevelCount > 0) {\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n table.leftRowSeriesNumberCount, // colStart\n table.leftRowSeriesNumberCount + table.rowHeaderLevelCount - 1, // colEnd\n table.frozenRowCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n 'rowHeader', // isHeader\n table\n );\n }\n if (table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount) {\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, // colStart\n table.frozenColCount - 1, // colEnd\n table.frozenRowCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n 'body',\n table\n );\n }\n }\n\n if (table.bottomFrozenRowCount > 0) {\n // if (!table.isPivotChart()) {\n // create left bottom frozen\n // if (table.rowHeaderLevelCount > 0) {\n // createColGroup(\n // leftBottomCornerGroup,\n // xOrigin,\n // yOrigin,\n // 0, // colStart\n // table.rowHeaderLevelCount - 1, // colEnd\n // table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n // table.rowCount - 1, // rowEnd\n // 'rowHeader', // isHeader\n // table\n // );\n // }\n // if (table.frozenColCount > table.rowHeaderLevelCount) {\n // createColGroup(\n // leftBottomCornerGroup,\n // xOrigin,\n // yOrigin,\n // table.rowHeaderLevelCount, // colStart\n // table.frozenColCount - 1, // colEnd\n // table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n // table.rowCount - 1, // rowEnd\n // 'body',\n // table\n // );\n // }\n\n if (table.frozenColCount > 0) {\n if (table.leftRowSeriesNumberCount > 0) {\n createColGroup(\n leftBottomCornerGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.leftRowSeriesNumberCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n 'rowHeader', // isHeader\n table\n );\n }\n if (table.rowHeaderLevelCount > 0) {\n createColGroup(\n leftBottomCornerGroup,\n xOrigin,\n yOrigin,\n table.leftRowSeriesNumberCount, // colStart\n table.leftRowSeriesNumberCount + table.rowHeaderLevelCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n 'rowHeader', // isHeader\n table\n );\n }\n if (table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount) {\n createColGroup(\n leftBottomCornerGroup,\n xOrigin,\n yOrigin,\n table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, // colStart\n table.frozenColCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n 'body',\n table\n );\n }\n }\n // }\n // create bottomFrozenGroup\n distCol - table.rightFrozenColCount >= table.frozenColCount &&\n createColGroup(\n bottomFrozenGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n // Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n distCol - table.rightFrozenColCount,\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n table.isPivotChart() ? 'rowHeader' : 'body', // isHeader\n table\n );\n }\n\n if (table.rightFrozenColCount > 0) {\n // if (!table.isPivotChart()) {\n // create right top frozen Group\n createColGroup(\n rightTopCornerGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n 0, // rowStart\n table.frozenRowCount - 1, // rowEnd\n 'columnHeader', // isHeader\n table\n );\n // }\n // create rightFrozenGroup\n createColGroup(\n rightFrozenGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n table.frozenRowCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n table.isPivotChart() ? 'rowHeader' : 'body', // isHeader\n table\n );\n }\n\n if (table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0) {\n // create right bottom frozen Group\n createColGroup(\n rightBottomCornerGroup,\n xOrigin,\n yOrigin,\n table.colCount - 1 - table.rightFrozenColCount + 1, // colStart\n table.colCount - 1, // colEnd\n table.rowCount - 1 - table.bottomFrozenRowCount + 1, // rowStart\n table.rowCount - 1, // rowEnd\n 'body', // isHeader\n table\n );\n }\n\n // create bodyGroup\n distCol - table.rightFrozenColCount >= table.frozenColCount &&\n createColGroup(\n bodyGroup,\n xOrigin,\n yOrigin,\n table.frozenColCount, // colStart\n // Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), // colEnd\n distCol - table.rightFrozenColCount,\n table.frozenRowCount, // rowStart\n // Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), // rowEnd\n distRow - table.bottomFrozenRowCount,\n 'body', // isHeader\n table\n );\n\n // update progress information\n if (\n !bodyGroup.firstChild &&\n !colHeaderGroup.firstChild &&\n !cornerHeaderGroup.firstChild &&\n !rowHeaderGroup.firstChild\n ) {\n // 无数据\n proxy.currentRow = proxy.totalRow;\n proxy.rowEnd = proxy.currentRow;\n proxy.rowUpdatePos = proxy.rowEnd + 1;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n\n proxy.currentCol = proxy.totalCol;\n proxy.colEnd = proxy.currentCol;\n proxy.colUpdatePos = proxy.colEnd + 1;\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n } else {\n proxy.currentRow =\n (bodyGroup.firstChild as Group)?.rowNumber ?? (rowHeaderGroup.firstChild as Group)?.rowNumber ?? proxy.totalRow;\n proxy.rowEnd = proxy.currentRow;\n proxy.rowUpdatePos = proxy.rowEnd + 1;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n\n proxy.currentCol =\n (bodyGroup.lastChild as Group)?.col ??\n (colHeaderGroup.lastChild as Group)?.col ??\n (rowHeaderGroup.lastChild as Group)?.col ??\n (cornerHeaderGroup.lastChild as Group)?.col ??\n proxy.totalCol;\n proxy.colEnd = proxy.currentCol;\n proxy.colUpdatePos = proxy.colEnd + 1;\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n\n // 开始异步任务\n proxy.progress();\n }\n}\n"]}
@@ -142,7 +142,8 @@ export function updateColContent(syncLeftCol, syncRightCol, proxy) {
142
142
  const colGroup = proxy.table.scenegraph.getColGroup(col);
143
143
  colGroup && updateColGroupContentAsync(colGroup, proxy);
144
144
  }
145
- proxy.progress();
145
+ updateColumnContainerWidth(proxy.table.scenegraph.colHeaderGroup), updateColumnContainerWidth(proxy.table.scenegraph.bottomFrozenGroup),
146
+ updateColumnContainerWidth(proxy.table.scenegraph.bodyGroup), proxy.progress();
146
147
  }
147
148
 
148
149
  function updateAllColPosition(distStartColY, count, direction, proxy) {
@@ -154,4 +155,11 @@ function updateAllColPosition(distStartColY, count, direction, proxy) {
154
155
  "group" === colGroup.type && updateColGroupPosition(colGroup, "left" === direction ? colGroup.col + count : colGroup.col - count, 0 === index ? distStartColY : colGroup._prev.attribute.x + proxy.table.getColWidth(colGroup._prev.col));
155
156
  }));
156
157
  }
158
+
159
+ function updateColumnContainerWidth(containerGroup) {
160
+ var _a;
161
+ const lastColGroup = getLastChild(containerGroup);
162
+ lastColGroup && (containerGroup.setAttribute("width", lastColGroup.attribute.x + lastColGroup.attribute.width),
163
+ null === (_a = containerGroup.border) || void 0 === _a || _a.setAttribute("width", lastColGroup.attribute.x + lastColGroup.attribute.width));
164
+ }
157
165
  //# sourceMappingURL=dynamic-set-x.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/group-creater/progress/update-position/dynamic-set-x.ts"],"names":[],"mappings":";;;;;;;;;AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAsB,aAAa,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEzE,MAAM,UAAgB,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,KAAK,CAAC,iBAAiB,GAAG,KAAK,CAAC,KAAK,CAAC,kBAAkB,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,uBAAu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E;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(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);\n const bottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2, proxy.table.rowCount - 1);\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,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAsB,aAAa,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEzE,MAAM,UAAgB,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;aAA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C,CAAC;IAClD,IAAI,CAAC,YAAY,EAAE;QACjB,OAAO;KACR;IACD,cAAc,CAAC,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC,GAAG,YAAY,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC9F,MAAA,cAAc,CAAC,MAAM,0CAAE,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC,GAAG,YAAY,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACxG,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, proxy.table.rowCount - 1);\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\n // update column container width\n updateColumnContainerWidth(proxy.table.scenegraph.colHeaderGroup);\n updateColumnContainerWidth(proxy.table.scenegraph.bottomFrozenGroup);\n updateColumnContainerWidth(proxy.table.scenegraph.bodyGroup);\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\nfunction updateColumnContainerWidth(containerGroup: Group) {\n // update column container width\n const lastColGroup = getLastChild(containerGroup);\n if (!lastColGroup) {\n return;\n }\n containerGroup.setAttribute('width', lastColGroup.attribute.x + lastColGroup.attribute.width);\n containerGroup.border?.setAttribute('width', lastColGroup.attribute.x + lastColGroup.attribute.width);\n}\n"]}
@@ -64,13 +64,13 @@ function checkHasColMerge(colStart, colEnd, row, proxy) {
64
64
 
65
65
  export function getFirstChild(containerGroup) {
66
66
  let child = containerGroup.firstChild;
67
- for (;"group" !== child.type; ) child = child._next;
67
+ for (;child && "group" !== child.type; ) child = child._next;
68
68
  return child;
69
69
  }
70
70
 
71
71
  export function getLastChild(containerGroup) {
72
72
  let child = containerGroup.lastChild;
73
- for (;"group" !== child.type; ) child = child._prev;
73
+ for (;child && "group" !== child.type; ) child = child._prev;
74
74
  return child;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AG,cAAc,CAAC,UAAmB,CAAC;IAC/C,OAAO,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE;QAC7B,KAAK,GAAG,KAAK,CAAC,KAAc,CAAC;KAC9B;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,cAAqB;IAChD,IAAI,KAAK,GAAG,cAAc,CAAC,SAAkB,CAAC;IAC9C,OAAO,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE;QAC7B,KAAK,GAAG,KAAK,CAAC,KAAc,CAAC;KAC9B;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAY;IACvC,IAAI,KAAK,GAAG,KAAK,CAAC,KAAc,CAAC;IACjC,OAAO,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE;QACtC,KAAK,GAAG,KAAK,CAAC,KAAc,CAAC;KAC9B;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAY;IACvC,IAAI,KAAK,GAAG,KAAK,CAAC,KAAc,CAAC;IACjC,OAAO,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE;QACtC,KAAK,GAAG,KAAK,CAAC,KAAc,CAAC;KAC9B;IACD,OAAO,KAAK,CAAC;AACf,CAAC","file":"util.js","sourcesContent":["import type { Group } from '../../../graphic/group';\nimport { getCellMergeInfo } from '../../../utils/get-cell-merge';\nimport { updateCell } from '../../cell-helper';\nimport type { SceneProxy } from '../proxy';\n\nexport function checkFirstRowMerge(row: number, proxy: SceneProxy) {\n for (let col = 0; col < proxy.table.colCount; col++) {\n if (\n (col >= proxy.table.rowHeaderLevelCount && col < proxy.colStart) ||\n (col > proxy.colEnd && col < proxy.table.colCount - proxy.table.rightFrozenColCount)\n ) {\n continue;\n }\n\n const range = getCellMergeInfo(proxy.table, col, row);\n // 清除之前mock的Merge cell\n range && clearHadMergedRow(range.start.row, range.end.row, col, proxy);\n\n // 重新生成mock的Merge cell\n if (\n range &&\n range.start.row !== row &&\n proxy.highPerformanceGetCell(range.start.col, range.start.row, true).role !== 'cell'\n ) {\n // 在row的位置添加range.start.row单元格\n const oldCellGroup = proxy.highPerformanceGetCell(col, row, true);\n const newCellGroup = updateCell(range.start.col, range.start.row, proxy.table, true);\n\n newCellGroup.col = col;\n newCellGroup.row = row;\n newCellGroup.setAttribute('y', proxy.table.getRowsHeight(proxy.table.frozenRowCount, range.start.row - 1));\n\n oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup);\n oldCellGroup.parent.removeChild(oldCellGroup);\n\n oldCellGroup.needUpdate = false;\n newCellGroup.needUpdate = false;\n\n // update cache\n if (proxy.cellCache.get(col)) {\n proxy.cellCache.set(col, newCellGroup);\n }\n }\n }\n}\n\nexport function checkFirstColMerge(col: number, proxy: SceneProxy) {\n for (let row = 0; row < proxy.table.rowCount; row++) {\n if (\n (row >= proxy.table.frozenRowCount && row < proxy.rowStart) ||\n (row > proxy.rowEnd && row < proxy.table.rowCount - proxy.table.bottomFrozenRowCount)\n ) {\n continue;\n }\n\n const range = getCellMergeInfo(proxy.table, col, row);\n // 清除之前mock的Merge cell\n range && clearHadMergedColumn(range.start.col, range.end.col, row, proxy);\n\n if (\n range &&\n range.start.col !== col &&\n proxy.highPerformanceGetCell(range.start.col, range.start.row, true).role !== 'cell'\n ) {\n // 在col的位置添加range.start.col单元格\n const oldCellGroup = proxy.highPerformanceGetCell(col, row, true);\n const newCellGroup = updateCell(range.start.col, range.start.row, proxy.table, true);\n\n newCellGroup.col = col;\n newCellGroup.row = row;\n newCellGroup.setAttribute(\n 'x',\n proxy.table.getColsWidth(proxy.table.rowHeaderLevelCount, range.start.col - 1) - oldCellGroup.parent.attribute.x\n );\n newCellGroup.setAttributes({\n x:\n proxy.table.getColsWidth(proxy.table.rowHeaderLevelCount, range.start.col - 1) -\n oldCellGroup.parent.attribute.x,\n y: proxy.table.getRowsHeight(0, range.start.row - 1) - oldCellGroup.parent.attribute.y\n });\n\n oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup);\n oldCellGroup.parent.removeChild(oldCellGroup);\n\n oldCellGroup.needUpdate = false;\n newCellGroup.needUpdate = false;\n\n // update cache\n if (proxy.cellCache.get(col)) {\n proxy.cellCache.set(col, newCellGroup);\n }\n }\n }\n}\n\nfunction clearHadMergedRow(rowStart: number, rowEnd: number, col: number, proxy: SceneProxy) {\n for (let row = rowStart; row <= rowEnd; row++) {\n const cellGroup = proxy.highPerformanceGetCell(col, row, true);\n if (cellGroup.role !== 'shadow-cell' && cellGroup.role !== 'empty' && cellGroup.row !== rowStart) {\n cellGroup.role = 'shadow-cell';\n cellGroup.setAttributes({\n width: 0,\n height: proxy.table.getRowHeight(cellGroup.row),\n y: proxy.table.getRowsHeight(proxy.table.frozenRowCount, cellGroup.row - 1),\n x: 0\n });\n cellGroup.clear();\n }\n }\n}\n\nfunction clearHadMergedColumn(colStart: number, colEnd: number, row: number, proxy: SceneProxy) {\n for (let col = colStart; col <= colEnd; col++) {\n const cellGroup = proxy.highPerformanceGetCell(col, row, true);\n if (cellGroup.role !== 'shadow-cell' && cellGroup.role !== 'empty' && cellGroup.col !== colStart) {\n cellGroup.role = 'shadow-cell';\n cellGroup.setAttributes({\n width: 0,\n height: proxy.table.getRowHeight(cellGroup.row),\n y: proxy.table.getRowsHeight(0, cellGroup.row - 1),\n x: 0\n });\n cellGroup.clear();\n }\n }\n}\n\nfunction checkHasColMerge(colStart: number, colEnd: number, row: number, proxy: SceneProxy) {\n for (let col = colStart; col <= colEnd; col++) {\n if (\n proxy.highPerformanceGetCell(col, row, true).role !== 'shadow-cell' &&\n proxy.highPerformanceGetCell(col, row, true).role !== 'empty'\n ) {\n return true;\n }\n }\n return false;\n}\n\nexport function getFirstChild(containerGroup: Group): Group {\n let child = containerGroup.firstChild as Group;\n while (child.type !== 'group') {\n child = child._next as Group;\n }\n return child;\n}\n\nexport function getLastChild(containerGroup: Group): Group {\n let child = containerGroup.lastChild as Group;\n while (child.type !== 'group') {\n child = child._prev as Group;\n }\n return child;\n}\n\nexport function getPrevGroup(group: Group): Group {\n let child = group._prev as Group;\n while (child && child.type !== 'group') {\n child = child._prev as Group;\n }\n return child;\n}\n\nexport function getNextGroup(group: Group): Group {\n let child = group._next as Group;\n while (child && child.type !== 'group') {\n child = child._next as Group;\n }\n return child;\n}\n"]}
1
+ {"version":3,"sources":["../src/scenegraph/group-creater/progress/update-position/util.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,MAAM,UAAU,kBAAkB,CAAC,GAAW,EAAE,KAAiB;IAC/D,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE;QACnD,IACE,CAAC,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,mBAAmB,IAAI,GAAG,GAAG,KAAK,CAAC,QAAQ,CAAC;YAChE,CAAC,GAAG,GAAG,KAAK,CAAC,MAAM,IAAI,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,mBAAmB,CAAC,EACpF;YACA,SAAS;SACV;QAED,MAAM,KAAK,GAAG,gBAAgB,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QAEtD,KAAK,IAAI,iBAAiB,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;QAGvE,IACE,KAAK;YACL,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG;YACvB,KAAK,CAAC,sBAAsB,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,IA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CAAC,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC,IAAI,KAAK,OAAO,EAC7D;YACA,OAAO,IAAI,CAAC;SACb;KACF;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,cAAqB;IACjD,IAAI,KAAK,GAAG,cAAc,CAAC,UAAmB,CAAC;IAC/C,OAAO,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE;QACtC,KAAK,GAAG,KAAK,CAAC,KAAc,CAAC;KAC9B;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,cAAqB;IAChD,IAAI,KAAK,GAAG,cAAc,CAAC,SAAkB,CAAC;IAC9C,OAAO,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE;QACtC,KAAK,GAAG,KAAK,CAAC,KAAc,CAAC;KAC9B;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAY;IACvC,IAAI,KAAK,GAAG,KAAK,CAAC,KAAc,CAAC;IACjC,OAAO,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE;QACtC,KAAK,GAAG,KAAK,CAAC,KAAc,CAAC;KAC9B;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAY;IACvC,IAAI,KAAK,GAAG,KAAK,CAAC,KAAc,CAAC;IACjC,OAAO,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE;QACtC,KAAK,GAAG,KAAK,CAAC,KAAc,CAAC;KAC9B;IACD,OAAO,KAAK,CAAC;AACf,CAAC","file":"util.js","sourcesContent":["import type { Group } from '../../../graphic/group';\nimport { getCellMergeInfo } from '../../../utils/get-cell-merge';\nimport { updateCell } from '../../cell-helper';\nimport type { SceneProxy } from '../proxy';\n\nexport function checkFirstRowMerge(row: number, proxy: SceneProxy) {\n for (let col = 0; col < proxy.table.colCount; col++) {\n if (\n (col >= proxy.table.rowHeaderLevelCount && col < proxy.colStart) ||\n (col > proxy.colEnd && col < proxy.table.colCount - proxy.table.rightFrozenColCount)\n ) {\n continue;\n }\n\n const range = getCellMergeInfo(proxy.table, col, row);\n // 清除之前mock的Merge cell\n range && clearHadMergedRow(range.start.row, range.end.row, col, proxy);\n\n // 重新生成mock的Merge cell\n if (\n range &&\n range.start.row !== row &&\n proxy.highPerformanceGetCell(range.start.col, range.start.row, true).role !== 'cell'\n ) {\n // 在row的位置添加range.start.row单元格\n const oldCellGroup = proxy.highPerformanceGetCell(col, row, true);\n const newCellGroup = updateCell(range.start.col, range.start.row, proxy.table, true);\n\n newCellGroup.col = col;\n newCellGroup.row = row;\n newCellGroup.setAttribute('y', proxy.table.getRowsHeight(proxy.table.frozenRowCount, range.start.row - 1));\n\n oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup);\n oldCellGroup.parent.removeChild(oldCellGroup);\n\n oldCellGroup.needUpdate = false;\n newCellGroup.needUpdate = false;\n\n // update cache\n if (proxy.cellCache.get(col)) {\n proxy.cellCache.set(col, newCellGroup);\n }\n }\n }\n}\n\nexport function checkFirstColMerge(col: number, proxy: SceneProxy) {\n for (let row = 0; row < proxy.table.rowCount; row++) {\n if (\n (row >= proxy.table.frozenRowCount && row < proxy.rowStart) ||\n (row > proxy.rowEnd && row < proxy.table.rowCount - proxy.table.bottomFrozenRowCount)\n ) {\n continue;\n }\n\n const range = getCellMergeInfo(proxy.table, col, row);\n // 清除之前mock的Merge cell\n range && clearHadMergedColumn(range.start.col, range.end.col, row, proxy);\n\n if (\n range &&\n range.start.col !== col &&\n proxy.highPerformanceGetCell(range.start.col, range.start.row, true).role !== 'cell'\n ) {\n // 在col的位置添加range.start.col单元格\n const oldCellGroup = proxy.highPerformanceGetCell(col, row, true);\n const newCellGroup = updateCell(range.start.col, range.start.row, proxy.table, true);\n\n newCellGroup.col = col;\n newCellGroup.row = row;\n newCellGroup.setAttribute(\n 'x',\n proxy.table.getColsWidth(proxy.table.rowHeaderLevelCount, range.start.col - 1) - oldCellGroup.parent.attribute.x\n );\n newCellGroup.setAttributes({\n x:\n proxy.table.getColsWidth(proxy.table.rowHeaderLevelCount, range.start.col - 1) -\n oldCellGroup.parent.attribute.x,\n y: proxy.table.getRowsHeight(0, range.start.row - 1) - oldCellGroup.parent.attribute.y\n });\n\n oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup);\n oldCellGroup.parent.removeChild(oldCellGroup);\n\n oldCellGroup.needUpdate = false;\n newCellGroup.needUpdate = false;\n\n // update cache\n if (proxy.cellCache.get(col)) {\n proxy.cellCache.set(col, newCellGroup);\n }\n }\n }\n}\n\nfunction clearHadMergedRow(rowStart: number, rowEnd: number, col: number, proxy: SceneProxy) {\n for (let row = rowStart; row <= rowEnd; row++) {\n const cellGroup = proxy.highPerformanceGetCell(col, row, true);\n if (cellGroup.role !== 'shadow-cell' && cellGroup.role !== 'empty' && cellGroup.row !== rowStart) {\n cellGroup.role = 'shadow-cell';\n cellGroup.setAttributes({\n width: 0,\n height: proxy.table.getRowHeight(cellGroup.row),\n y: proxy.table.getRowsHeight(proxy.table.frozenRowCount, cellGroup.row - 1),\n x: 0\n });\n cellGroup.clear();\n }\n }\n}\n\nfunction clearHadMergedColumn(colStart: number, colEnd: number, row: number, proxy: SceneProxy) {\n for (let col = colStart; col <= colEnd; col++) {\n const cellGroup = proxy.highPerformanceGetCell(col, row, true);\n if (cellGroup.role !== 'shadow-cell' && cellGroup.role !== 'empty' && cellGroup.col !== colStart) {\n cellGroup.role = 'shadow-cell';\n cellGroup.setAttributes({\n width: 0,\n height: proxy.table.getRowHeight(cellGroup.row),\n y: proxy.table.getRowsHeight(0, cellGroup.row - 1),\n x: 0\n });\n cellGroup.clear();\n }\n }\n}\n\nfunction checkHasColMerge(colStart: number, colEnd: number, row: number, proxy: SceneProxy) {\n for (let col = colStart; col <= colEnd; col++) {\n if (\n proxy.highPerformanceGetCell(col, row, true).role !== 'shadow-cell' &&\n proxy.highPerformanceGetCell(col, row, true).role !== 'empty'\n ) {\n return true;\n }\n }\n return false;\n}\n\nexport function getFirstChild(containerGroup: Group): Group {\n let child = containerGroup.firstChild as Group;\n while (child && child.type !== 'group') {\n child = child._next as Group;\n }\n return child;\n}\n\nexport function getLastChild(containerGroup: Group): Group {\n let child = containerGroup.lastChild as Group;\n while (child && child.type !== 'group') {\n child = child._prev as Group;\n }\n return child;\n}\n\nexport function getPrevGroup(group: Group): Group {\n let child = group._prev as Group;\n while (child && child.type !== 'group') {\n child = child._prev as Group;\n }\n return child;\n}\n\nexport function getNextGroup(group: Group): Group {\n let child = group._next as Group;\n while (child && child.type !== 'group') {\n child = child._next as Group;\n }\n return child;\n}\n"]}
@@ -240,8 +240,7 @@ function resetRowHeight(scene, row) {
240
240
  scene.table._setRowHeight(row, maxHeight, !0);
241
241
  for (let col = 0; col < scene.table.colCount; col++) {
242
242
  const distHeight = maxHeight, cell = scene.highPerformanceGetCell(col, row);
243
- if ("empty" === cell.role) return;
244
- updateCellHeightForRow(scene, cell, col, row, distHeight, distHeight - cell.attribute.height, scene.table.isHeader(col, row));
243
+ "empty" !== cell.role && updateCellHeightForRow(scene, cell, col, row, distHeight, distHeight - cell.attribute.height, scene.table.isHeader(col, row));
245
244
  }
246
245
  }
247
246
  //# sourceMappingURL=update-width.js.map