@visactor/vtable 0.17.5-alpha.2 → 0.17.6
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.
- package/cjs/ListTable.js +8 -6
- package/cjs/ListTable.js.map +1 -1
- package/cjs/core/BaseTable.js +1 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/edit/edit-manager.js +6 -4
- package/cjs/edit/edit-manager.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/simple-header-layout.d.ts +1 -0
- package/cjs/layout/simple-header-layout.js +4 -0
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/scenegraph/component/custom.js +3 -3
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.d.ts +15 -0
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +58 -3
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/index.js +5 -1
- package/cjs/scenegraph/graphic/contributions/index.js.map +1 -1
- package/cjs/scenegraph/graphic/group.js +3 -1
- package/cjs/scenegraph/graphic/group.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +2 -1
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/init-scenegraph.js +11 -11
- package/cjs/scenegraph/group-creater/init-scenegraph.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +4 -4
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/themes/BRIGHT.js +1 -2
- package/cjs/themes/DARK.js +2 -1
- package/cjs/ts-types/list-table/define/basic-define.d.ts +3 -0
- package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +3 -0
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/dist/vtable.js +405 -218
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.js +8 -6
- package/es/ListTable.js.map +1 -1
- package/es/core/BaseTable.js +1 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/edit/edit-manager.js +6 -4
- package/es/edit/edit-manager.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/simple-header-layout.d.ts +1 -0
- package/es/layout/simple-header-layout.js +4 -0
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/scenegraph/component/custom.js +3 -3
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.d.ts +15 -0
- package/es/scenegraph/graphic/contributions/group-contribution-render.js +55 -0
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/index.js +4 -2
- package/es/scenegraph/graphic/contributions/index.js.map +1 -1
- package/es/scenegraph/graphic/group.js +3 -1
- package/es/scenegraph/graphic/group.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +1 -1
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/init-scenegraph.js +11 -11
- package/es/scenegraph/group-creater/init-scenegraph.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +4 -4
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/themes/BRIGHT.js +1 -2
- package/es/themes/DARK.js +2 -1
- package/es/ts-types/list-table/define/basic-define.d.ts +3 -0
- package/es/ts-types/list-table/define/basic-define.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +3 -0
- package/es/ts-types/table-engine.js.map +1 -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AAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC","file":"cell-helper.js","sourcesContent":["import type { Cursor, IThemeSpec } from '@visactor/vrender';\nimport type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport { regUrl } from '../../tools/global';\nimport type {\n CellRange,\n ChartColumnDefine,\n CheckboxColumnDefine,\n ColumnDefine,\n ColumnTypeOption,\n ICustomRender,\n ImageColumnDefine,\n MappingRule,\n ProgressbarColumnDefine,\n TextColumnDefine\n} from '../../ts-types';\nimport { dealWithCustom } from '../component/custom';\nimport type { Group } from '../graphic/group';\nimport { getProp } from '../utils/get-prop';\nimport { createChartCellGroup } from './cell-type/chart-cell';\nimport { createImageCellGroup } from './cell-type/image-cell';\nimport { createProgressBarCell } from './cell-type/progress-bar-cell';\nimport { createSparkLineCellGroup } from './cell-type/spark-line-cell';\nimport { createCellGroup } from './cell-type/text-cell';\nimport { createVideoCellGroup } from './cell-type/video-cell';\nimport type { ICustomLayoutFuc } from '../../ts-types/customLayout';\nimport type { BaseTableAPI, PivotTableProtected } from '../../ts-types/base-table';\nimport { getStyleTheme } from '../../core/tableHelper';\nimport { isPromise } from '../../tools/helper';\nimport { dealPromiseData } from '../utils/deal-promise-data';\nimport { CartesianAxis } from '../../components/axis/axis';\nimport { createCheckboxCellGroup } from './cell-type/checkbox-cell';\n// import type { PivotLayoutMap } from '../../layout/pivot-layout';\nimport type { PivotHeaderLayoutMap } from '../../layout/pivot-header-layout';\nimport { resizeCellGroup } from './column-helper';\nimport { getHierarchyOffset } from '../utils/get-hierarchy-offset';\nimport { getQuadProps } from '../utils/padding';\nimport { convertInternal } from '../../tools/util';\n\nexport function createCell(\n type: ColumnTypeOption,\n value: string,\n define: ColumnDefine,\n table: BaseTableAPI,\n col: number,\n row: number,\n colWidth: number,\n cellWidth: number,\n cellHeight: number,\n columnGroup: Group,\n y: number,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n mayHaveIcon: boolean,\n cellTheme: IThemeSpec\n): Group {\n if (isPromise(value)) {\n value = table.getCellValue(col, row);\n }\n let bgColorFunc: Function;\n // 判断是否有mapping 遍历dataset中mappingRules\n if ((table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules && !table.isHeader(col, row)) {\n (table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules?.forEach(\n (mappingRule: MappingRule, i: number) => {\n if (\n mappingRule.bgColor &&\n (table.internalProps.layoutMap as PivotHeaderLayoutMap).getIndicatorKey(col, row) ===\n mappingRule.bgColor.indicatorKey\n ) {\n bgColorFunc = mappingRule.bgColor.mapping;\n }\n }\n );\n }\n let cellGroup: Group;\n if (type === 'text' || type === 'link') {\n if (type === 'link') {\n //如果是超链接 颜色按照linkColor绘制 TODO:放到方法_getCellStyle中\n // const columnDefine = table.getHeaderDefine(col, row);\n const cellValue = value;\n const headerStyle = table._getCellStyle(col, row);\n\n if (\n type === 'link' &&\n (('templateLink' in define && define.templateLink) ||\n !('linkDetect' in define && define.linkDetect) ||\n regUrl.test(cellValue))\n ) {\n if (cellTheme) {\n cellTheme.text.fill = getProp('linkColor', headerStyle, col, row, table);\n (cellTheme as any).group.cursor = 'pointer';\n } else {\n cellTheme = {\n text: {\n fill: getProp('linkColor', headerStyle, col, row, table)\n },\n group: {\n cursor: 'pointer' as Cursor\n }\n };\n }\n }\n }\n // 判断是否有mapping 遍历dataset中mappingRules 但这里还需要根据fieldName来判断\n if (bgColorFunc) {\n const cellValue = table.getCellOriginValue(col, row);\n const bgColor = bgColorFunc(table, cellValue);\n if (bgColor) {\n if (cellTheme) {\n cellTheme.group.fill = bgColor;\n } else {\n cellTheme = {\n group: {\n fill: bgColor\n }\n };\n }\n }\n }\n\n let customElementsGroup;\n let renderDefault = true;\n let customRender;\n let customLayout;\n const cellLocation = table.getCellLocation(col, row);\n if (cellLocation !== 'body') {\n customRender = define?.headerCustomRender;\n customLayout = define?.headerCustomLayout;\n } else {\n customRender = define?.customRender || table.customRender;\n customLayout = define?.customLayout;\n }\n\n if (customLayout || customRender) {\n // const { autoRowHeight } = table.internalProps;\n const customResult = dealWithCustom(\n customLayout,\n customRender,\n col,\n row,\n cellWidth,\n cellHeight,\n false,\n table.heightMode === 'autoHeight',\n padding,\n table\n );\n customElementsGroup = customResult.elementsGroup;\n renderDefault = customResult.renderDefault;\n }\n cellGroup = createCellGroup(\n table,\n value,\n columnGroup,\n 0,\n y,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n customElementsGroup,\n renderDefault,\n cellTheme\n );\n\n const axisConfig = table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);\n if (axisConfig) {\n const axis = new CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, padding, table);\n cellGroup.clear();\n cellGroup.appendChild(axis.component);\n axis.overlap();\n } else if (table.internalProps.layoutMap.isEmpty(col, row)) {\n cellGroup.setAttributes({\n fill: false,\n stroke: false\n });\n cellGroup.clear();\n } else if (table.internalProps.layoutMap.isAxisCell(col, row)) {\n cellGroup.clear();\n }\n\n // if ((define as any)?.isAxis && cellLocation === 'columnHeader') {\n // cellGroup.setAttribute('clip', false);\n // const axis = new CartesianAxis(\n // {\n // orient: 'top',\n // type: 'band',\n // data: ['A', 'B', 'C'],\n // title: {\n // visible: true,\n // text: 'X Axis'\n // }\n // },\n // cellGroup.attribute.width,\n // cellGroup.attribute.height,\n // table\n // );\n // cellGroup.clear();\n // // axis.component.setAttribute('y', 40);\n // cellGroup.appendChild(axis.component);\n // } else if ((define as any)?.isAxis && cellLocation === 'rowHeader') {\n // cellGroup.setAttribute('clip', false);\n // const axis = new CartesianAxis(\n // {\n // orient: 'left',\n // type: 'linear',\n // range: { min: 0, max: 30 },\n // label: {\n // flush: true\n // },\n // grid: {\n // visible: true\n // },\n // title: {\n // visible: true,\n // text: 'Y Axis'\n // }\n // },\n // cellGroup.attribute.width,\n // cellGroup.attribute.height,\n // table\n // );\n // cellGroup.clear();\n // // axis.component.setAttribute('x', 80);\n // cellGroup.appendChild(axis.component);\n // axis.overlap();\n // }\n } else if (type === 'image') {\n // 创建图片单元格\n cellGroup = createImageCellGroup(\n columnGroup,\n 0,\n y,\n col,\n row,\n table.getColWidth(col),\n table.getRowHeight(row),\n (define as ImageColumnDefine).keepAspectRatio,\n (define as ImageColumnDefine).imageAutoSizing,\n padding,\n textAlign,\n textBaseline,\n table,\n cellTheme\n );\n } else if (type === 'video') {\n // 创建视频单元格\n cellGroup = createVideoCellGroup(\n columnGroup,\n 0,\n y,\n col,\n row,\n table.getColWidth(col),\n table.getRowHeight(row),\n (define as ImageColumnDefine).keepAspectRatio,\n (define as ImageColumnDefine).imageAutoSizing,\n padding,\n textAlign,\n textBaseline,\n table,\n cellTheme\n );\n } else if (type === 'chart') {\n const chartInstance = table.internalProps.layoutMap.getChartInstance(col, row);\n cellGroup = createChartCellGroup(\n null,\n columnGroup,\n 0,\n y,\n col,\n row,\n table.getColWidth(col),\n table.getRowHeight(row),\n padding,\n value,\n (define as ChartColumnDefine).chartModule,\n table.isPivotChart()\n ? (table.internalProps.layoutMap as PivotHeaderLayoutMap).getChartSpec(col, row)\n : (define as ChartColumnDefine).chartSpec,\n chartInstance,\n (table.internalProps.layoutMap as PivotHeaderLayoutMap)?.getChartDataId(col, row) ?? 'data',\n table,\n cellTheme\n );\n } else if (type === 'progressbar') {\n const style = table._getCellStyle(col, row) as ProgressBarStyle;\n const dataValue = table.getCellOriginValue(col, row);\n // 创建基础文字单元格\n cellGroup = createCellGroup(\n table,\n value,\n columnGroup,\n 0,\n y,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n padding,\n textAlign,\n textBaseline,\n false,\n null,\n true,\n cellTheme\n );\n\n // 创建bar group\n const progressBarGroup = createProgressBarCell(\n define as ProgressbarColumnDefine,\n style,\n colWidth,\n value,\n dataValue,\n col,\n row,\n padding,\n table\n );\n // 进度图插入到文字前,绘制在文字下\n if (cellGroup.firstChild) {\n cellGroup.insertBefore(progressBarGroup, cellGroup.firstChild);\n } else {\n cellGroup.appendChild(progressBarGroup);\n }\n } else if (type === 'sparkline') {\n cellGroup = createSparkLineCellGroup(\n null,\n columnGroup,\n 0,\n y,\n col,\n row,\n cellWidth,\n cellHeight,\n padding,\n table,\n cellTheme\n );\n } else if (type === 'checkbox') {\n cellGroup = createCheckboxCellGroup(\n null,\n columnGroup,\n 0,\n y,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n padding,\n textAlign,\n textBaseline,\n table,\n cellTheme,\n define as CheckboxColumnDefine\n );\n }\n\n return cellGroup;\n}\n\nexport function updateCell(col: number, row: number, table: BaseTableAPI, addNew?: boolean) {\n // const oldCellGroup = table.scenegraph.getCell(col, row, true);\n const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, true);\n const cellStyle = table._getCellStyle(col, row);\n const autoWrapText = cellStyle.autoWrapText ?? table.internalProps.autoWrapText;\n const cellLocation = table.getCellLocation(col, row);\n const define = cellLocation !== 'body' ? table.getHeaderDefine(col, row) : table.getBodyColumnDefine(col, row);\n\n let isMerge;\n let range;\n if (cellLocation !== 'body' || (define as TextColumnDefine)?.mergeCell || table.internalProps.customMergeCell) {\n // 只有表头或者column配置合并单元格后再进行信息获取\n range = table.getCellRange(col, row);\n isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;\n }\n\n let cellTheme = getStyleTheme(\n cellStyle,\n table,\n isMerge ? range.start.col : col,\n isMerge ? range.start.row : row,\n getProp\n ).theme;\n\n // fast method for text\n if (!addNew && !isMerge && canUseFastUpdate(col, row, oldCellGroup, autoWrapText, table)) {\n // update group\n const cellWidth = table.getColWidth(col);\n const cellHeight = table.getRowHeight(row);\n oldCellGroup.setAttributes({\n width: cellWidth,\n height: cellHeight,\n // 背景相关,cell背景由cellGroup绘制\n lineWidth: cellTheme?.group?.lineWidth ?? undefined,\n fill: cellTheme?.group?.fill ?? undefined,\n stroke: cellTheme?.group?.stroke ?? undefined,\n strokeArrayWidth: (cellTheme?.group as any)?.strokeArrayWidth ?? undefined,\n strokeArrayColor: (cellTheme?.group as any)?.strokeArrayColor ?? undefined,\n cursor: (cellTheme?.group as any)?.cursor ?? undefined,\n\n y: table.scenegraph.getCellGroupY(row)\n } as any);\n\n // update text\n const textMark = oldCellGroup.getChildByName('text');\n if (textMark) {\n const text = table.getCellValue(col, row);\n const textArr = convertInternal(text).replace(/\\r?\\n/g, '\\n').replace(/\\r/g, '\\n').split('\\n');\n const hierarchyOffset = getHierarchyOffset(col, row, table);\n const lineClamp = cellStyle.lineClamp;\n const padding = getQuadProps(getProp('padding', cellStyle, col, row, table)) ?? [0, 0, 0, 0];\n\n const textAlign = cellTheme.text.textAlign;\n let x = 0;\n if (textAlign === 'center') {\n x = padding[3] + (cellWidth - (padding[1] + padding[3])) / 2;\n } else if (textAlign === 'right') {\n x = padding[3] + cellWidth - (padding[1] + padding[3]);\n } else {\n x = padding[3];\n }\n\n const attribute = {\n text: textArr.length === 1 && !autoWrapText ? textArr[0] : textArr, // 单行(no-autoWrapText)为字符串,多行(autoWrapText)为字符串数组\n maxLineWidth: cellWidth - (padding[1] + padding[3] + hierarchyOffset),\n // fill: true,\n // textAlign: 'left',\n textBaseline: 'top',\n autoWrapText,\n lineClamp,\n wordBreak: 'break-word',\n // widthLimit: autoColWidth ? -1 : colWidth - (padding[1] + padding[3]),\n heightLimit: cellHeight - (padding[0] + padding[2]),\n pickable: false,\n dx: hierarchyOffset,\n x\n };\n const oldText = textMark.attribute.text;\n textMark.setAttributes(cellTheme.text ? (Object.assign({}, cellTheme.text, attribute) as any) : attribute);\n if (!oldText && textMark.attribute.text) {\n const textBaseline = cellTheme.text.textBaseline;\n const height = cellHeight - (padding[0] + padding[2]);\n let y = 0;\n if (textBaseline === 'middle') {\n y = padding[0] + (height - textMark.AABBBounds.height()) / 2;\n } else if (textBaseline === 'bottom') {\n y = padding[0] + height - textMark.AABBBounds.height();\n } else {\n y = padding[0];\n }\n textMark.setAttributes({\n y\n });\n }\n }\n return oldCellGroup;\n }\n\n if (!addNew && oldCellGroup.role === 'empty') {\n return undefined;\n }\n\n const type = table.isHeader(col, row)\n ? table._getHeaderLayoutMap(col, row).headerType\n : table.getBodyColumnType(col, row);\n let value = table.getCellValue(col, row);\n\n let customStyle;\n if (table.internalProps.customMergeCell) {\n const customMerge = table.getCustomMerge(col, row);\n if (customMerge) {\n const { range: customMergeRange, text: customMergeText, style: customMergeStyle } = customMerge;\n range = customMergeRange;\n isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;\n value = customMergeText;\n customStyle = customMergeStyle;\n cellTheme = getStyleTheme(customStyle, table, range.start.col, range.start.row, getProp).theme;\n }\n }\n\n let newCellGroup;\n const mayHaveIcon = cellLocation !== 'body' ? true : !!define?.icon || !!define?.tree;\n const padding = cellTheme._vtable.padding;\n const textAlign = cellTheme._vtable.textAlign;\n const textBaseline = cellTheme._vtable.textBaseline;\n\n let bgColorFunc: Function;\n // 判断是否有mapping 遍历dataset中mappingRules\n if ((table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules && !table.isHeader(col, row)) {\n (table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules?.forEach(\n (mappingRule: MappingRule, i: number) => {\n if (\n mappingRule.bgColor &&\n (table.internalProps.layoutMap as PivotHeaderLayoutMap).getIndicatorKey(col, row) ===\n mappingRule.bgColor.indicatorKey\n ) {\n bgColorFunc = mappingRule.bgColor.mapping;\n }\n }\n );\n }\n\n let customRender;\n let customLayout;\n if (cellLocation !== 'body') {\n customRender = define?.headerCustomRender;\n customLayout = define?.headerCustomLayout;\n } else {\n customRender = define?.customRender || table.customRender;\n customLayout = define?.customLayout;\n }\n\n let cellWidth;\n let cellHeight;\n if (range) {\n cellWidth = table.getColsWidth(range.start.col, range.end.col);\n cellHeight = table.getRowsHeight(range.start.row, range.end.row);\n } else {\n cellWidth = table.getColWidth(col);\n cellHeight = table.getRowHeight(row);\n }\n\n // deal with promise data\n if (isPromise(value)) {\n // clear cell content sync\n oldCellGroup.removeAllChild();\n\n // update cell content async\n dealPromiseData(\n value,\n table,\n updateCellContent.bind(\n null,\n type,\n value,\n define,\n table,\n col,\n row,\n bgColorFunc,\n cellWidth,\n cellHeight,\n oldCellGroup,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n addNew,\n cellTheme\n )\n );\n } else {\n newCellGroup = updateCellContent(\n type,\n value,\n define,\n table,\n col,\n row,\n bgColorFunc,\n cellWidth,\n cellHeight,\n oldCellGroup,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n addNew,\n cellTheme\n );\n }\n\n if (isMerge) {\n const rangeHeight = table.getRowHeight(row);\n const rangeWidth = table.getColWidth(col);\n\n const { width: contentWidth } = newCellGroup.attribute;\n const { height: contentHeight } = newCellGroup.attribute;\n newCellGroup.contentWidth = contentWidth;\n newCellGroup.contentHeight = contentHeight;\n\n resizeCellGroup(newCellGroup, rangeWidth, rangeHeight, range, table);\n }\n\n return newCellGroup;\n}\n\nfunction updateCellContent(\n type: ColumnTypeOption,\n value: string,\n define: ColumnDefine,\n table: BaseTableAPI,\n col: number,\n row: number,\n bgColorFunc: Function,\n cellWidth: number,\n cellHeight: number,\n oldCellGroup: Group,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n mayHaveIcon: boolean,\n addNew: boolean,\n cellTheme?: IThemeSpec\n) {\n if (isPromise(value)) {\n value = table.getCellValue(col, row);\n }\n //解决报错 getCellByCache递归调用 死循环问题\n if (!addNew && (oldCellGroup.row !== row || oldCellGroup.col !== col)) {\n return null;\n }\n const newCellGroup = createCell(\n type,\n value,\n define,\n table,\n col,\n row,\n table.getColWidth(col),\n cellWidth,\n cellHeight,\n // oldCellGroup.parent,\n addNew ? table.scenegraph.getColGroup(col) : oldCellGroup.parent,\n // oldCellGroup.attribute.y,\n addNew ? 0 : table.scenegraph.getCellGroupY(row), // y\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n cellTheme\n );\n if (!addNew && oldCellGroup.parent) {\n oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup);\n oldCellGroup.parent.removeChild(oldCellGroup);\n\n // update cache\n if (table.scenegraph?.proxy.cellCache.get(col)) {\n table.scenegraph?.proxy.cellCache.set(col, newCellGroup);\n }\n }\n return newCellGroup;\n}\n\nfunction canUseFastUpdate(col: number, row: number, oldCellGroup: Group, autoWrapText: boolean, table: BaseTableAPI) {\n const define = table.getBodyColumnDefine(col, row);\n const mayHaveIcon = !!define?.icon || !!define?.tree;\n const cellType = table.getBodyColumnType(col, row);\n const autoRowHeight = table.heightMode === 'autoHeight';\n const value = table.getCellValue(col, row);\n\n if (\n !table.isHeader(col, row) &&\n oldCellGroup.role === 'cell' &&\n cellType === 'text' &&\n !autoWrapText &&\n !autoRowHeight &&\n !mayHaveIcon &&\n oldCellGroup.firstChild?.type === 'text' &&\n !isPromise(value)\n ) {\n return true;\n }\n return false;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/scenegraph/group-creater/cell-helper.ts"],"names":[],"mappings":";;;AAEA,+CAA4C;AAa5C,gDAAqD;AAErD,gDAA4C;AAC5C,uDAA8D;AAC9D,uDAA8D;AAC9D,qEAAsE;AACtE,iEAAuE;AACvE,qDAAwD;AACxD,uDAA8D;AAG9D,wDAAuD;AACvD,+CAA+C;AAC/C,kEAA6D;AAC7D,qDAA2D;AAC3D,6DAAoE;AAGpE,mDAAkD;AAClD,wEAAmE;AACnE,8CAAgD;AAChD,2CAAmD;AAEnD,SAAgB,UAAU,CACxB,IAAsB,EACtB,KAAa,EACb,MAAoB,EACpB,KAAmB,EACnB,GAAW,EACX,GAAW,EACX,QAAgB,EAChB,SAAiB,EACjB,UAAkB,EAClB,WAAkB,EAClB,CAAS,EACT,OAAyC,EACzC,SAA0B,EAC1B,YAAgC,EAChC,WAAoB,EACpB,SAAqB;;IAErB,IAAI,IAAA,kBAAS,EAAC,KAAK,CAAC,EAAE;QACpB,KAAK,GAAG,KAAK,CAAC,YAA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N,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAA,CAAC;IACrD,MAAM,QAAQ,GAAG,KAAK,CAAC,iBAAiB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACnD,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,KAAK,YAAY,CAAC;IACxD,MAAM,KAAK,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAE3C,IACE,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC;QACzB,YAAY,CAAC,IAAI,KAAK,MAAM;QAC5B,QAAQ,KAAK,MAAM;QACnB,CAAC,YAAY;QACb,CAAC,aAAa;QACd,CAAC,WAAW;QACZ,CAAA,MAAA,YAAY,CAAC,UAAU,0CAAE,IAAI,MAAK,MAAM;QACxC,CAAC,IAAA,kBAAS,EAAC,KAAK,CAAC,EACjB;QACA,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC","file":"cell-helper.js","sourcesContent":["import type { Cursor, IThemeSpec } from '@visactor/vrender';\nimport type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport { regUrl } from '../../tools/global';\nimport type {\n CellRange,\n ChartColumnDefine,\n CheckboxColumnDefine,\n ColumnDefine,\n ColumnTypeOption,\n ICustomRender,\n ImageColumnDefine,\n MappingRule,\n ProgressbarColumnDefine,\n TextColumnDefine\n} from '../../ts-types';\nimport { dealWithCustom } from '../component/custom';\nimport type { Group } from '../graphic/group';\nimport { getProp } from '../utils/get-prop';\nimport { createChartCellGroup } from './cell-type/chart-cell';\nimport { createImageCellGroup } from './cell-type/image-cell';\nimport { createProgressBarCell } from './cell-type/progress-bar-cell';\nimport { createSparkLineCellGroup } from './cell-type/spark-line-cell';\nimport { createCellGroup } from './cell-type/text-cell';\nimport { createVideoCellGroup } from './cell-type/video-cell';\nimport type { ICustomLayoutFuc } from '../../ts-types/customLayout';\nimport type { BaseTableAPI, PivotTableProtected } from '../../ts-types/base-table';\nimport { getStyleTheme } from '../../core/tableHelper';\nimport { isPromise } from '../../tools/helper';\nimport { dealPromiseData } from '../utils/deal-promise-data';\nimport { CartesianAxis } from '../../components/axis/axis';\nimport { createCheckboxCellGroup } from './cell-type/checkbox-cell';\n// import type { PivotLayoutMap } from '../../layout/pivot-layout';\nimport type { PivotHeaderLayoutMap } from '../../layout/pivot-header-layout';\nimport { resizeCellGroup } from './column-helper';\nimport { getHierarchyOffset } from '../utils/get-hierarchy-offset';\nimport { getQuadProps } from '../utils/padding';\nimport { convertInternal } from '../../tools/util';\n\nexport function createCell(\n type: ColumnTypeOption,\n value: string,\n define: ColumnDefine,\n table: BaseTableAPI,\n col: number,\n row: number,\n colWidth: number,\n cellWidth: number,\n cellHeight: number,\n columnGroup: Group,\n y: number,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n mayHaveIcon: boolean,\n cellTheme: IThemeSpec\n): Group {\n if (isPromise(value)) {\n value = table.getCellValue(col, row);\n }\n let bgColorFunc: Function;\n // 判断是否有mapping 遍历dataset中mappingRules\n if ((table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules && !table.isHeader(col, row)) {\n (table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules?.forEach(\n (mappingRule: MappingRule, i: number) => {\n if (\n mappingRule.bgColor &&\n (table.internalProps.layoutMap as PivotHeaderLayoutMap).getIndicatorKey(col, row) ===\n mappingRule.bgColor.indicatorKey\n ) {\n bgColorFunc = mappingRule.bgColor.mapping;\n }\n }\n );\n }\n let cellGroup: Group;\n if (type === 'text' || type === 'link') {\n if (type === 'link') {\n //如果是超链接 颜色按照linkColor绘制 TODO:放到方法_getCellStyle中\n // const columnDefine = table.getHeaderDefine(col, row);\n const cellValue = value;\n const headerStyle = table._getCellStyle(col, row);\n\n if (\n type === 'link' &&\n (('templateLink' in define && define.templateLink) ||\n !('linkDetect' in define && define.linkDetect) ||\n regUrl.test(cellValue))\n ) {\n if (cellTheme) {\n cellTheme.text.fill = getProp('linkColor', headerStyle, col, row, table);\n (cellTheme as any).group.cursor = 'pointer';\n } else {\n cellTheme = {\n text: {\n fill: getProp('linkColor', headerStyle, col, row, table)\n },\n group: {\n cursor: 'pointer' as Cursor\n }\n };\n }\n }\n }\n // 判断是否有mapping 遍历dataset中mappingRules 但这里还需要根据fieldName来判断\n if (bgColorFunc) {\n const cellValue = table.getCellOriginValue(col, row);\n const bgColor = bgColorFunc(table, cellValue);\n if (bgColor) {\n if (cellTheme) {\n cellTheme.group.fill = bgColor;\n } else {\n cellTheme = {\n group: {\n fill: bgColor\n }\n };\n }\n }\n }\n\n let customElementsGroup;\n let renderDefault = true;\n let customRender;\n let customLayout;\n const cellLocation = table.getCellLocation(col, row);\n if (cellLocation !== 'body') {\n customRender = define?.headerCustomRender;\n customLayout = define?.headerCustomLayout;\n } else {\n customRender = define?.customRender || table.customRender;\n customLayout = define?.customLayout;\n }\n\n if (customLayout || customRender) {\n // const { autoRowHeight } = table.internalProps;\n const customResult = dealWithCustom(\n customLayout,\n customRender,\n col,\n row,\n cellWidth,\n cellHeight,\n false,\n table.heightMode === 'autoHeight',\n padding,\n table\n );\n customElementsGroup = customResult.elementsGroup;\n renderDefault = customResult.renderDefault;\n }\n cellGroup = createCellGroup(\n table,\n value,\n columnGroup,\n 0,\n y,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n customElementsGroup,\n renderDefault,\n cellTheme\n );\n\n const axisConfig = table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);\n if (axisConfig) {\n const axis = new CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, padding, table);\n cellGroup.clear();\n cellGroup.appendChild(axis.component);\n axis.overlap();\n } else if (table.internalProps.layoutMap.isEmpty(col, row)) {\n cellGroup.setAttributes({\n fill: false,\n stroke: false\n });\n cellGroup.clear();\n } else if (table.internalProps.layoutMap.isAxisCell(col, row)) {\n cellGroup.clear();\n }\n\n // if ((define as any)?.isAxis && cellLocation === 'columnHeader') {\n // cellGroup.setAttribute('clip', false);\n // const axis = new CartesianAxis(\n // {\n // orient: 'top',\n // type: 'band',\n // data: ['A', 'B', 'C'],\n // title: {\n // visible: true,\n // text: 'X Axis'\n // }\n // },\n // cellGroup.attribute.width,\n // cellGroup.attribute.height,\n // table\n // );\n // cellGroup.clear();\n // // axis.component.setAttribute('y', 40);\n // cellGroup.appendChild(axis.component);\n // } else if ((define as any)?.isAxis && cellLocation === 'rowHeader') {\n // cellGroup.setAttribute('clip', false);\n // const axis = new CartesianAxis(\n // {\n // orient: 'left',\n // type: 'linear',\n // range: { min: 0, max: 30 },\n // label: {\n // flush: true\n // },\n // grid: {\n // visible: true\n // },\n // title: {\n // visible: true,\n // text: 'Y Axis'\n // }\n // },\n // cellGroup.attribute.width,\n // cellGroup.attribute.height,\n // table\n // );\n // cellGroup.clear();\n // // axis.component.setAttribute('x', 80);\n // cellGroup.appendChild(axis.component);\n // axis.overlap();\n // }\n } else if (type === 'image') {\n // 创建图片单元格\n cellGroup = createImageCellGroup(\n columnGroup,\n 0,\n y,\n col,\n row,\n table.getColWidth(col),\n table.getRowHeight(row),\n (define as ImageColumnDefine).keepAspectRatio,\n (define as ImageColumnDefine).imageAutoSizing,\n padding,\n textAlign,\n textBaseline,\n table,\n cellTheme\n );\n } else if (type === 'video') {\n // 创建视频单元格\n cellGroup = createVideoCellGroup(\n columnGroup,\n 0,\n y,\n col,\n row,\n table.getColWidth(col),\n table.getRowHeight(row),\n (define as ImageColumnDefine).keepAspectRatio,\n (define as ImageColumnDefine).imageAutoSizing,\n padding,\n textAlign,\n textBaseline,\n table,\n cellTheme\n );\n } else if (type === 'chart') {\n const chartInstance = table.internalProps.layoutMap.getChartInstance(col, row);\n cellGroup = createChartCellGroup(\n null,\n columnGroup,\n 0,\n y,\n col,\n row,\n table.getColWidth(col),\n table.getRowHeight(row),\n padding,\n value,\n (define as ChartColumnDefine).chartModule,\n table.isPivotChart()\n ? (table.internalProps.layoutMap as PivotHeaderLayoutMap).getChartSpec(col, row)\n : (define as ChartColumnDefine).chartSpec,\n chartInstance,\n (table.internalProps.layoutMap as PivotHeaderLayoutMap)?.getChartDataId(col, row) ?? 'data',\n table,\n cellTheme\n );\n } else if (type === 'progressbar') {\n const style = table._getCellStyle(col, row) as ProgressBarStyle;\n const dataValue = table.getCellOriginValue(col, row);\n // 创建基础文字单元格\n cellGroup = createCellGroup(\n table,\n value,\n columnGroup,\n 0,\n y,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n padding,\n textAlign,\n textBaseline,\n false,\n null,\n true,\n cellTheme\n );\n\n // 创建bar group\n const progressBarGroup = createProgressBarCell(\n define as ProgressbarColumnDefine,\n style,\n colWidth,\n value,\n dataValue,\n col,\n row,\n padding,\n table\n );\n // 进度图插入到文字前,绘制在文字下\n if (cellGroup.firstChild) {\n cellGroup.insertBefore(progressBarGroup, cellGroup.firstChild);\n } else {\n cellGroup.appendChild(progressBarGroup);\n }\n } else if (type === 'sparkline') {\n cellGroup = createSparkLineCellGroup(\n null,\n columnGroup,\n 0,\n y,\n col,\n row,\n cellWidth,\n cellHeight,\n padding,\n table,\n cellTheme\n );\n } else if (type === 'checkbox') {\n cellGroup = createCheckboxCellGroup(\n null,\n columnGroup,\n 0,\n y,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n padding,\n textAlign,\n textBaseline,\n table,\n cellTheme,\n define as CheckboxColumnDefine\n );\n }\n\n return cellGroup;\n}\n\nexport function updateCell(col: number, row: number, table: BaseTableAPI, addNew?: boolean) {\n // const oldCellGroup = table.scenegraph.getCell(col, row, true);\n const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, true);\n const cellStyle = table._getCellStyle(col, row);\n const autoWrapText = cellStyle.autoWrapText ?? table.internalProps.autoWrapText;\n const cellLocation = table.getCellLocation(col, row);\n const define = cellLocation !== 'body' ? table.getHeaderDefine(col, row) : table.getBodyColumnDefine(col, row);\n\n let isMerge;\n let range;\n if (cellLocation !== 'body' || (define as TextColumnDefine)?.mergeCell || table.internalProps.customMergeCell) {\n // 只有表头或者column配置合并单元格后再进行信息获取\n range = table.getCellRange(col, row);\n isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;\n }\n\n let cellTheme = getStyleTheme(\n cellStyle,\n table,\n isMerge ? range.start.col : col,\n isMerge ? range.start.row : row,\n getProp\n ).theme;\n\n // fast method for text\n if (!addNew && !isMerge && canUseFastUpdate(col, row, oldCellGroup, autoWrapText, table)) {\n // update group\n const cellWidth = table.getColWidth(col);\n const cellHeight = table.getRowHeight(row);\n oldCellGroup.setAttributes({\n width: cellWidth,\n height: cellHeight,\n // 背景相关,cell背景由cellGroup绘制\n lineWidth: cellTheme?.group?.lineWidth ?? undefined,\n fill: cellTheme?.group?.fill ?? undefined,\n stroke: cellTheme?.group?.stroke ?? undefined,\n strokeArrayWidth: (cellTheme?.group as any)?.strokeArrayWidth ?? undefined,\n strokeArrayColor: (cellTheme?.group as any)?.strokeArrayColor ?? undefined,\n cursor: (cellTheme?.group as any)?.cursor ?? undefined,\n\n y: table.scenegraph.getCellGroupY(row)\n } as any);\n\n // update text\n const textMark = oldCellGroup.getChildByName('text');\n if (textMark) {\n const text = table.getCellValue(col, row);\n const textArr = convertInternal(text).replace(/\\r?\\n/g, '\\n').replace(/\\r/g, '\\n').split('\\n');\n const hierarchyOffset = getHierarchyOffset(col, row, table);\n const lineClamp = cellStyle.lineClamp;\n const padding = getQuadProps(getProp('padding', cellStyle, col, row, table)) ?? [0, 0, 0, 0];\n\n const textAlign = cellTheme.text.textAlign;\n let x = 0;\n if (textAlign === 'center') {\n x = padding[3] + (cellWidth - (padding[1] + padding[3])) / 2;\n } else if (textAlign === 'right') {\n x = padding[3] + cellWidth - (padding[1] + padding[3]);\n } else {\n x = padding[3];\n }\n\n const attribute = {\n text: textArr.length === 1 && !autoWrapText ? textArr[0] : textArr, // 单行(no-autoWrapText)为字符串,多行(autoWrapText)为字符串数组\n maxLineWidth: cellWidth - (padding[1] + padding[3] + hierarchyOffset),\n // fill: true,\n // textAlign: 'left',\n textBaseline: 'top',\n autoWrapText,\n lineClamp,\n wordBreak: 'break-word',\n // widthLimit: autoColWidth ? -1 : colWidth - (padding[1] + padding[3]),\n heightLimit: cellHeight - (padding[0] + padding[2]),\n pickable: false,\n dx: hierarchyOffset,\n x\n };\n const oldText = textMark.attribute.text;\n textMark.setAttributes(cellTheme.text ? (Object.assign({}, cellTheme.text, attribute) as any) : attribute);\n if (!oldText && textMark.attribute.text) {\n const textBaseline = cellTheme.text.textBaseline;\n const height = cellHeight - (padding[0] + padding[2]);\n let y = 0;\n if (textBaseline === 'middle') {\n y = padding[0] + (height - textMark.AABBBounds.height()) / 2;\n } else if (textBaseline === 'bottom') {\n y = padding[0] + height - textMark.AABBBounds.height();\n } else {\n y = padding[0];\n }\n textMark.setAttributes({\n y\n });\n }\n }\n return oldCellGroup;\n }\n\n if (!addNew && oldCellGroup.role === 'empty') {\n return undefined;\n }\n\n const type = table.isHeader(col, row)\n ? table._getHeaderLayoutMap(col, row).headerType\n : table.getBodyColumnType(col, row);\n let value = table.getCellValue(col, row);\n\n let customStyle;\n if (table.internalProps.customMergeCell) {\n const customMerge = table.getCustomMerge(col, row);\n if (customMerge) {\n const { range: customMergeRange, text: customMergeText, style: customMergeStyle } = customMerge;\n range = customMergeRange;\n isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;\n value = customMergeText;\n customStyle = customMergeStyle;\n if (customStyle) {\n cellTheme = getStyleTheme(customStyle, table, range.start.col, range.start.row, getProp).theme;\n }\n }\n }\n\n let newCellGroup;\n const mayHaveIcon = cellLocation !== 'body' ? true : !!define?.icon || !!define?.tree;\n const padding = cellTheme._vtable.padding;\n const textAlign = cellTheme._vtable.textAlign;\n const textBaseline = cellTheme._vtable.textBaseline;\n\n let bgColorFunc: Function;\n // 判断是否有mapping 遍历dataset中mappingRules\n if ((table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules && !table.isHeader(col, row)) {\n (table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules?.forEach(\n (mappingRule: MappingRule, i: number) => {\n if (\n mappingRule.bgColor &&\n (table.internalProps.layoutMap as PivotHeaderLayoutMap).getIndicatorKey(col, row) ===\n mappingRule.bgColor.indicatorKey\n ) {\n bgColorFunc = mappingRule.bgColor.mapping;\n }\n }\n );\n }\n\n let customRender;\n let customLayout;\n if (cellLocation !== 'body') {\n customRender = define?.headerCustomRender;\n customLayout = define?.headerCustomLayout;\n } else {\n customRender = define?.customRender || table.customRender;\n customLayout = define?.customLayout;\n }\n\n let cellWidth;\n let cellHeight;\n if (range) {\n cellWidth = table.getColsWidth(range.start.col, range.end.col);\n cellHeight = table.getRowsHeight(range.start.row, range.end.row);\n } else {\n cellWidth = table.getColWidth(col);\n cellHeight = table.getRowHeight(row);\n }\n\n // deal with promise data\n if (isPromise(value)) {\n // clear cell content sync\n oldCellGroup.removeAllChild();\n\n // update cell content async\n dealPromiseData(\n value,\n table,\n updateCellContent.bind(\n null,\n type,\n value,\n define,\n table,\n col,\n row,\n bgColorFunc,\n cellWidth,\n cellHeight,\n oldCellGroup,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n addNew,\n cellTheme\n )\n );\n } else {\n newCellGroup = updateCellContent(\n type,\n value,\n define,\n table,\n col,\n row,\n bgColorFunc,\n cellWidth,\n cellHeight,\n oldCellGroup,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n addNew,\n cellTheme\n );\n }\n\n if (isMerge) {\n const rangeHeight = table.getRowHeight(row);\n const rangeWidth = table.getColWidth(col);\n\n const { width: contentWidth } = newCellGroup.attribute;\n const { height: contentHeight } = newCellGroup.attribute;\n newCellGroup.contentWidth = contentWidth;\n newCellGroup.contentHeight = contentHeight;\n\n resizeCellGroup(newCellGroup, rangeWidth, rangeHeight, range, table);\n }\n\n return newCellGroup;\n}\n\nfunction updateCellContent(\n type: ColumnTypeOption,\n value: string,\n define: ColumnDefine,\n table: BaseTableAPI,\n col: number,\n row: number,\n bgColorFunc: Function,\n cellWidth: number,\n cellHeight: number,\n oldCellGroup: Group,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n mayHaveIcon: boolean,\n addNew: boolean,\n cellTheme?: IThemeSpec\n) {\n if (isPromise(value)) {\n value = table.getCellValue(col, row);\n }\n //解决报错 getCellByCache递归调用 死循环问题\n if (!addNew && (oldCellGroup.row !== row || oldCellGroup.col !== col)) {\n return null;\n }\n const newCellGroup = createCell(\n type,\n value,\n define,\n table,\n col,\n row,\n table.getColWidth(col),\n cellWidth,\n cellHeight,\n // oldCellGroup.parent,\n addNew ? table.scenegraph.getColGroup(col) : oldCellGroup.parent,\n // oldCellGroup.attribute.y,\n addNew ? 0 : table.scenegraph.getCellGroupY(row), // y\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n cellTheme\n );\n if (!addNew && oldCellGroup.parent) {\n oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup);\n oldCellGroup.parent.removeChild(oldCellGroup);\n\n // update cache\n if (table.scenegraph?.proxy.cellCache.get(col)) {\n table.scenegraph?.proxy.cellCache.set(col, newCellGroup);\n }\n }\n return newCellGroup;\n}\n\nfunction canUseFastUpdate(col: number, row: number, oldCellGroup: Group, autoWrapText: boolean, table: BaseTableAPI) {\n const define = table.getBodyColumnDefine(col, row);\n const mayHaveIcon = !!define?.icon || !!define?.tree;\n const cellType = table.getBodyColumnType(col, row);\n const autoRowHeight = table.heightMode === 'autoHeight';\n const value = table.getCellValue(col, row);\n\n if (\n !table.isHeader(col, row) &&\n oldCellGroup.role === 'cell' &&\n cellType === 'text' &&\n !autoWrapText &&\n !autoRowHeight &&\n !mayHaveIcon &&\n oldCellGroup.firstChild?.type === 'text' &&\n !isPromise(value)\n ) {\n return true;\n }\n return false;\n}\n"]}
|
|
@@ -16,25 +16,25 @@ function initSceneGraph(scene) {
|
|
|
16
16
|
clip: !0,
|
|
17
17
|
pickable: !1
|
|
18
18
|
}), scene.tableGroup.role = "table";
|
|
19
|
-
const colHeaderGroup = createContainerGroup(0, 0);
|
|
19
|
+
const colHeaderGroup = createContainerGroup(0, 0, !0);
|
|
20
20
|
colHeaderGroup.role = "col-header", scene.colHeaderGroup = colHeaderGroup;
|
|
21
|
-
const cornerHeaderGroup = createContainerGroup(0, 0);
|
|
21
|
+
const cornerHeaderGroup = createContainerGroup(0, 0, !0);
|
|
22
22
|
cornerHeaderGroup.role = "corner-header", scene.cornerHeaderGroup = cornerHeaderGroup;
|
|
23
|
-
const rowHeaderGroup = createContainerGroup(0, 0);
|
|
23
|
+
const rowHeaderGroup = createContainerGroup(0, 0, !0);
|
|
24
24
|
rowHeaderGroup.role = "row-header", scene.rowHeaderGroup = rowHeaderGroup;
|
|
25
|
-
const bodyGroup = createContainerGroup(width, 0);
|
|
25
|
+
const bodyGroup = createContainerGroup(width, 0, !0);
|
|
26
26
|
bodyGroup.role = "body", scene.bodyGroup = bodyGroup;
|
|
27
|
-
const rightFrozenGroup = createContainerGroup(0, 0);
|
|
27
|
+
const rightFrozenGroup = createContainerGroup(0, 0, !0);
|
|
28
28
|
rightFrozenGroup.role = "right-frozen", scene.rightFrozenGroup = rightFrozenGroup;
|
|
29
|
-
const bottomFrozenGroup = createContainerGroup(0, 0);
|
|
29
|
+
const bottomFrozenGroup = createContainerGroup(0, 0, !0);
|
|
30
30
|
bottomFrozenGroup.role = "bottom-frozen", scene.bottomFrozenGroup = bottomFrozenGroup;
|
|
31
31
|
const componentGroup = createContainerGroup(0, 0);
|
|
32
32
|
componentGroup.role = "component", scene.componentGroup = componentGroup;
|
|
33
|
-
const rightTopCornerGroup = createContainerGroup(0, 0);
|
|
33
|
+
const rightTopCornerGroup = createContainerGroup(0, 0, !0);
|
|
34
34
|
rightTopCornerGroup.role = "corner-right-top-header", scene.rightTopCornerGroup = rightTopCornerGroup;
|
|
35
|
-
const rightBottomCornerGroup = createContainerGroup(0, 0);
|
|
35
|
+
const rightBottomCornerGroup = createContainerGroup(0, 0, !0);
|
|
36
36
|
rightBottomCornerGroup.role = "corner-right-bottom-header", scene.rightBottomCornerGroup = rightBottomCornerGroup;
|
|
37
|
-
const leftBottomCornerGroup = createContainerGroup(0, 0);
|
|
37
|
+
const leftBottomCornerGroup = createContainerGroup(0, 0, !0);
|
|
38
38
|
leftBottomCornerGroup.role = "corner-left-bottom-header", scene.leftBottomCornerGroup = leftBottomCornerGroup,
|
|
39
39
|
scene.tableGroup.addChild(bodyGroup), scene.tableGroup.addChild(rowHeaderGroup),
|
|
40
40
|
scene.tableGroup.addChild(bottomFrozenGroup), scene.tableGroup.addChild(colHeaderGroup),
|
|
@@ -43,13 +43,13 @@ function initSceneGraph(scene) {
|
|
|
43
43
|
scene.tableGroup.addChild(cornerHeaderGroup), scene.tableGroup.addChild(componentGroup);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
function createContainerGroup(width, height) {
|
|
46
|
+
function createContainerGroup(width, height, clip) {
|
|
47
47
|
return new group_1.Group({
|
|
48
48
|
x: 0,
|
|
49
49
|
y: 0,
|
|
50
50
|
width: width,
|
|
51
51
|
height: height,
|
|
52
|
-
clip:
|
|
52
|
+
clip: null != clip && clip,
|
|
53
53
|
pickable: !1
|
|
54
54
|
});
|
|
55
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/group-creater/init-scenegraph.ts"],"names":[],"mappings":";;;AAAA,4CAAyC;AAIzC,SAAgB,cAAc,CAAC,KAAiB;IAC9C,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC;IAC5C,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,kBAAkB,CAAC;IAE9C,KAAK,CAAC,UAAU,GAAG,IAAI,aAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,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C,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IAC1C,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IAE7C,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IAC1C,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;IAE5C,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC;IAClD,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IAC/C,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC;IACjD,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IAC7C,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;AAC5C,CAAC;AA5DD,wCA4DC;AAED,SAAS,oBAAoB,CAAC,KAAa,EAAE,MAAc,EAAE,IAAc;IACzE,OAAO,IAAI,aAAK,CAAC;QACf,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,KAAK;QACL,MAAM;QACN,IAAI,EAAE,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,KAAK;QACnB,QAAQ,EAAE,KAAK;KAChB,CAAC,CAAC;AACL,CAAC","file":"init-scenegraph.js","sourcesContent":["import { Group } from '../graphic/group';\nimport type { Scenegraph } from '../scenegraph';\nimport { createCornerCell } from '../style/corner-cell';\n\nexport function initSceneGraph(scene: Scenegraph) {\n const width = scene.table.tableNoFrameWidth;\n const height = scene.table.tableNoFrameHeight;\n\n scene.tableGroup = new Group({ x: 0, y: 0, width, height, clip: true, pickable: false });\n scene.tableGroup.role = 'table';\n\n const colHeaderGroup = createContainerGroup(0, 0, true);\n colHeaderGroup.role = 'col-header';\n scene.colHeaderGroup = colHeaderGroup;\n\n const cornerHeaderGroup = createContainerGroup(0, 0, true);\n cornerHeaderGroup.role = 'corner-header';\n scene.cornerHeaderGroup = cornerHeaderGroup;\n\n const rowHeaderGroup = createContainerGroup(0, 0, true);\n rowHeaderGroup.role = 'row-header';\n scene.rowHeaderGroup = rowHeaderGroup;\n\n const bodyGroup = createContainerGroup(width, 0, true);\n bodyGroup.role = 'body';\n scene.bodyGroup = bodyGroup;\n\n const rightFrozenGroup = createContainerGroup(0, 0, true);\n rightFrozenGroup.role = 'right-frozen';\n scene.rightFrozenGroup = rightFrozenGroup;\n\n const bottomFrozenGroup = createContainerGroup(0, 0, true);\n bottomFrozenGroup.role = 'bottom-frozen';\n scene.bottomFrozenGroup = bottomFrozenGroup;\n\n const componentGroup = createContainerGroup(0, 0);\n componentGroup.role = 'component';\n scene.componentGroup = componentGroup;\n\n const rightTopCornerGroup = createContainerGroup(0, 0, true);\n rightTopCornerGroup.role = 'corner-right-top-header';\n scene.rightTopCornerGroup = rightTopCornerGroup;\n\n const rightBottomCornerGroup = createContainerGroup(0, 0, true);\n rightBottomCornerGroup.role = 'corner-right-bottom-header';\n scene.rightBottomCornerGroup = rightBottomCornerGroup;\n\n const leftBottomCornerGroup = createContainerGroup(0, 0, true);\n leftBottomCornerGroup.role = 'corner-left-bottom-header';\n scene.leftBottomCornerGroup = leftBottomCornerGroup;\n\n scene.tableGroup.addChild(bodyGroup);\n //注意这块添加的顺序 会影响select框选效果 有可能引起框选框覆盖其他部分group的问题 具体问题出在update-select-border文件中的updateComponent方法\n scene.tableGroup.addChild(rowHeaderGroup);\n scene.tableGroup.addChild(bottomFrozenGroup);\n\n scene.tableGroup.addChild(colHeaderGroup);\n scene.tableGroup.addChild(rightFrozenGroup);\n\n scene.tableGroup.addChild(rightBottomCornerGroup);\n scene.tableGroup.addChild(rightTopCornerGroup);\n scene.tableGroup.addChild(leftBottomCornerGroup);\n scene.tableGroup.addChild(cornerHeaderGroup);\n scene.tableGroup.addChild(componentGroup);\n}\n\nfunction createContainerGroup(width: number, height: number, clip?: boolean) {\n return new Group({\n x: 0,\n y: 0,\n width,\n height,\n clip: clip ?? false,\n pickable: false\n });\n}\n"]}
|
|
@@ -165,14 +165,14 @@ class SceneProxy {
|
|
|
165
165
|
}
|
|
166
166
|
setY(y) {
|
|
167
167
|
return __awaiter(this, void 0, void 0, (function*() {
|
|
168
|
-
const yLimitTop = this.table.getRowsHeight(this.bodyTopRow, this.bodyTopRow + this.
|
|
169
|
-
y < yLimitTop && this.rowStart === this.bodyTopRow || y > yLimitBottom && this.rowEnd === this.bodyBottomRow ? this.table.scenegraph.setBodyAndRowHeaderY(-y) : this.dynamicSetY(y);
|
|
168
|
+
const yLimitTop = this.table.getRowsHeight(this.bodyTopRow, this.bodyTopRow + (this.rowEnd - this.rowStart + 1)) / 2, yLimitBottom = this.table.getAllRowsHeight() - yLimitTop;
|
|
169
|
+
y < yLimitTop && this.rowStart === this.bodyTopRow || y > yLimitBottom && this.rowEnd === this.bodyBottomRow ? this.table.scenegraph.setBodyAndRowHeaderY(-y) : this.table.scenegraph.bodyGroup.firstChild && 0 !== this.table.scenegraph.bodyGroup.firstChild.childrenCount ? this.dynamicSetY(y) : this.table.scenegraph.setBodyAndRowHeaderY(-y);
|
|
170
170
|
}));
|
|
171
171
|
}
|
|
172
172
|
setX(x) {
|
|
173
173
|
return __awaiter(this, void 0, void 0, (function*() {
|
|
174
|
-
const xLimitLeft = this.table.getColsWidth(this.bodyLeftCol, this.bodyLeftCol + this.
|
|
175
|
-
x < xLimitLeft && this.colStart === this.bodyLeftCol || x > xLimitRight && this.colEnd === this.bodyRightCol ? this.table.scenegraph.setBodyAndColHeaderX(-x) : this.dynamicSetX(x);
|
|
174
|
+
const xLimitLeft = this.table.getColsWidth(this.bodyLeftCol, this.bodyLeftCol + (this.colEnd - this.colStart + 1)) / 2, xLimitRight = this.table.getAllColsWidth() - xLimitLeft;
|
|
175
|
+
x < xLimitLeft && this.colStart === this.bodyLeftCol || x > xLimitRight && this.colEnd === this.bodyRightCol || this.table.scenegraph.bodyGroup.firstChild && 0 === this.table.scenegraph.bodyGroup.firstChild.childrenCount ? this.table.scenegraph.setBodyAndColHeaderX(-x) : this.dynamicSetX(x);
|
|
176
176
|
}));
|
|
177
177
|
}
|
|
178
178
|
dynamicSetY(y) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/group-creater/progress/proxy.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4C;AAE5C,+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,MAAa,UAAU;IA8CrB,YAAY,KAAmB;QA5C/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;QAEnB,aAAQ,GAAG,GAAG,CAAC;QAcf,kBAAa,GAAW,CAAC,CAAC;QAG1B,WAAM,GAAW,CAAC,CAAC;QAEnB,cAAS,GAAuB,IAAI,GAAG,EAAE,CAAC;QAGxC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,EAAE;YAC7B,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;YACpB,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;SACrB;aAAM,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,KAAK,YAAY,EAAE;YACjD,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;SACrB;aAAM,IAA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,IAAI,SAAS,CAAC,GAAG,EAAE;YAC1C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;SACpC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO;QACL,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACxB,CAAC;CACF;AAlrBD,gCAkrBC;AAED,SAAS,cAAc,CAAC,cAAqB,EAAE,GAAW;IACxD,IAAI,CAAC,cAAc,EAAE;QACnB,OAAO,IAAI,CAAC;KACb;IACD,IAAI,cAAc,CAAC,GAAG,KAAK,GAAG,EAAE;QAC9B,OAAO,cAAc,CAAC;KACvB;SAAM,IAAI,cAAc,CAAC,GAAG,GAAG,GAAG,EAAE;QACnC,OAAO,cAAc,CAAC,cAAc,CAAC,KAAc,EAAE,GAAG,CAAC,CAAC;KAC3D;IACD,OAAO,cAAc,CAAC,cAAc,CAAC,KAAc,EAAE,GAAG,CAAC,CAAC;AAC5D,CAAC","file":"proxy.js","sourcesContent":["import { isNumber } from '@visactor/vutils';\nimport type { BaseTableAPI } from '../../../ts-types/base-table';\nimport { Group } from '../../graphic/group';\nimport { computeColsWidth } from '../../layout/compute-col-width';\nimport { computeRowsHeight } from '../../layout/compute-row-height';\nimport { emptyGroup } from '../../utils/empty-group';\nimport { createColGroup } from '../column';\nimport { createComplexColumn } from '../column-helper';\nimport { createGroupForFirstScreen } from './create-group-for-first-screen';\nimport { dynamicSetX, updateColContent } from './update-position/dynamic-set-x';\nimport { dynamicSetY, updateRowContent } from './update-position/dynamic-set-y';\nimport { updateAutoRow } from './update-position/update-auto-row';\nimport { sortVertical } from './update-position/sort-vertical';\nimport { sortHorizontal } from './update-position/sort-horizontal';\nimport { updateAutoColumn } from './update-position/update-auto-column';\n\nexport class SceneProxy {\n table: BaseTableAPI;\n isRelease: boolean = false;\n mode: 'column' | 'row' | 'pivot' = 'column';\n isProgressing: boolean;\n\n rowLimit = 200;\n currentRow = 0; // 目前渐进生成的row number\n totalRow: number; // 渐进完成最后一行的row number\n yLimitTop: number; // y > yLimitTop动态更新,否则直接修改xy\n yLimitBottom: number; // y < yLimitBottom动态更新,否则直接修改xy\n rowStart = 0; // 当前维护的部分第一行的row number\n rowEnd = 0; // 当前维护的部分最后一行的row number\n referenceRow = 0; // 当前维护的部分中间一行的row number,认为referenceRow对应当前屏幕显示范围的第一行\n bodyTopRow: number; // table body部分的第一行row number\n bodyBottomRow: number; // table body部分的最后一行row number\n screenRowCount: number; // 预计屏幕范围内显示的row count\n firstScreenRowLimit: number; // 首屏同步加载部分最后一行的row number\n taskRowCount: number; // 一次任务生成/更新的row count\n rowUpdatePos: number; // 异步任务目前更新到的行的row number\n rowUpdateDirection: 'up' | 'down'; // 当前行更新的方向\n screenTopRow: number = 0; // 当前屏幕范围内显示的第一行的row number\n totalActualBodyRowCount: number; // 实际表格body部分的行数\n deltaY: number = 0;\n\n colLimit = 100;\n // bodyLeftCol: number; // table body部分的第一列col number\n bodyRightCol: number; // table body部分的最后一列col number\n totalCol: number; // 渐进完成最后一列的col number\n colStart: number; // 当前维护的部分第一列的col number\n colEnd: number; // 当前维护的部分最后一列的col number\n taskColCount: number; // 一次任务生成/更新的col count\n xLimitLeft: number; // x > xLimitLeft动态更新,否则直接修改xy\n xLimitRight: number; // x < xLimitRight动态更新,否则直接修改xy\n screenColCount: number; // 预计屏幕范围内显示的col count\n firstScreenColLimit: number; // 首屏同步加载部分最后一列的col number\n colUpdatePos: number; // 异步任务目前更新到的列的col number\n currentCol: number; // 目前渐进生成的col number\n referenceCol: number; // 当前维护的部分中间一列的col number,认为referenceCol对应当前屏幕显示范围的第一列\n screenLeftCol: number = 0; // 当前屏幕范围内显示的第一列的col number\n colUpdateDirection: 'left' | 'right'; // 当前列更新方向\n totalActualBodyColCount: number; // 实际表格body部分的列数\n deltaX: number = 0;\n\n cellCache: Map<number, Group> = new Map(); // 单元格位置快速查找缓存\n\n constructor(table: BaseTableAPI) {\n this.table = table;\n\n if (this.table.isPivotChart()) {\n this.rowLimit = 100;\n this.colLimit = 100;\n } else if (this.table.heightMode === 'autoHeight') {\n this.rowLimit = 100;\n } else if (this.table.widthMode === 'autoWidth') {\n this.colLimit = 100;\n }\n\n if (this.table.internalProps.transpose) {\n this.mode = 'row';\n } else if (this.table.isPivotTable()) {\n this.mode = 'pivot';\n }\n if (this.table.options.maintainedDataCount) {\n this.rowLimit = this.table.options.maintainedDataCount;\n }\n }\n\n get bodyLeftCol(): number {\n return this.table.frozenColCount;\n }\n\n setParamsForColumn() {\n // this.bodyLeftCol = this.table.frozenColCount;\n this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;\n\n // compute the column info about progress creation\n const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);\n this.totalActualBodyColCount = totalActualBodyColCount;\n this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1; // 目标渐进完成的col\n this.colStart = this.bodyLeftCol;\n const defaultColWidth = this.table.defaultColWidth;\n this.taskColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth) * 1;\n\n // 确定动态更新限制\n const totalBodyWidth = defaultColWidth * totalActualBodyColCount;\n const totalWidth = defaultColWidth * (this.bodyRightCol - this.bodyLeftCol + 1);\n this.xLimitLeft = totalBodyWidth / 2;\n this.xLimitRight = totalWidth - totalBodyWidth / 2;\n\n // 确定首屏高度范围\n const widthLimit = this.table.tableNoFrameWidth * 5;\n this.screenColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth);\n this.firstScreenColLimit = 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.columnHeaderLevelCount;\n this.bodyBottomRow = this.table.rowCount - 1 - this.table.bottomFrozenRowCount;\n // this.bodyLeftCol = 0;\n // this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;\n\n // 计算渐进加载数量\n const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1); // 渐进加载总row数量\n this.totalActualBodyRowCount = totalActualBodyRowCount;\n this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1; // 目标渐进完成的row\n this.rowStart = this.bodyTopRow;\n const defaultRowHeight = this.table.defaultRowHeight;\n this.taskRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight) * 1;\n\n // 确定动态更新限制\n const totalBodyHeight = defaultRowHeight * totalActualBodyRowCount;\n const totalHeight = defaultRowHeight * (this.bodyBottomRow - this.bodyTopRow + 1);\n this.yLimitTop = totalBodyHeight / 2;\n this.yLimitBottom = totalHeight - totalBodyHeight / 2;\n // this.bottomOffset = totalHeight - totalBodyHeight / 2;\n\n // 确定首屏高度范围\n const heightLimit = this.table.tableNoFrameHeight * 5;\n this.screenRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight);\n this.firstScreenRowLimit = 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 await this.updateColCellGroupsAsync();\n await this.progress();\n } else if (this.rowUpdatePos <= this.rowEnd) {\n // console.log('progress rowUpdatePos', this.rowUpdatePos);\n // 先更新\n await this.updateRowCellGroupsAsync();\n await this.progress();\n } else if (this.currentCol < this.totalCol) {\n await this.createCol();\n await this.progress();\n } else if (this.currentRow < this.totalRow) {\n // console.log('progress currentRow', this.currentRow);\n // 先更新没有需要更新的节点,在生成新节点\n await this.createRow();\n await this.progress();\n }\n resolve();\n }, 16);\n });\n }\n\n async createRow() {\n if (!this.taskRowCount) {\n return;\n }\n // console.log('createRow', this.currentRow, this.currentRow + this.taskRowCount);\n this.createRowCellGroup(this.taskRowCount);\n }\n\n async createCol() {\n if (!this.taskColCount) {\n return;\n }\n // console.log('createCol', this.currentCol, this.currentCol + this.taskColCount);\n this.createColGroup(this.taskRowCount);\n }\n\n createRowCellGroup(onceCount: number) {\n const endRow = Math.min(this.totalRow, this.currentRow + onceCount);\n // compute rows height\n computeRowsHeight(this.table, this.currentRow + 1, endRow, false);\n\n if (this.table.frozenColCount) {\n // create row header row cellGroup\n let maxHeight = 0;\n for (let col = 0; col < this.table.frozenColCount; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellLocation = this.table.isListTable() ? 'body' : 'rowHeader';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellLocation\n );\n maxHeight = Math.max(maxHeight, height);\n this.table.scenegraph.rowHeaderGroup.setAttribute('height', maxHeight);\n }\n }\n\n if (this.table.rightFrozenColCount) {\n // create row header row cellGroup\n let maxHeight = 0;\n for (let col = this.table.colCount - this.table.rightFrozenColCount; col < this.table.colCount; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellLocation = this.table.isListTable() ? 'body' : 'rowHeader';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellLocation\n );\n maxHeight = Math.max(maxHeight, height);\n this.table.scenegraph.rightFrozenGroup.setAttribute('height', maxHeight);\n }\n }\n\n // create body row cellGroup\n let maxHeight = 0;\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n if (!colGroup) {\n continue;\n }\n const cellLocation = 'body';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellLocation\n );\n maxHeight = Math.max(maxHeight, height);\n }\n this.table.scenegraph.bodyGroup.setAttribute('height', maxHeight);\n\n this.currentRow = endRow;\n this.rowEnd = endRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = this.rowStart + Math.floor((endRow - this.rowStart) / 2);\n\n // update container group size and border\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n createColGroup(onceCount: number) {\n // compute rows height\n const endCol = Math.min(this.totalCol, this.currentCol + onceCount);\n computeColsWidth(this.table, this.currentCol + 1, endCol);\n\n // update last merge cell size\n for (let row = 0; row < this.table.rowCount; row++) {\n const cellGroup = this.highPerformanceGetCell(this.currentCol, row);\n if (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.columnHeaderLevelCount) {\n // create colGroup\n const lastColumnGroup = (\n this.table.scenegraph.colHeaderGroup.lastChild instanceof Group\n ? this.table.scenegraph.colHeaderGroup.lastChild\n : this.table.scenegraph.colHeaderGroup.lastChild._prev\n ) as Group;\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create colHeaderGroup\n createColGroup(\n this.table.scenegraph.colHeaderGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n 0, // rowStart\n this.table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n this.table\n );\n }\n if (this.table.bottomFrozenRowCount) {\n // create colGroup\n const lastColumnGroup = (\n this.table.scenegraph.bottomFrozenGroup.lastChild instanceof Group\n ? this.table.scenegraph.bottomFrozenGroup.lastChild\n : this.table.scenegraph.bottomFrozenGroup.lastChild._prev\n ) as Group;\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create bottomFrozenGroup\n createColGroup(\n this.table.scenegraph.bottomFrozenGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n this.table.rowCount - this.table.bottomFrozenRowCount, // rowStart\n this.table.rowCount - 1, // rowEnd\n 'columnHeader', // isHeader\n this.table\n );\n }\n // create colGroup\n let lastColumnGroup =\n this.table.scenegraph.bodyGroup.lastChild &&\n ((this.table.scenegraph.bodyGroup.lastChild instanceof Group\n ? this.table.scenegraph.bodyGroup.lastChild\n : this.table.scenegraph.bodyGroup.lastChild._prev) as Group);\n if (!lastColumnGroup) {\n lastColumnGroup =\n this.table.scenegraph.colHeaderGroup.lastChild &&\n ((this.table.scenegraph.colHeaderGroup.lastChild instanceof Group\n ? this.table.scenegraph.colHeaderGroup.lastChild\n : this.table.scenegraph.colHeaderGroup.lastChild._prev) as Group);\n }\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create bodyGroup\n createColGroup(\n this.table.scenegraph.bodyGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n this.rowStart, // rowStart\n this.rowEnd, // rowEnd\n 'body', // isHeader\n this.table\n );\n\n this.currentCol = endCol;\n this.colEnd = endCol;\n this.colUpdatePos = this.colEnd;\n this.referenceCol = this.colStart + Math.floor((endCol - this.colStart) / 2);\n console.log('async', this.referenceCol, this.colStart, this.colEnd);\n\n // update container group size and border\n // this.table.scenegraph.updateContainerAttrWidthAndX();\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n async setY(y: number) {\n const yLimitTop = this.table.getRowsHeight(this.bodyTopRow, this.bodyTopRow + this.totalActualBodyRowCount) / 2;\n const yLimitBottom = this.table.getAllRowsHeight() - yLimitTop;\n if (y < yLimitTop && this.rowStart === this.bodyTopRow) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n } else if (y > yLimitBottom && this.rowEnd === this.bodyBottomRow) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n } else {\n // 执行动态更新节点\n this.dynamicSetY(y);\n }\n }\n\n async setX(x: number) {\n const xLimitLeft = this.table.getColsWidth(this.bodyLeftCol, this.bodyLeftCol + this.totalActualBodyColCount) / 2;\n const xLimitRight = this.table.getAllColsWidth() - xLimitLeft;\n if (x < xLimitLeft && this.colStart === this.bodyLeftCol) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndColHeaderX(-x);\n } else if (x > xLimitRight && this.colEnd === this.bodyRightCol) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndColHeaderX(-x);\n } else {\n // 执行动态更新节点\n this.dynamicSetX(x);\n }\n }\n\n async dynamicSetY(y: number) {\n dynamicSetY(y, this);\n }\n async dynamicSetX(x: number) {\n dynamicSetX(x, this);\n }\n\n updateBody(y: number) {\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n }\n\n async updateRowCellGroupsAsync() {\n this.updateCellGroups(this.taskRowCount);\n }\n\n updateCellGroups(count: number) {\n const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);\n // console.log('updateCellGroups', this.rowUpdatePos, distRow);\n if (this.table.heightMode === 'autoHeight') {\n computeRowsHeight(this.table, this.rowUpdatePos, distRow, false);\n }\n\n updateRowContent(this.rowUpdatePos, distRow, this);\n\n if (this.table.heightMode === 'autoHeight') {\n // 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 );\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 );\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 );\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.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 // 更新内容\n // const textMark = cellGroup.firstChild as WrapText;\n // const autoWrapText = Array.isArray(textMark.attribute.text);\n // const textStr: string = this.table.getCellValue(cellGroup.col, cellGroup.row);\n // let text;\n // if (autoWrapText) {\n // text = String(textStr).replace(/\\r?\\n/g, '\\n').replace(/\\r/g, '\\n').split('\\n');\n // } else {\n // text = textStr;\n // }\n\n // textMark.setAttribute('text', text);\n\n cellGroup.needUpdate = false;\n return newCellGroup || cellGroup;\n }\n\n async sortCellVertical() {\n await sortVertical(this);\n }\n\n async sortCellHorizontal() {\n await sortHorizontal(this);\n }\n\n highPerformanceGetCell(\n col: number,\n row: number,\n // rowStart: number = this.rowStart,\n // rowEnd: number = this.rowEnd,\n getShadow?: boolean\n ) {\n // if (row < rowStart || row > rowEnd) {\n // return emptyGroup;\n // }\n // if (row < this.rowStart || row > this.rowEnd || col < this.colStart || col > this.colEnd) {\n // return emptyGroup;\n // }\n\n if (\n row >= this.table.columnHeaderLevelCount && // not column header\n row < this.table.rowCount - this.table.bottomFrozenRowCount && // not bottom frozen\n (row < this.rowStart || row > this.rowEnd) // not in proxy row range\n ) {\n return emptyGroup;\n }\n\n if (\n col >= this.table.frozenColCount && // not row header\n col < this.table.colCount - this.table.rightFrozenColCount && // not right frozen\n (col < this.colStart || col > this.colEnd) // not in proxy col range\n ) {\n return emptyGroup;\n }\n\n if (this.cellCache.get(col)) {\n const cacheCellGoup = this.cellCache.get(col);\n if ((cacheCellGoup._next || cacheCellGoup._prev) && Math.abs(cacheCellGoup.row - row) < row) {\n // 由缓存单元格向前后查找要快于从头查找\n let cellGroup = getCellByCache(cacheCellGoup, row);\n if (!cellGroup || (!getShadow && cellGroup.role === 'shadow-cell')) {\n cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n }\n cellGroup.row && this.cellCache.set(col, cellGroup);\n return cellGroup;\n }\n const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n // cellGroup.row && this.cellCache.set(col, cellGroup);\n if (cellGroup.col === col && cellGroup.row) {\n this.cellCache.set(col, cellGroup);\n }\n return cellGroup;\n }\n const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n // cellGroup.row && this.cellCache.set(col, cellGroup);\n if (cellGroup.col === col && cellGroup.row) {\n this.cellCache.set(col, cellGroup);\n }\n return cellGroup;\n }\n\n release() {\n this.isRelease = true;\n }\n}\n\nfunction getCellByCache(cacheCellGroup: Group, row: number): Group | null {\n if (!cacheCellGroup) {\n return null;\n }\n if (cacheCellGroup.row === row) {\n return cacheCellGroup;\n } else if (cacheCellGroup.row > row) {\n return getCellByCache(cacheCellGroup._prev as Group, row);\n }\n return getCellByCache(cacheCellGroup._next as Group, row);\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/scenegraph/group-creater/progress/proxy.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4C;AAE5C,+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,MAAa,UAAU;IA8CrB,YAAY,KAAmB;QA5C/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;QAEnB,aAAQ,GAAG,GAAG,CAAC;QAcf,kBAAa,GAAW,CAAC,CAAC;QAG1B,WAAM,GAAW,CAAC,CAAC;QAEnB,cAAS,GAAuB,IAAI,GAAG,EAAE,CAAC;QAGxC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,EAAE;YAC7B,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;YACpB,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;SACrB;aAAM,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,KAAK,YAAY,EAAE;YACjD,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;SACrB;aAAM,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,KAAK,WAAW,EAAE;YAC/C,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;SACrB;QAED,IAAI,IAAI,C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,OAAO,SAAS,CAAC;aAClB;YACD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;YAErE,IAAI,SAAS,CAAC,GAAG,KAAK,GAAG,IAAI,SAAS,CAAC,GAAG,EAAE;gBAC1C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;aACpC;YACD,OAAO,SAAS,CAAC;SAClB;QACD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QAErE,IAAI,SAAS,CAAC,GAAG,KAAK,GAAG,IAAI,SAAS,CAAC,GAAG,EAAE;YAC1C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;SACpC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO;QACL,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACxB,CAAC;CACF;AAhsBD,gCAgsBC;AAED,SAAS,cAAc,CAAC,cAAqB,EAAE,GAAW;IACxD,IAAI,CAAC,cAAc,EAAE;QACnB,OAAO,IAAI,CAAC;KACb;IACD,IAAI,cAAc,CAAC,GAAG,KAAK,GAAG,EAAE;QAC9B,OAAO,cAAc,CAAC;KACvB;SAAM,IAAI,cAAc,CAAC,GAAG,GAAG,GAAG,EAAE;QACnC,OAAO,cAAc,CAAC,cAAc,CAAC,KAAc,EAAE,GAAG,CAAC,CAAC;KAC3D;IACD,OAAO,cAAc,CAAC,cAAc,CAAC,KAAc,EAAE,GAAG,CAAC,CAAC;AAC5D,CAAC","file":"proxy.js","sourcesContent":["import { isNumber } from '@visactor/vutils';\nimport type { BaseTableAPI } from '../../../ts-types/base-table';\nimport { Group } from '../../graphic/group';\nimport { computeColsWidth } from '../../layout/compute-col-width';\nimport { computeRowsHeight } from '../../layout/compute-row-height';\nimport { emptyGroup } from '../../utils/empty-group';\nimport { createColGroup } from '../column';\nimport { createComplexColumn } from '../column-helper';\nimport { createGroupForFirstScreen } from './create-group-for-first-screen';\nimport { dynamicSetX, updateColContent } from './update-position/dynamic-set-x';\nimport { dynamicSetY, updateRowContent } from './update-position/dynamic-set-y';\nimport { updateAutoRow } from './update-position/update-auto-row';\nimport { sortVertical } from './update-position/sort-vertical';\nimport { sortHorizontal } from './update-position/sort-horizontal';\nimport { updateAutoColumn } from './update-position/update-auto-column';\n\nexport class SceneProxy {\n table: BaseTableAPI;\n isRelease: boolean = false;\n mode: 'column' | 'row' | 'pivot' = 'column';\n isProgressing: boolean;\n\n rowLimit = 200;\n currentRow = 0; // 目前渐进生成的row number\n totalRow: number; // 渐进完成最后一行的row number\n yLimitTop: number; // y > yLimitTop动态更新,否则直接修改xy\n yLimitBottom: number; // y < yLimitBottom动态更新,否则直接修改xy\n rowStart = 0; // 当前维护的部分第一行的row number\n rowEnd = 0; // 当前维护的部分最后一行的row number\n referenceRow = 0; // 当前维护的部分中间一行的row number,认为referenceRow对应当前屏幕显示范围的第一行\n bodyTopRow: number; // table body部分的第一行row number\n bodyBottomRow: number; // table body部分的最后一行row number\n screenRowCount: number; // 预计屏幕范围内显示的row count\n firstScreenRowLimit: number; // 首屏同步加载部分最后一行的row number\n taskRowCount: number; // 一次任务生成/更新的row count\n rowUpdatePos: number; // 异步任务目前更新到的行的row number\n rowUpdateDirection: 'up' | 'down'; // 当前行更新的方向\n screenTopRow: number = 0; // 当前屏幕范围内显示的第一行的row number\n totalActualBodyRowCount: number; // 实际表格body部分的行数\n deltaY: number = 0;\n\n colLimit = 100;\n // bodyLeftCol: number; // table body部分的第一列col number\n bodyRightCol: number; // table body部分的最后一列col number\n totalCol: number; // 渐进完成最后一列的col number\n colStart: number; // 当前维护的部分第一列的col number\n colEnd: number; // 当前维护的部分最后一列的col number\n taskColCount: number; // 一次任务生成/更新的col count\n xLimitLeft: number; // x > xLimitLeft动态更新,否则直接修改xy\n xLimitRight: number; // x < xLimitRight动态更新,否则直接修改xy\n screenColCount: number; // 预计屏幕范围内显示的col count\n firstScreenColLimit: number; // 首屏同步加载部分最后一列的col number\n colUpdatePos: number; // 异步任务目前更新到的列的col number\n currentCol: number; // 目前渐进生成的col number\n referenceCol: number; // 当前维护的部分中间一列的col number,认为referenceCol对应当前屏幕显示范围的第一列\n screenLeftCol: number = 0; // 当前屏幕范围内显示的第一列的col number\n colUpdateDirection: 'left' | 'right'; // 当前列更新方向\n totalActualBodyColCount: number; // 实际表格body部分的列数\n deltaX: number = 0;\n\n cellCache: Map<number, Group> = new Map(); // 单元格位置快速查找缓存\n\n constructor(table: BaseTableAPI) {\n this.table = table;\n\n if (this.table.isPivotChart()) {\n this.rowLimit = 100;\n this.colLimit = 100;\n } else if (this.table.heightMode === 'autoHeight') {\n this.rowLimit = 100;\n } else if (this.table.widthMode === 'autoWidth') {\n this.colLimit = 100;\n }\n\n if (this.table.internalProps.transpose) {\n this.mode = 'row';\n } else if (this.table.isPivotTable()) {\n this.mode = 'pivot';\n }\n if (this.table.options.maintainedDataCount) {\n this.rowLimit = this.table.options.maintainedDataCount;\n }\n }\n\n get bodyLeftCol(): number {\n return this.table.frozenColCount;\n }\n\n setParamsForColumn() {\n // this.bodyLeftCol = this.table.frozenColCount;\n this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;\n\n // compute the column info about progress creation\n const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);\n this.totalActualBodyColCount = totalActualBodyColCount;\n this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1; // 目标渐进完成的col\n this.colStart = this.bodyLeftCol;\n const defaultColWidth = this.table.defaultColWidth;\n this.taskColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth) * 1;\n\n // 确定动态更新限制\n const totalBodyWidth = defaultColWidth * totalActualBodyColCount;\n const totalWidth = defaultColWidth * (this.bodyRightCol - this.bodyLeftCol + 1);\n this.xLimitLeft = totalBodyWidth / 2;\n this.xLimitRight = totalWidth - totalBodyWidth / 2;\n\n // 确定首屏高度范围\n const widthLimit = this.table.tableNoFrameWidth * 5;\n this.screenColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth);\n this.firstScreenColLimit = 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.columnHeaderLevelCount;\n this.bodyBottomRow = this.table.rowCount - 1 - this.table.bottomFrozenRowCount;\n // this.bodyLeftCol = 0;\n // this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;\n\n // 计算渐进加载数量\n const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1); // 渐进加载总row数量\n this.totalActualBodyRowCount = totalActualBodyRowCount;\n this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1; // 目标渐进完成的row\n this.rowStart = this.bodyTopRow;\n const defaultRowHeight = this.table.defaultRowHeight;\n this.taskRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight) * 1;\n\n // 确定动态更新限制\n const totalBodyHeight = defaultRowHeight * totalActualBodyRowCount;\n const totalHeight = defaultRowHeight * (this.bodyBottomRow - this.bodyTopRow + 1);\n this.yLimitTop = totalBodyHeight / 2;\n this.yLimitBottom = totalHeight - totalBodyHeight / 2;\n // this.bottomOffset = totalHeight - totalBodyHeight / 2;\n\n // 确定首屏高度范围\n const heightLimit = this.table.tableNoFrameHeight * 5;\n this.screenRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight);\n this.firstScreenRowLimit = 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 await this.updateColCellGroupsAsync();\n await this.progress();\n } else if (this.rowUpdatePos <= this.rowEnd) {\n // console.log('progress rowUpdatePos', this.rowUpdatePos);\n // 先更新\n await this.updateRowCellGroupsAsync();\n await this.progress();\n } else if (this.currentCol < this.totalCol) {\n await this.createCol();\n await this.progress();\n } else if (this.currentRow < this.totalRow) {\n // console.log('progress currentRow', this.currentRow);\n // 先更新没有需要更新的节点,在生成新节点\n await this.createRow();\n await this.progress();\n }\n resolve();\n }, 16);\n });\n }\n\n async createRow() {\n if (!this.taskRowCount) {\n return;\n }\n // console.log('createRow', this.currentRow, this.currentRow + this.taskRowCount);\n this.createRowCellGroup(this.taskRowCount);\n }\n\n async createCol() {\n if (!this.taskColCount) {\n return;\n }\n // console.log('createCol', this.currentCol, this.currentCol + this.taskColCount);\n this.createColGroup(this.taskRowCount);\n }\n\n createRowCellGroup(onceCount: number) {\n const endRow = Math.min(this.totalRow, this.currentRow + onceCount);\n // compute rows height\n computeRowsHeight(this.table, this.currentRow + 1, endRow, false);\n\n if (this.table.frozenColCount) {\n // create row header row cellGroup\n let maxHeight = 0;\n for (let col = 0; col < this.table.frozenColCount; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellLocation = this.table.isListTable() ? 'body' : 'rowHeader';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellLocation\n );\n maxHeight = Math.max(maxHeight, height);\n this.table.scenegraph.rowHeaderGroup.setAttribute('height', maxHeight);\n }\n }\n\n if (this.table.rightFrozenColCount) {\n // create row header row cellGroup\n let maxHeight = 0;\n for (let col = this.table.colCount - this.table.rightFrozenColCount; col < this.table.colCount; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellLocation = this.table.isListTable() ? 'body' : 'rowHeader';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellLocation\n );\n maxHeight = Math.max(maxHeight, height);\n this.table.scenegraph.rightFrozenGroup.setAttribute('height', maxHeight);\n }\n }\n\n // create body row cellGroup\n let maxHeight = 0;\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n if (!colGroup) {\n continue;\n }\n const cellLocation = 'body';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellLocation\n );\n maxHeight = Math.max(maxHeight, height);\n }\n this.table.scenegraph.bodyGroup.setAttribute('height', maxHeight);\n\n this.currentRow = endRow;\n this.rowEnd = endRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = this.rowStart + Math.floor((endRow - this.rowStart) / 2);\n\n // update container group size and border\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n createColGroup(onceCount: number) {\n // compute rows height\n const endCol = Math.min(this.totalCol, this.currentCol + onceCount);\n computeColsWidth(this.table, this.currentCol + 1, endCol);\n\n // update last merge cell size\n for (let row = 0; row < this.table.rowCount; row++) {\n const cellGroup = this.highPerformanceGetCell(this.currentCol, row);\n if (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.columnHeaderLevelCount) {\n // create colGroup\n const lastColumnGroup = (\n this.table.scenegraph.colHeaderGroup.lastChild instanceof Group\n ? this.table.scenegraph.colHeaderGroup.lastChild\n : this.table.scenegraph.colHeaderGroup.lastChild._prev\n ) as Group;\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create colHeaderGroup\n createColGroup(\n this.table.scenegraph.colHeaderGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n 0, // rowStart\n this.table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n this.table\n );\n }\n if (this.table.bottomFrozenRowCount) {\n // create colGroup\n const lastColumnGroup = (\n this.table.scenegraph.bottomFrozenGroup.lastChild instanceof Group\n ? this.table.scenegraph.bottomFrozenGroup.lastChild\n : this.table.scenegraph.bottomFrozenGroup.lastChild._prev\n ) as Group;\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create bottomFrozenGroup\n createColGroup(\n this.table.scenegraph.bottomFrozenGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n this.table.rowCount - this.table.bottomFrozenRowCount, // rowStart\n this.table.rowCount - 1, // rowEnd\n 'columnHeader', // isHeader\n this.table\n );\n }\n // create colGroup\n let lastColumnGroup =\n this.table.scenegraph.bodyGroup.lastChild &&\n ((this.table.scenegraph.bodyGroup.lastChild instanceof Group\n ? this.table.scenegraph.bodyGroup.lastChild\n : this.table.scenegraph.bodyGroup.lastChild._prev) as Group);\n if (!lastColumnGroup) {\n lastColumnGroup =\n this.table.scenegraph.colHeaderGroup.lastChild &&\n ((this.table.scenegraph.colHeaderGroup.lastChild instanceof Group\n ? this.table.scenegraph.colHeaderGroup.lastChild\n : this.table.scenegraph.colHeaderGroup.lastChild._prev) as Group);\n }\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create bodyGroup\n createColGroup(\n this.table.scenegraph.bodyGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n this.rowStart, // rowStart\n this.rowEnd, // rowEnd\n 'body', // isHeader\n this.table\n );\n\n this.currentCol = endCol;\n this.colEnd = endCol;\n this.colUpdatePos = this.colEnd;\n this.referenceCol = this.colStart + Math.floor((endCol - this.colStart) / 2);\n console.log('async', this.referenceCol, this.colStart, this.colEnd);\n\n // update container group size and border\n // this.table.scenegraph.updateContainerAttrWidthAndX();\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n async setY(y: number) {\n const yLimitTop =\n this.table.getRowsHeight(this.bodyTopRow, this.bodyTopRow + (this.rowEnd - this.rowStart + 1)) / 2;\n const yLimitBottom = this.table.getAllRowsHeight() - yLimitTop;\n if (y < yLimitTop && this.rowStart === this.bodyTopRow) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n } else if (y > yLimitBottom && this.rowEnd === this.bodyBottomRow) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n } else if (\n !this.table.scenegraph.bodyGroup.firstChild ||\n this.table.scenegraph.bodyGroup.firstChild.childrenCount === 0\n ) {\n // 兼容异步加载数据promise的情况 childrenCount=0 如果用户立即调用setScrollTop执行dynamicSetY会出错\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n } else {\n // 执行动态更新节点\n this.dynamicSetY(y);\n }\n }\n\n async setX(x: number) {\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 if (x < xLimitLeft && this.colStart === this.bodyLeftCol) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndColHeaderX(-x);\n } else if (x > xLimitRight && this.colEnd === this.bodyRightCol) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndColHeaderX(-x);\n } else if (\n this.table.scenegraph.bodyGroup.firstChild && //注意判断关系 这里不是 || 而是 &&\n this.table.scenegraph.bodyGroup.firstChild.childrenCount === 0\n ) {\n // 兼容异步加载数据promise的情况 childrenCount=0 如果用户立即调用setScrollLeft执行dynamicSetX会出错\n this.table.scenegraph.setBodyAndColHeaderX(-x);\n } else {\n // 执行动态更新节点\n this.dynamicSetX(x);\n }\n }\n\n async dynamicSetY(y: number) {\n dynamicSetY(y, this);\n }\n async dynamicSetX(x: number) {\n dynamicSetX(x, this);\n }\n\n updateBody(y: number) {\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n }\n\n async updateRowCellGroupsAsync() {\n this.updateCellGroups(this.taskRowCount);\n }\n\n updateCellGroups(count: number) {\n const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);\n // console.log('updateCellGroups', this.rowUpdatePos, distRow);\n if (this.table.heightMode === 'autoHeight') {\n computeRowsHeight(this.table, this.rowUpdatePos, distRow, false);\n }\n\n updateRowContent(this.rowUpdatePos, distRow, this);\n\n if (this.table.heightMode === 'autoHeight') {\n // 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 );\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 );\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 );\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.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 // 更新内容\n // const textMark = cellGroup.firstChild as WrapText;\n // const autoWrapText = Array.isArray(textMark.attribute.text);\n // const textStr: string = this.table.getCellValue(cellGroup.col, cellGroup.row);\n // let text;\n // if (autoWrapText) {\n // text = String(textStr).replace(/\\r?\\n/g, '\\n').replace(/\\r/g, '\\n').split('\\n');\n // } else {\n // text = textStr;\n // }\n\n // textMark.setAttribute('text', text);\n\n cellGroup.needUpdate = false;\n return newCellGroup || cellGroup;\n }\n\n async sortCellVertical() {\n await sortVertical(this);\n }\n\n async sortCellHorizontal() {\n await sortHorizontal(this);\n }\n\n highPerformanceGetCell(\n col: number,\n row: number,\n // rowStart: number = this.rowStart,\n // rowEnd: number = this.rowEnd,\n getShadow?: boolean\n ) {\n // if (row < rowStart || row > rowEnd) {\n // return emptyGroup;\n // }\n // if (row < this.rowStart || row > this.rowEnd || col < this.colStart || col > this.colEnd) {\n // return emptyGroup;\n // }\n\n if (\n row >= this.table.columnHeaderLevelCount && // not column header\n row < this.table.rowCount - this.table.bottomFrozenRowCount && // not bottom frozen\n (row < this.rowStart || row > this.rowEnd) // not in proxy row range\n ) {\n return emptyGroup;\n }\n\n if (\n col >= this.table.frozenColCount && // not row header\n col < this.table.colCount - this.table.rightFrozenColCount && // not right frozen\n (col < this.colStart || col > this.colEnd) // not in proxy col range\n ) {\n return emptyGroup;\n }\n\n if (this.cellCache.get(col)) {\n const cacheCellGoup = this.cellCache.get(col);\n if ((cacheCellGoup._next || cacheCellGoup._prev) && Math.abs(cacheCellGoup.row - row) < row) {\n // 由缓存单元格向前后查找要快于从头查找\n let cellGroup = getCellByCache(cacheCellGoup, row);\n if (!cellGroup || (!getShadow && cellGroup.role === 'shadow-cell')) {\n cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n }\n cellGroup.row && this.cellCache.set(col, cellGroup);\n return cellGroup;\n }\n const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n // cellGroup.row && this.cellCache.set(col, cellGroup);\n if (cellGroup.col === col && cellGroup.row) {\n this.cellCache.set(col, cellGroup);\n }\n return cellGroup;\n }\n const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n // cellGroup.row && this.cellCache.set(col, cellGroup);\n if (cellGroup.col === col && cellGroup.row) {\n this.cellCache.set(col, cellGroup);\n }\n return cellGroup;\n }\n\n release() {\n this.isRelease = true;\n }\n}\n\nfunction getCellByCache(cacheCellGroup: Group, row: number): Group | null {\n if (!cacheCellGroup) {\n return null;\n }\n if (cacheCellGroup.row === row) {\n return cacheCellGroup;\n } else if (cacheCellGroup.row > row) {\n return getCellByCache(cacheCellGroup._prev as Group, row);\n }\n return getCellByCache(cacheCellGroup._next as Group, row);\n}\n"]}
|
|
@@ -119,7 +119,7 @@ function updatePartRowPosition(startRow, endRow, direction, proxy) {
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
function updateCellGroupPosition(colGroup, direction, proxy) {
|
|
122
|
-
if ("up" === direction) {
|
|
122
|
+
if (colGroup.childrenCount >= 1) if ("up" === direction) {
|
|
123
123
|
const cellGroup = colGroup.firstChild;
|
|
124
124
|
proxy.updateCellGroupPosition(cellGroup, colGroup.lastChild.row + 1, colGroup.lastChild.attribute.y + proxy.table.getRowHeight(colGroup.lastChild.row)),
|
|
125
125
|
colGroup.appendChild(cellGroup);
|