@visactor/vtable 1.7.5-alpha.0 → 1.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ListTable.d.ts +2 -2
- package/cjs/ListTable.js +34 -22
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotTable.d.ts +1 -0
- package/cjs/PivotTable.js +4 -0
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/body-helper/body-helper.js +2 -2
- package/cjs/body-helper/body-helper.js.map +1 -1
- package/cjs/components/axis/axis.d.ts +1 -0
- package/cjs/components/axis/axis.js +14 -10
- package/cjs/components/axis/axis.js.map +1 -1
- package/cjs/core/BaseTable.js +7 -5
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/record-helper.js +9 -11
- package/cjs/core/record-helper.js.map +1 -1
- package/cjs/data/CachedDataSource.d.ts +1 -1
- package/cjs/data/CachedDataSource.js +4 -4
- package/cjs/data/CachedDataSource.js.map +1 -1
- package/cjs/data/DataSource.d.ts +3 -5
- package/cjs/data/DataSource.js +49 -30
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/dataset/dataset-pivot-table.d.ts +1 -1
- package/cjs/dataset/dataset-pivot-table.js +10 -45
- package/cjs/dataset/dataset-pivot-table.js.map +1 -1
- package/cjs/dataset/dataset.d.ts +1 -0
- package/cjs/dataset/dataset.js +15 -7
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/dataset/statistics-helper.js +1 -1
- package/cjs/dataset/statistics-helper.js.map +1 -1
- package/cjs/event/EventHandler.js +1 -1
- package/cjs/event/EventHandler.js.map +1 -1
- package/cjs/event/listener/table-group.js +37 -25
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/scroll.js +2 -1
- package/cjs/event/scroll.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/chart-helper/get-axis-config.js +26 -13
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/chart-helper/get-chart-spec.js +1 -1
- package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +14 -10
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +1 -1
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +6 -5
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/icon/icon-update.d.ts +10 -1
- package/cjs/scenegraph/icon/icon-update.js +4 -4
- package/cjs/scenegraph/icon/icon-update.js.map +1 -1
- package/cjs/scenegraph/layout/update-height.js +1 -1
- package/cjs/scenegraph/layout/update-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +5 -5
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.js +2 -1
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +9 -1
- package/cjs/scenegraph/scenegraph.js +12 -2
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/style/frame-border.js +1 -0
- package/cjs/scenegraph/style/frame-border.js.map +1 -1
- package/cjs/state/sort/index.js +17 -6
- package/cjs/state/sort/index.js.map +1 -1
- package/cjs/state/state.d.ts +4 -4
- package/cjs/state/state.js +87 -17
- package/cjs/state/state.js.map +1 -1
- package/cjs/tools/util.d.ts +1 -0
- package/cjs/tools/util.js +7 -2
- package/cjs/tools/util.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +1 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +3 -1
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender.js +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +416 -214
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +2 -2
- package/es/ListTable.js +33 -20
- package/es/ListTable.js.map +1 -1
- package/es/PivotTable.d.ts +1 -0
- package/es/PivotTable.js +4 -0
- package/es/PivotTable.js.map +1 -1
- package/es/body-helper/body-helper.js +3 -1
- package/es/body-helper/body-helper.js.map +1 -1
- package/es/components/axis/axis.d.ts +1 -0
- package/es/components/axis/axis.js +14 -10
- package/es/components/axis/axis.js.map +1 -1
- package/es/core/BaseTable.js +7 -5
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/record-helper.js +9 -11
- package/es/core/record-helper.js.map +1 -1
- package/es/data/CachedDataSource.d.ts +1 -1
- package/es/data/CachedDataSource.js +4 -4
- package/es/data/CachedDataSource.js.map +1 -1
- package/es/data/DataSource.d.ts +3 -5
- package/es/data/DataSource.js +49 -28
- package/es/data/DataSource.js.map +1 -1
- package/es/dataset/dataset-pivot-table.d.ts +1 -1
- package/es/dataset/dataset-pivot-table.js +9 -44
- package/es/dataset/dataset-pivot-table.js.map +1 -1
- package/es/dataset/dataset.d.ts +1 -0
- package/es/dataset/dataset.js +15 -7
- package/es/dataset/dataset.js.map +1 -1
- package/es/dataset/statistics-helper.js +1 -1
- package/es/dataset/statistics-helper.js.map +1 -1
- package/es/event/EventHandler.js +1 -1
- package/es/event/EventHandler.js.map +1 -1
- package/es/event/listener/table-group.js +38 -26
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/scroll.js +2 -1
- package/es/event/scroll.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/chart-helper/get-axis-config.js +23 -12
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/chart-helper/get-chart-spec.js +1 -1
- package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +14 -9
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +1 -1
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +6 -5
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/icon/icon-update.d.ts +10 -1
- package/es/scenegraph/icon/icon-update.js +5 -3
- package/es/scenegraph/icon/icon-update.js.map +1 -1
- package/es/scenegraph/layout/update-height.js +1 -1
- package/es/scenegraph/layout/update-height.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +5 -5
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.js +2 -1
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +9 -1
- package/es/scenegraph/scenegraph.js +12 -2
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/style/frame-border.js +1 -0
- package/es/scenegraph/style/frame-border.js.map +1 -1
- package/es/state/sort/index.js +17 -6
- package/es/state/sort/index.js.map +1 -1
- package/es/state/state.d.ts +4 -4
- package/es/state/state.js +88 -16
- package/es/state/state.js.map +1 -1
- package/es/tools/util.d.ts +1 -0
- package/es/tools/util.js +4 -0
- package/es/tools/util.js.map +1 -1
- package/es/ts-types/base-table.d.ts +1 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +3 -1
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/vrender.js +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/icon/icon-update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIlD,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC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ourcesContent":["import { isValid } from '@visactor/vutils';\nimport type { Group } from '../graphic/group';\nimport type { Scenegraph } from '../scenegraph';\nimport type { ColumnIconOption, SortOrder, SvgIcon } from '../../ts-types';\nimport { IconFuncTypeEnum } from '../../ts-types';\nimport type { Icon } from '../graphic/icon';\nimport type { TooltipOptions } from '../../ts-types/tooltip';\nimport type { IRect } from './../../vrender';\nimport { IContainPointMode, createRect } from './../../vrender';\nimport { dealWithIcon } from '../utils/text-icon-layout';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport { getCellMergeRange } from '../../tools/merge-range';\n\nexport function hideHoverIcon(col: number, row: number, scene: Scenegraph) {\n if (col === -1 || row === -1) {\n return;\n }\n // const cellGroup = scene.getCell(col, row);\n // hideIcon(scene, cellGroup, 'mouseenter_cell');\n\n // hideIcon\n updateCellRangeIcon(\n col,\n row,\n (icon: Icon) => icon.attribute.visibleTime === 'mouseenter_cell',\n (icon: Icon) => {\n icon.setAttribute('opacity', 0);\n\n const iconBack = icon.parent.getChildByName('icon-back') as IRect;\n if (iconBack) {\n iconBack.setAttribute('visible', false);\n }\n },\n scene\n );\n scene.updateNextFrame();\n}\n\nexport function showHoverIcon(col: number, row: number, scene: Scenegraph) {\n if (col === -1 || row === -1) {\n return;\n }\n // const cellGroup = scene.getCell(col, row);\n // showIcon(scene, cellGroup, 'mouseenter_cell');\n\n // showIcon\n updateCellRangeIcon(\n col,\n row,\n (icon: Icon) => icon.attribute.visibleTime === 'mouseenter_cell',\n (icon: Icon) => {\n icon.setAttribute('opacity', 1);\n },\n scene\n );\n scene.updateNextFrame();\n}\n\nexport function hideClickIcon(col: number, row: number, scene: Scenegraph) {\n if (col === -1 || row === -1) {\n return;\n }\n // const cellGroup = scene.getCell(col, row);\n // hideIcon(scene, cellGroup, 'click_cell');\n\n // hideIcon\n updateCellRangeIcon(\n col,\n row,\n (icon: Icon) => icon.attribute.visibleTime === 'click_cell',\n (icon: Icon) => {\n icon.setAttribute('opacity', 0);\n },\n scene\n );\n scene.updateNextFrame();\n}\n\nexport function showClickIcon(col: number, row: number, scene: Scenegraph) {\n if (col === -1 || row === -1) {\n return;\n }\n // const cellGroup = scene.getCell(col, row);\n // showIcon(scene, cellGroup, 'click_cell');\n\n // showIcon\n updateCellRangeIcon(\n col,\n row,\n (icon: Icon) => icon.attribute.visibleTime === 'click_cell',\n (icon: Icon) => {\n icon.setAttribute('opacity', 1);\n },\n scene\n );\n scene.updateNextFrame();\n}\n\n/**\n * @description: 获取指定单元格指定位置的icon mark\n * @param {number} col\n * @param {number} row\n * @param {number} x\n * @param {number} y\n * @return {*}\n */\nexport function getIconByXY(col: number, row: number, x: number, y: number, scene: Scenegraph): Icon | undefined {\n const cellGroup = scene.getCell(col, row);\n let pickMark;\n cellGroup.forEachChildren((mark: Icon) => {\n if (mark.role && mark.role.startsWith('icon') && mark.containsPoint(x, y, IContainPointMode.GLOBAL)) {\n pickMark = mark;\n }\n });\n return pickMark;\n}\n\n/**\n * @description: 将指定icon mark设置为Hover样式\n * @param {Icon} icon\n * @param {number} col\n * @param {number} row\n * @return {*}\n */\nexport function setIconHoverStyle(baseIcon: Icon, col: number, row: number, cellGroup: Group, scene: Scenegraph) {\n if (baseIcon.attribute.backgroundColor || baseIcon.attribute.hoverImage) {\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) => icon.name === baseIcon.name,\n (icon: Icon) => {\n // hover展示背景\n if (icon.attribute.backgroundColor) {\n let iconBack = icon.parent.getChildByName('icon-back') as IRect;\n if (iconBack) {\n iconBack.setAttributes({\n x:\n (icon.attribute.x ?? 0) +\n // (icon.attribute.dx ?? 0) +\n (icon.AABBBounds.width() - icon.backgroundWidth) / 2,\n y: (icon.attribute.y ?? 0) + (icon.AABBBounds.height() - icon.backgroundHeight) / 2,\n dx: icon.attribute.dx ?? 0,\n dy: icon.attribute.dy ?? 0,\n width: icon.backgroundWidth,\n height: icon.backgroundHeight,\n fill: icon.attribute.backgroundColor,\n cornerRadius: 5,\n visible: true\n });\n } else {\n iconBack = createRect({\n x:\n (icon.attribute.x ?? 0) +\n // (icon.attribute.dx ?? 0) +\n (icon.AABBBounds.width() - icon.backgroundWidth) / 2,\n y: (icon.attribute.y ?? 0) + (icon.AABBBounds.height() - icon.backgroundHeight) / 2,\n dx: icon.attribute.dx ?? 0,\n dy: icon.attribute.dy ?? 0,\n width: icon.backgroundWidth,\n height: icon.backgroundHeight,\n fill: icon.attribute.backgroundColor,\n cornerRadius: 5,\n pickable: false,\n visible: true\n }) as IRect;\n iconBack.name = 'icon-back';\n // cellGroup.appendChild(iconBack);\n }\n icon.parent.insertBefore(iconBack, icon);\n }\n\n // hover更换图片\n if (icon.attribute.hoverImage && icon.attribute.image !== icon.attribute.hoverImage) {\n icon.image = icon.attribute.hoverImage;\n }\n },\n scene\n );\n }\n // hover展示tooltip\n if (baseIcon.tooltip) {\n const { x1: left, x2: right, y1: top, y2: bottom } = baseIcon.globalAABBBounds;\n const tooltipOptions: TooltipOptions = {\n content: baseIcon.tooltip.title,\n referencePosition: {\n rect: {\n left: left,\n right: right,\n top: top,\n bottom: bottom,\n width: baseIcon.globalAABBBounds.width(),\n height: baseIcon.globalAABBBounds.height()\n },\n placement: baseIcon.tooltip.placement\n },\n disappearDelay: baseIcon.tooltip.disappearDelay,\n style: Object.assign({}, scene.table.internalProps.theme?.tooltipStyle, baseIcon.tooltip?.style)\n };\n if (!scene.table.internalProps.tooltipHandler.isBinded(tooltipOptions)) {\n scene.table.showTooltip(col, row, tooltipOptions);\n }\n }\n}\n\n/**\n * @description: 将指定icon mark设置为Normal样式\n * @param {Icon} icon\n * @param {number} col\n * @param {number} row\n * @return {*}\n */\nexport function setIconNormalStyle(baseIcon: Icon, col: number, row: number, scene: Scenegraph) {\n if (baseIcon.attribute.backgroundColor || baseIcon.attribute.hoverImage) {\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) => icon.name === baseIcon.name,\n (icon: Icon) => {\n const iconBack = icon.parent.getChildByName('icon-back') as IRect;\n if (iconBack) {\n iconBack.setAttribute('visible', false);\n }\n\n // hover更换图片\n if (icon.attribute.hoverImage && icon.attribute.image !== icon.attribute.originImage) {\n icon.image = icon.attribute.originImage;\n }\n },\n scene\n );\n }\n}\n\nexport function updateIcon(baseIcon: Icon, iconConfig: ColumnIconOption, col: number, row: number, scene: Scenegraph) {\n // 直接更新mark attribute\n // dealWithIcon(iconConfig, icon);\n // icon.name = iconConfig.name;\n // scene.updateNextFrame();\n const iconName = baseIcon.name;\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) => icon.name === iconName,\n // dealer\n (icon: Icon) => {\n dealWithIcon(iconConfig, icon);\n icon.name = iconConfig.name;\n },\n scene\n );\n\n scene.updateNextFrame();\n}\n\nfunction resetSortIcon(oldSortCol: number, oldSortRow: number, iconConfig: ColumnIconOption, scene: Scenegraph) {\n const oldSortCell = scene.getCell(oldSortCol, oldSortRow);\n if (\n isValid(oldSortCell.mergeStartCol) &&\n isValid(oldSortCell.mergeStartRow) &&\n isValid(oldSortCell.mergeEndCol) &&\n isValid(oldSortCell.mergeEndRow)\n ) {\n for (let col = oldSortCell.mergeStartCol; col <= oldSortCell.mergeEndCol; col++) {\n for (let row = oldSortCell.mergeStartRow; row <= oldSortCell.mergeEndRow; row++) {\n let oldIconMark: Icon;\n scene.getCell(col, row).forEachChildren((mark: Icon) => {\n if (mark.attribute.funcType === 'sort') {\n oldIconMark = mark;\n return true;\n }\n return false;\n });\n if (oldIconMark) {\n dealWithIcon(iconConfig, oldIconMark);\n oldIconMark.name = iconConfig.name;\n }\n }\n }\n } else {\n let oldIconMark: Icon;\n oldSortCell.forEachChildren((mark: Icon) => {\n if (mark.attribute.funcType === 'sort') {\n oldIconMark = mark;\n return true;\n }\n return false;\n });\n if (oldIconMark) {\n // updateIcon(oldIconMark, oldIcon);\n dealWithIcon(iconConfig, oldIconMark);\n oldIconMark.name = iconConfig.name;\n }\n }\n}\n\nfunction checkSameCell(col1: number, row1: number, col2: number, row2: number, table: BaseTableAPI) {\n const range1 = table.getCellRange(col1, row1);\n const range2 = table.getCellRange(col2, row2);\n if (\n range1.start.col === range2.start.col &&\n range1.start.row === range2.start.row &&\n range1.end.col === range2.end.col &&\n range1.end.row === range2.end.row\n ) {\n return true;\n }\n return false;\n}\n\nexport function updateSortIcon(\n col: number,\n row: number,\n iconMark: Icon,\n order: SortOrder,\n oldSortCol: number,\n oldSortRow: number,\n oldIconMark: Icon | undefined,\n scene: Scenegraph\n) {\n // 更新icon\n const icon = scene.table.internalProps.headerHelper.getSortIcon(order, scene.table, col, row);\n if (iconMark) {\n updateIcon(iconMark, icon, col, row, scene);\n }\n\n // 更新旧frozen icon\n if (!checkSameCell(col, row, oldSortCol, oldSortRow, scene.table)) {\n const oldIcon = scene.table.internalProps.headerHelper.getSortIcon('normal', scene.table, oldSortCol, oldSortRow);\n if (oldIconMark) {\n updateIcon(oldIconMark, oldIcon, oldSortCol, oldSortRow, scene);\n } else {\n resetSortIcon(oldSortCol, oldSortRow, oldIcon, scene);\n }\n }\n}\n\nexport function updateFrozenIcon(scene: Scenegraph) {\n // 依据新旧冻结列确定更新范围\n for (let col = 0; col < scene.table.colCount; col++) {\n for (let row = 0; row < scene.table.columnHeaderLevelCount; row++) {\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) => icon.attribute.funcType === 'frozen',\n // dealer\n (icon: Icon) => {\n const iconConfig = scene.table.internalProps.headerHelper.getFrozenIcon(col, row);\n dealWithIcon(iconConfig, icon);\n icon.name = iconConfig.name;\n },\n scene\n );\n }\n }\n}\n\nexport function updateHierarchyIcon(col: number, row: number, scene: Scenegraph) {\n let iconConfig: SvgIcon;\n if (scene.table.isHeader(col, row)) {\n iconConfig = scene.table.internalProps.headerHelper.getHierarchyIcon(col, row);\n } else {\n iconConfig = scene.table.internalProps.bodyHelper.getHierarchyIcon(col, row);\n }\n\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) =>\n icon.attribute.funcType === IconFuncTypeEnum.collapse || icon.attribute.funcType === IconFuncTypeEnum.expand,\n // dealer\n (icon: Icon) => {\n dealWithIcon(iconConfig, icon);\n icon.name = iconConfig.name;\n },\n scene\n );\n}\n\nexport function updateCellGroupIcon(cellGroup: Group, filter: (icon: Icon) => boolean, dealer: (icon: Icon) => void) {\n cellGroup.forEachChildren((child: any) => {\n if (child.type === 'group') {\n updateCellGroupIcon(child, filter, dealer);\n } else if (filter(child)) {\n dealer(child);\n }\n });\n}\n\nexport function updateCellRangeIcon(\n col: number,\n row: number,\n filter: (icon: Icon) => boolean,\n dealer: (icon: Icon) => void,\n scene: Scenegraph\n) {\n const cellGroup = scene.getCell(col, row);\n if (\n cellGroup.role === 'cell' &&\n isValid(cellGroup.mergeStartCol) &&\n isValid(cellGroup.mergeStartRow) &&\n isValid(cellGroup.mergeEndCol) &&\n isValid(cellGroup.mergeEndRow)\n ) {\n const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, scene);\n for (let col = colStart; col <= colEnd; col++) {\n for (let row = rowStart; row <= rowEnd; row++) {\n updateCellGroupIcon(scene.highPerformanceGetCell(col, row), filter, dealer);\n }\n }\n } else {\n updateCellGroupIcon(cellGroup, filter, dealer);\n }\n}\n\nexport function residentHoverIcon(col: number, row: number, scene: Scenegraph) {\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) => icon.attribute.funcType === IconFuncTypeEnum.dropDown,\n // dealer\n (icon: Icon) => {\n (icon as any).oldVisibleTime = icon.attribute.visibleTime;\n icon.setAttribute('visibleTime', 'always');\n icon.setAttribute('opacity', 1);\n },\n scene\n );\n}\n\nexport function resetResidentHoverIcon(col: number, row: number, scene: Scenegraph) {\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) => icon.attribute.funcType === IconFuncTypeEnum.dropDown,\n // dealer\n (icon: Icon) => {\n (icon as any).oldVisibleTime && icon.setAttribute('visibleTime', (icon as any).oldVisibleTime);\n icon.setAttribute('opacity', icon.attribute.visibleTime === 'always' ? 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H,CAAC,IAAU,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,KAAK,gBAAgB,CAAC,QAAQ,EAErE,CAAC,IAAU,EAAE,EAAE;QACZ,IAAY,CAAC,cAAc,IAAI,IAAI,CAAC,YAAY,CAAC,aAAa,EAAG,IAAY,CAAC,cAAc,CAAC,CAAC;QAC/F,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAChF,CAAC,EACD,KAAK,CACN,CAAC;AACJ,CAAC","file":"icon-update.js","sourcesContent":["import { isValid } from '@visactor/vutils';\nimport type { Group } from '../graphic/group';\nimport type { Scenegraph } from '../scenegraph';\nimport type { ColumnIconOption, SortOrder, SvgIcon } from '../../ts-types';\nimport { IconFuncTypeEnum } from '../../ts-types';\nimport type { Icon } from '../graphic/icon';\nimport type { TooltipOptions } from '../../ts-types/tooltip';\nimport type { IRect } from './../../vrender';\nimport { IContainPointMode, createRect } from './../../vrender';\nimport { dealWithIcon } from '../utils/text-icon-layout';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport { getCellMergeRange } from '../../tools/merge-range';\nimport { traverseObject } from '../../tools/util';\n\nexport function hideHoverIcon(col: number, row: number, scene: Scenegraph) {\n if (col === -1 || row === -1) {\n return;\n }\n // const cellGroup = scene.getCell(col, row);\n // hideIcon(scene, cellGroup, 'mouseenter_cell');\n\n // hideIcon\n updateCellRangeIcon(\n col,\n row,\n (icon: Icon) => icon.attribute.visibleTime === 'mouseenter_cell',\n (icon: Icon) => {\n icon.setAttribute('opacity', 0);\n\n const iconBack = icon.parent.getChildByName('icon-back') as IRect;\n if (iconBack) {\n iconBack.setAttribute('visible', false);\n }\n },\n scene\n );\n scene.updateNextFrame();\n}\n\nexport function showHoverIcon(col: number, row: number, scene: Scenegraph) {\n if (col === -1 || row === -1) {\n return;\n }\n // const cellGroup = scene.getCell(col, row);\n // showIcon(scene, cellGroup, 'mouseenter_cell');\n\n // showIcon\n updateCellRangeIcon(\n col,\n row,\n (icon: Icon) => icon.attribute.visibleTime === 'mouseenter_cell',\n (icon: Icon) => {\n icon.setAttribute('opacity', 1);\n },\n scene\n );\n scene.updateNextFrame();\n}\n\nexport function hideClickIcon(col: number, row: number, scene: Scenegraph) {\n if (col === -1 || row === -1) {\n return;\n }\n // const cellGroup = scene.getCell(col, row);\n // hideIcon(scene, cellGroup, 'click_cell');\n\n // hideIcon\n updateCellRangeIcon(\n col,\n row,\n (icon: Icon) => icon.attribute.visibleTime === 'click_cell',\n (icon: Icon) => {\n icon.setAttribute('opacity', 0);\n },\n scene\n );\n scene.updateNextFrame();\n}\n\nexport function showClickIcon(col: number, row: number, scene: Scenegraph) {\n if (col === -1 || row === -1) {\n return;\n }\n // const cellGroup = scene.getCell(col, row);\n // showIcon(scene, cellGroup, 'click_cell');\n\n // showIcon\n updateCellRangeIcon(\n col,\n row,\n (icon: Icon) => icon.attribute.visibleTime === 'click_cell',\n (icon: Icon) => {\n icon.setAttribute('opacity', 1);\n },\n scene\n );\n scene.updateNextFrame();\n}\n\n/**\n * @description: 获取指定单元格指定位置的icon mark\n * @param {number} col\n * @param {number} row\n * @param {number} x\n * @param {number} y\n * @return {*}\n */\nexport function getIconByXY(col: number, row: number, x: number, y: number, scene: Scenegraph): Icon | undefined {\n const cellGroup = scene.getCell(col, row);\n let pickMark;\n cellGroup.forEachChildren((mark: Icon) => {\n if (mark.role && mark.role.startsWith('icon') && mark.containsPoint(x, y, IContainPointMode.GLOBAL)) {\n pickMark = mark;\n }\n });\n return pickMark;\n}\n\n/**\n * @description: 将指定icon mark设置为Hover样式\n * @param {Icon} icon\n * @param {number} col\n * @param {number} row\n * @return {*}\n */\nexport function setIconHoverStyle(baseIcon: Icon, col: number, row: number, cellGroup: Group, scene: Scenegraph) {\n if (baseIcon.attribute.backgroundColor || baseIcon.attribute.hoverImage) {\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) => icon.name === baseIcon.name,\n (icon: Icon) => {\n // hover展示背景\n if (icon.attribute.backgroundColor) {\n let iconBack = icon.parent.getChildByName('icon-back') as IRect;\n if (iconBack) {\n iconBack.setAttributes({\n x:\n (icon.attribute.x ?? 0) +\n // (icon.attribute.dx ?? 0) +\n (icon.AABBBounds.width() - icon.backgroundWidth) / 2,\n y: (icon.attribute.y ?? 0) + (icon.AABBBounds.height() - icon.backgroundHeight) / 2,\n dx: icon.attribute.dx ?? 0,\n dy: icon.attribute.dy ?? 0,\n width: icon.backgroundWidth,\n height: icon.backgroundHeight,\n fill: icon.attribute.backgroundColor,\n cornerRadius: 5,\n visible: true\n });\n } else {\n iconBack = createRect({\n x:\n (icon.attribute.x ?? 0) +\n // (icon.attribute.dx ?? 0) +\n (icon.AABBBounds.width() - icon.backgroundWidth) / 2,\n y: (icon.attribute.y ?? 0) + (icon.AABBBounds.height() - icon.backgroundHeight) / 2,\n dx: icon.attribute.dx ?? 0,\n dy: icon.attribute.dy ?? 0,\n width: icon.backgroundWidth,\n height: icon.backgroundHeight,\n fill: icon.attribute.backgroundColor,\n cornerRadius: 5,\n pickable: false,\n visible: true\n }) as IRect;\n iconBack.name = 'icon-back';\n // cellGroup.appendChild(iconBack);\n }\n icon.parent.insertBefore(iconBack, icon);\n }\n\n // hover更换图片\n if (icon.attribute.hoverImage && icon.attribute.image !== icon.attribute.hoverImage) {\n icon.image = icon.attribute.hoverImage;\n }\n },\n scene\n );\n }\n // hover展示tooltip\n if (baseIcon.tooltip) {\n const { x1: left, x2: right, y1: top, y2: bottom } = baseIcon.globalAABBBounds;\n const tooltipOptions: TooltipOptions = {\n content: baseIcon.tooltip.title,\n referencePosition: {\n rect: {\n left: left,\n right: right,\n top: top,\n bottom: bottom,\n width: baseIcon.globalAABBBounds.width(),\n height: baseIcon.globalAABBBounds.height()\n },\n placement: baseIcon.tooltip.placement\n },\n disappearDelay: baseIcon.tooltip.disappearDelay,\n style: Object.assign({}, scene.table.internalProps.theme?.tooltipStyle, baseIcon.tooltip?.style)\n };\n if (!scene.table.internalProps.tooltipHandler.isBinded(tooltipOptions)) {\n scene.table.showTooltip(col, row, tooltipOptions);\n }\n }\n}\n\n/**\n * @description: 将指定icon mark设置为Normal样式\n * @param {Icon} icon\n * @param {number} col\n * @param {number} row\n * @return {*}\n */\nexport function setIconNormalStyle(baseIcon: Icon, col: number, row: number, scene: Scenegraph) {\n if (baseIcon.attribute.backgroundColor || baseIcon.attribute.hoverImage) {\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) => icon.name === baseIcon.name,\n (icon: Icon) => {\n const iconBack = icon.parent.getChildByName('icon-back') as IRect;\n if (iconBack) {\n iconBack.setAttribute('visible', false);\n }\n\n // hover更换图片\n if (icon.attribute.hoverImage && icon.attribute.image !== icon.attribute.originImage) {\n icon.image = icon.attribute.originImage;\n }\n },\n scene\n );\n }\n}\n\nexport function updateIcon(baseIcon: Icon, iconConfig: ColumnIconOption, col: number, row: number, scene: Scenegraph) {\n // 直接更新mark attribute\n // dealWithIcon(iconConfig, icon);\n // icon.name = iconConfig.name;\n // scene.updateNextFrame();\n const iconName = baseIcon.name;\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) => icon.name === iconName,\n // dealer\n (icon: Icon) => {\n dealWithIcon(iconConfig, icon);\n icon.name = iconConfig.name;\n },\n scene\n );\n\n scene.updateNextFrame();\n}\n\nfunction resetSortIcon(oldSortCol: number, oldSortRow: number, iconConfig: ColumnIconOption, scene: Scenegraph) {\n const oldSortCell = scene.getCell(oldSortCol, oldSortRow);\n\n if (\n isValid(oldSortCell.mergeStartCol) &&\n isValid(oldSortCell.mergeStartRow) &&\n isValid(oldSortCell.mergeEndCol) &&\n isValid(oldSortCell.mergeEndRow)\n ) {\n for (let col = oldSortCell.mergeStartCol; col <= oldSortCell.mergeEndCol; col++) {\n for (let row = oldSortCell.mergeStartRow; row <= oldSortCell.mergeEndRow; row++) {\n let oldIconMark: Icon;\n scene.getCell(col, row).forEachChildren((mark: Icon) => {\n if (mark.attribute.funcType === 'sort') {\n oldIconMark = mark;\n return true;\n }\n return false;\n });\n if (oldIconMark) {\n dealWithIcon(iconConfig, oldIconMark);\n oldIconMark.name = iconConfig.name;\n }\n }\n }\n } else {\n let oldIconMark: Icon;\n\n //oldSortCell.forEachChildren((mark: Icon) => {\n traverseObject(oldSortCell, 'children', (mark: Icon) => {\n if (mark.attribute.funcType === 'sort') {\n oldIconMark = mark;\n return true;\n }\n return false;\n });\n\n if (oldIconMark) {\n // updateIcon(oldIconMark, oldIcon);\n dealWithIcon(iconConfig, oldIconMark);\n oldIconMark.name = iconConfig.name;\n }\n }\n}\n\nfunction checkSameCell(col1: number, row1: number, col2: number, row2: number, table: BaseTableAPI) {\n const range1 = table.getCellRange(col1, row1);\n const range2 = table.getCellRange(col2, row2);\n if (\n range1.start.col === range2.start.col &&\n range1.start.row === range2.start.row &&\n range1.end.col === range2.end.col &&\n range1.end.row === range2.end.row\n ) {\n return true;\n }\n return false;\n}\n\nexport function updateSortIcon(options: {\n col: number;\n row: number;\n iconMark: Icon;\n order: SortOrder;\n oldSortCol: number;\n oldSortRow: number;\n oldIconMark: Icon | undefined;\n scene: Scenegraph;\n}) {\n const { col, row, iconMark, order, oldSortCol, oldSortRow, oldIconMark, scene } = options;\n // 更新icon\n const icon = scene.table.internalProps.headerHelper.getSortIcon(order, scene.table, col, row);\n if (iconMark) {\n updateIcon(iconMark, icon, col, row, scene);\n }\n\n // 更新旧frozen icon\n if (!checkSameCell(col, row, oldSortCol, oldSortRow, scene.table)) {\n const oldIcon = scene.table.internalProps.headerHelper.getSortIcon('normal', scene.table, oldSortCol, oldSortRow);\n if (oldIconMark) {\n updateIcon(oldIconMark, oldIcon, oldSortCol, oldSortRow, scene);\n } else {\n resetSortIcon(oldSortCol, oldSortRow, oldIcon, scene);\n }\n }\n}\n\nexport function updateFrozenIcon(scene: Scenegraph) {\n // 依据新旧冻结列确定更新范围\n for (let col = 0; col < scene.table.colCount; col++) {\n for (let row = 0; row < scene.table.columnHeaderLevelCount; row++) {\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) => icon.attribute.funcType === 'frozen',\n // dealer\n (icon: Icon) => {\n const iconConfig = scene.table.internalProps.headerHelper.getFrozenIcon(col, row);\n dealWithIcon(iconConfig, icon);\n icon.name = iconConfig.name;\n },\n scene\n );\n }\n }\n}\n\nexport function updateHierarchyIcon(col: number, row: number, scene: Scenegraph) {\n let iconConfig: SvgIcon;\n if (scene.table.isHeader(col, row)) {\n iconConfig = scene.table.internalProps.headerHelper.getHierarchyIcon(col, row);\n } else {\n iconConfig = scene.table.internalProps.bodyHelper.getHierarchyIcon(col, row);\n }\n\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) =>\n icon.attribute.funcType === IconFuncTypeEnum.collapse || icon.attribute.funcType === IconFuncTypeEnum.expand,\n // dealer\n (icon: Icon) => {\n dealWithIcon(iconConfig, icon);\n icon.name = iconConfig.name;\n },\n scene\n );\n}\n\nexport function updateCellGroupIcon(cellGroup: Group, filter: (icon: Icon) => boolean, dealer: (icon: Icon) => void) {\n cellGroup.forEachChildren((child: any) => {\n if (child.type === 'group') {\n updateCellGroupIcon(child, filter, dealer);\n } else if (filter(child)) {\n dealer(child);\n }\n });\n}\n\nexport function updateCellRangeIcon(\n col: number,\n row: number,\n filter: (icon: Icon) => boolean,\n dealer: (icon: Icon) => void,\n scene: Scenegraph\n) {\n const cellGroup = scene.getCell(col, row);\n if (\n cellGroup.role === 'cell' &&\n isValid(cellGroup.mergeStartCol) &&\n isValid(cellGroup.mergeStartRow) &&\n isValid(cellGroup.mergeEndCol) &&\n isValid(cellGroup.mergeEndRow)\n ) {\n const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, scene);\n for (let col = colStart; col <= colEnd; col++) {\n for (let row = rowStart; row <= rowEnd; row++) {\n updateCellGroupIcon(scene.highPerformanceGetCell(col, row), filter, dealer);\n }\n }\n } else {\n updateCellGroupIcon(cellGroup, filter, dealer);\n }\n}\n\nexport function residentHoverIcon(col: number, row: number, scene: Scenegraph) {\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) => icon.attribute.funcType === IconFuncTypeEnum.dropDown,\n // dealer\n (icon: Icon) => {\n (icon as any).oldVisibleTime = icon.attribute.visibleTime;\n icon.setAttribute('visibleTime', 'always');\n icon.setAttribute('opacity', 1);\n },\n scene\n );\n}\n\nexport function resetResidentHoverIcon(col: number, row: number, scene: Scenegraph) {\n updateCellRangeIcon(\n col,\n row,\n // filter\n (icon: Icon) => icon.attribute.funcType === IconFuncTypeEnum.dropDown,\n // dealer\n (icon: Icon) => {\n (icon as any).oldVisibleTime && icon.setAttribute('visibleTime', (icon as any).oldVisibleTime);\n icon.setAttribute('opacity', icon.attribute.visibleTime === 'always' ? 1 : 0);\n },\n scene\n );\n}\n"]}
|
|
@@ -51,7 +51,7 @@ export function updateCellHeight(scene, cell, col, row, distHeight, detaY, isHea
|
|
|
51
51
|
var _a, _b, _c;
|
|
52
52
|
if (cell.attribute.height === distHeight && !cell.needUpdateHeight) return;
|
|
53
53
|
cell.needUpdateHeight = !1, cell.setAttribute("height", distHeight);
|
|
54
|
-
const
|
|
54
|
+
const isVtableMerge = null === (_a = scene.table.getCellRawRecord(col, row)) || void 0 === _a ? void 0 : _a.vtableMerge, isCustomMerge = !!scene.table.getCustomMerge(col, row), type = isVtableMerge || isCustomMerge ? "text" : scene.table.isHeader(col, row) ? scene.table._getHeaderLayoutMap(col, row).headerType : scene.table.getBodyColumnType(col, row);
|
|
55
55
|
if ("progressbar" === type) {
|
|
56
56
|
const columnDefine = scene.table.getBodyColumnDefine(col, row), style = scene.table._getCellStyle(col, row), value = scene.table.getCellValue(col, row), dataValue = scene.table.getCellOriginValue(col, row), padding = getQuadProps(getProp("padding", style, col, row, scene.table));
|
|
57
57
|
let range;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":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AAC;gBAG1C,eAAe,CAAC,aAAa,GAAG,UAAU,CAAC;gBAE3C,MAAM,EAAE,WAAW,EAAE,GAAG,eAAe,CACrC,eAAe,EACf,UAAU,EACV,WAAW,EACX;oBACE,KAAK,EAAE;wBACL,GAAG,EAAE,SAAS,CAAC,aAAa;wBAC5B,GAAG,EAAE,SAAS,CAAC,aAAa;qBAC7B;oBACD,GAAG,EAAE;wBACH,GAAG,EAAE,SAAS,CAAC,WAAW;wBAC1B,GAAG,EAAE,SAAS,CAAC,WAAW;qBAC3B;iBACF,EACD,KAAK,CACN,CAAC;gBAEF,IAAI,WAAW,EAAE;oBACf,eAAe,CAAC,eAAe,GAAG,IAAI,CAAC;iBACxC;aACF;SACF;KACF;SAAM;QACL,MAAM,KAAK,GAAG,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;QAChE,uBAAuB,CACrB,SAAS,EACT,UAAU,EACV,KAAK,EACL,aAAa,EACb,YAAY,CAAC,KAAK,CAAC,OAAiB,CAAC,EACrC,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,YAAY,CACnB,CAAC;KACH;AACH,CAAC","file":"update-height.js","sourcesContent":["import type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport type { Group } from '../graphic/group';\nimport type { CreateProgressBarCell } from '../group-creater/cell-type/progress-bar-cell';\nimport type { CreateSparkLineCellGroup } from '../group-creater/cell-type/spark-line-cell';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport { getProp } from '../utils/get-prop';\nimport { getQuadProps } from '../utils/padding';\nimport { updateCellContentHeight } from '../utils/text-icon-layout';\nimport type { IProgressbarColumnBodyDefine } from '../../ts-types/list-table/define/progressbar-define';\nimport { CUSTOM_CONTAINER_NAME, CUSTOM_MERGE_CONTAINER_NAME, dealWithCustom } from '../component/custom';\nimport { updateImageCellContentWhileResize } from '../group-creater/cell-type/image-cell';\nimport { getStyleTheme } from '../../core/tableHelper';\nimport { isMergeCellGroup } from '../utils/is-merge-cell-group';\nimport type { BaseTableAPI, HeaderData } from '../../ts-types/base-table';\nimport { resizeCellGroup, getCustomCellMergeCustom } from '../group-creater/cell-helper';\nimport type { IGraphic } from './../../vrender';\nimport { getCellMergeRange } from '../../tools/merge-range';\nimport type { ColumnDefine, ListTableConstructorOptions } from '../../ts-types';\nimport { Factory } from '../../core/factory';\n\nexport function updateRowHeight(scene: Scenegraph, row: number, detaY: number, skipTableHeightMap?: boolean) {\n // 更新table行高存储\n if (!skipTableHeightMap) {\n scene.table._setRowHeight(row, scene.table.getRowHeight(row) + detaY, true);\n }\n\n for (let col = 0; col < scene.table.colCount; col++) {\n const cell = scene.getCell(col, row);\n if (cell.role === 'empty') {\n continue;\n }\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n if (mergeInfo && mergeInfo.start.col !== col) {\n continue;\n }\n const height = cell.attribute.height;\n // cell.setAttribute('height', height);\n // (cell.firstChild as Rect).setAttribute('height', cell.attribute.height);\n updateCellHeightForRow(scene, cell, col, row, height + detaY, detaY, scene.table.isHeader(col, row));\n\n scene.updateCellContentWhileResize(col, row);\n }\n\n let rowStart = 0;\n let rowEnd = 0;\n // 更新header 高度\n if (row < scene.table.frozenRowCount) {\n // scene.colHeaderGroup.setAttribute('height', scene.colHeaderGroup.attribute.height + detaY);\n // scene.rowHeaderGroup.setAttribute('y', scene.rowHeaderGroup.attribute.y + detaY);\n // scene.bodyGroup.setAttribute('y', scene.bodyGroup.attribute.y + detaY);\n\n rowStart = row + 1;\n rowEnd = scene.table.frozenRowCount - 1;\n } else if (row >= scene.table.rowCount - scene.table.bottomFrozenRowCount) {\n rowStart = row + 1;\n rowEnd = scene.table.rowCount - 1;\n } else {\n rowStart = row + 1;\n // rowEnd = scene.table.rowCount - 1;\n rowEnd = Math.min(scene.proxy.rowEnd, scene.table.rowCount - scene.table.bottomFrozenRowCount - 1); //- scene.table.bottomFrozenRowCount;\n }\n\n // 更新以下行位置\n for (let colIndex = 0; colIndex < scene.table.colCount; colIndex++) {\n for (let rowIndex = rowStart; rowIndex <= rowEnd; rowIndex++) {\n const cellGroup = scene.highPerformanceGetCell(colIndex, rowIndex);\n if (cellGroup.role === 'cell') {\n cellGroup.setAttribute('y', cellGroup.attribute.y + detaY);\n }\n }\n }\n}\n\n/**\n * @description: 更新单个单元格高度\n * @return {*}\n */\nexport function updateCellHeightForRow(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n height: number,\n detaY: number,\n isHeader: boolean\n // autoRowHeight: boolean\n) {\n // cell.setAttribute('height', height);\n const cellGroup = cell;\n const distHeight = height;\n\n if (!cellGroup) {\n // 合并单元格非主单元格,不处理\n return;\n }\n\n updateCellHeight(scene, cellGroup, col, row, distHeight, detaY, isHeader);\n}\n\nexport function updateCellHeightForColumn(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n height: number,\n detaY: number,\n isHeader: boolean\n) {\n // cell.setAttribute('height', height);\n const cellGroup = cell;\n updateCellHeight(scene, cellGroup, col, row, height, 0, isHeader);\n}\n\nexport function updateCellHeight(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n distHeight: number,\n detaY: number,\n isHeader: boolean\n) {\n if (cell.attribute.height === distHeight && !cell.needUpdateHeight) {\n return;\n }\n cell.needUpdateHeight = false;\n\n cell.setAttribute('height', distHeight);\n const isvtableMerge = scene.table.getCellRawRecord(col, row)?.vtableMerge;\n // 更新单元格布局\n const type = isvtableMerge\n ? 'text'\n : scene.table.isHeader(col, row)\n ? (scene.table._getHeaderLayoutMap(col, row) as HeaderData).headerType\n : scene.table.getBodyColumnType(col, row);\n if (type === 'progressbar') {\n // 目前先采用重新生成节点的方案\n const columnDefine = scene.table.getBodyColumnDefine(col, row) as IProgressbarColumnBodyDefine;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const value = scene.table.getCellValue(col, row);\n const dataValue = scene.table.getCellOriginValue(col, row);\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n\n // deal with bar\n let range;\n if (columnDefine?.mergeCell) {\n range = scene.table.getCellRange(col, row);\n }\n\n const createProgressBarCell = Factory.getFunction('createProgressBarCell') as CreateProgressBarCell;\n const newBarCell = createProgressBarCell(\n columnDefine,\n style,\n cell.attribute.width,\n // cell.attribute.height,\n value,\n dataValue,\n col,\n row,\n padding,\n scene.table,\n range\n );\n\n const oldBarCell = cell.getChildByName('progress-bar') as Group;\n // cell.replaceChild(newBarCell, oldBarCell);\n cell.insertBefore(newBarCell, oldBarCell);\n cell.removeChild(oldBarCell);\n oldBarCell.removeAllChild();\n oldBarCell.release();\n\n // deal with text\n updateMergeCellContentHeight(\n cell,\n distHeight,\n detaY,\n // scene.table.heightMode === 'autoHeight',\n scene.table.isAutoRowHeight(row),\n true,\n scene.table\n );\n } else if (type === 'sparkline') {\n // 目前先采用重新生成节点的方案\n cell.removeAllChild();\n const headerStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', headerStyle, col, row, scene.table));\n const createSparkLineCellGroup = Factory.getFunction('createSparkLineCellGroup') as CreateSparkLineCellGroup;\n createSparkLineCellGroup(\n cell,\n cell.parent,\n cell.attribute.x,\n cell.attribute.y,\n col,\n row,\n cell.attribute.width,\n cell.attribute.height,\n padding,\n scene.table,\n getStyleTheme(headerStyle, scene.table, col, row, getProp).theme,\n false\n );\n } else if (type === 'image' || type === 'video') {\n updateImageCellContentWhileResize(cell, col, row, 0, detaY, scene.table);\n } else if (cell.firstChild?.name === 'axis') {\n (cell.firstChild as any)?.originAxis.resize(cell.attribute.width, cell.attribute.height);\n } else {\n let renderDefault = true;\n const customContainer =\n (cell.getChildByName(CUSTOM_CONTAINER_NAME) as Group) ||\n (cell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME) as Group);\n if (customContainer) {\n if (scene.table.reactCustomLayout) {\n scene.table.reactCustomLayout.removeCustomCell(col, row);\n }\n\n let customElementsGroup;\n customContainer.removeAllChild();\n cell.removeChild(customContainer);\n\n const customMergeRange = getCustomCellMergeCustom(col, row, cell, scene.table);\n if (customMergeRange) {\n for (let mergeRow = customMergeRange.start.row; mergeRow <= customMergeRange.end.row; mergeRow++) {\n if (mergeRow === row) {\n continue;\n }\n const mergedCell = scene.getCell(col, mergeRow);\n const customContainer =\n (mergedCell.getChildByName(CUSTOM_CONTAINER_NAME) as Group) ||\n (mergedCell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME) as Group);\n customContainer.removeAllChild();\n mergedCell.removeChild(customContainer);\n getCustomCellMergeCustom(col, mergeRow, mergedCell, scene.table);\n }\n } else {\n let customRender;\n let customLayout;\n const cellLocation = scene.table.getCellLocation(col, row);\n const { vtableMerge } = scene.table.getCellRawRecord(col, row) || {};\n\n if (vtableMerge && (scene.table.options as ListTableConstructorOptions).groupTitleCustomLayout) {\n customLayout = (scene.table.options as ListTableConstructorOptions).groupTitleCustomLayout;\n } else if (cellLocation !== 'body') {\n const define = scene.table.getHeaderDefine(col, row);\n customRender = (define as ColumnDefine)?.headerCustomRender;\n customLayout = (define as ColumnDefine)?.headerCustomLayout;\n } else {\n const define = scene.table.getBodyColumnDefine(col, row);\n customRender = (define as ColumnDefine)?.customRender || scene.table.customRender;\n customLayout = (define as ColumnDefine)?.customLayout;\n }\n\n if ((customRender || customLayout) && isMergeCellGroup(cell)) {\n for (let mergeCol = cell.mergeStartCol; mergeCol <= cell.mergeEndCol; mergeCol++) {\n for (let mergeRow = cell.mergeStartRow; mergeRow <= cell.mergeEndRow; mergeRow++) {\n if (mergeRow !== row) {\n scene.updateCellContent(mergeCol, mergeRow);\n }\n }\n }\n }\n\n if (customLayout || customRender) {\n // const { autoRowHeight } = table.internalProps;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n let width = cell.attribute.width;\n let height = cell.attribute.height;\n if (isMergeCellGroup(cell)) {\n width = scene.table.getColsWidth(cell.mergeStartCol, cell.mergeEndCol);\n height = scene.table.getRowsHeight(cell.mergeStartRow, cell.mergeEndRow);\n }\n const customResult = dealWithCustom(\n customLayout,\n customRender,\n col,\n row,\n width,\n height,\n false,\n // scene.table.heightMode === 'autoHeight',\n scene.table.isAutoRowHeight(row),\n padding,\n isMergeCellGroup(cell)\n ? {\n start: { col: cell.mergeStartCol, row: cell.mergeStartRow },\n end: { col: cell.mergeEndCol, row: cell.mergeEndRow }\n }\n : undefined,\n scene.table\n );\n customElementsGroup = customResult.elementsGroup;\n renderDefault = customResult.renderDefault;\n }\n\n if (cell.childrenCount > 0 && customElementsGroup) {\n cell.insertBefore(customElementsGroup, cell.firstChild);\n } else if (customElementsGroup) {\n cell.appendChild(customElementsGroup);\n }\n }\n }\n // if (renderDefault) {\n // // 处理文字\n // const style = scene.table._getCellStyle(col, row);\n // updateMergeCellContentHeight(\n // cell,\n // distHeight,\n // detaY,\n // // scene.table.internalProps.autoRowHeight,\n // scene.table.heightMode === 'autoHeight',\n // getQuadProps(style.padding as number),\n // style.textAlign,\n // style.textBaseline,\n // scene.table\n // );\n // }\n updateMergeCellContentHeight(\n cell,\n distHeight,\n detaY,\n // scene.table.heightMode === 'autoHeight',\n scene.table.isAutoRowHeight(row),\n renderDefault,\n scene.table\n );\n }\n}\n\nfunction updateMergeCellContentHeight(\n cellGroup: Group,\n distHeight: number,\n detaY: number,\n autoRowHeight: boolean,\n renderDefault: boolean,\n table: BaseTableAPI\n) {\n if (isMergeCellGroup(cellGroup)) {\n distHeight = 0;\n for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {\n distHeight += table.getRowHeight(row);\n }\n const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);\n for (let col = colStart; col <= colEnd; col++) {\n for (let row = rowStart; row <= rowEnd; row++) {\n const singleCellGroup = table.scenegraph.getCell(col, row);\n singleCellGroup.forEachChildren((child: IGraphic) => {\n child.setAttributes({\n dx: 0,\n dy: 0\n });\n });\n\n if (renderDefault) {\n const style = table._getCellStyle(colStart, rowStart);\n updateCellContentHeight(\n singleCellGroup,\n distHeight,\n detaY,\n autoRowHeight,\n getQuadProps(style.padding as number),\n style.textAlign,\n style.textBaseline\n );\n }\n\n const rangeHeight = table.getRowHeight(row);\n const rangeWidth = table.getColWidth(col);\n\n // const { height: contentHeight } = cellGroup.attribute;\n singleCellGroup.contentHeight = distHeight;\n\n const { widthChange } = resizeCellGroup(\n singleCellGroup,\n rangeWidth,\n rangeHeight,\n {\n start: {\n col: cellGroup.mergeStartCol,\n row: cellGroup.mergeStartRow\n },\n end: {\n col: cellGroup.mergeEndCol,\n row: cellGroup.mergeEndRow\n }\n },\n table\n );\n\n if (widthChange) {\n singleCellGroup.needUpdateWidth = true;\n }\n }\n }\n } else {\n const style = table._getCellStyle(cellGroup.col, cellGroup.row);\n updateCellContentHeight(\n cellGroup,\n distHeight,\n detaY,\n autoRowHeight,\n getQuadProps(style.padding as number),\n style.textAlign,\n style.textBaseline\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/scenegraph/layout/update-height.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACzG,OAAO,EAAE,iCAAiC,EAAE,MAAM,uCAAuC,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAEzF,OAAO,EAAE,iBAAiB,E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,GAAG,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;QAChE,uBAAuB,CACrB,SAAS,EACT,UAAU,EACV,KAAK,EACL,aAAa,EACb,YAAY,CAAC,KAAK,CAAC,OAAiB,CAAC,EACrC,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,YAAY,CACnB,CAAC;KACH;AACH,CAAC","file":"update-height.js","sourcesContent":["import type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport type { Group } from '../graphic/group';\nimport type { CreateProgressBarCell } from '../group-creater/cell-type/progress-bar-cell';\nimport type { CreateSparkLineCellGroup } from '../group-creater/cell-type/spark-line-cell';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport { getProp } from '../utils/get-prop';\nimport { getQuadProps } from '../utils/padding';\nimport { updateCellContentHeight } from '../utils/text-icon-layout';\nimport type { IProgressbarColumnBodyDefine } from '../../ts-types/list-table/define/progressbar-define';\nimport { CUSTOM_CONTAINER_NAME, CUSTOM_MERGE_CONTAINER_NAME, dealWithCustom } from '../component/custom';\nimport { updateImageCellContentWhileResize } from '../group-creater/cell-type/image-cell';\nimport { getStyleTheme } from '../../core/tableHelper';\nimport { isMergeCellGroup } from '../utils/is-merge-cell-group';\nimport type { BaseTableAPI, HeaderData } from '../../ts-types/base-table';\nimport { resizeCellGroup, getCustomCellMergeCustom } from '../group-creater/cell-helper';\nimport type { IGraphic } from './../../vrender';\nimport { getCellMergeRange } from '../../tools/merge-range';\nimport type { ColumnDefine, ListTableConstructorOptions } from '../../ts-types';\nimport { Factory } from '../../core/factory';\n\nexport function updateRowHeight(scene: Scenegraph, row: number, detaY: number, skipTableHeightMap?: boolean) {\n // 更新table行高存储\n if (!skipTableHeightMap) {\n scene.table._setRowHeight(row, scene.table.getRowHeight(row) + detaY, true);\n }\n\n for (let col = 0; col < scene.table.colCount; col++) {\n const cell = scene.getCell(col, row);\n if (cell.role === 'empty') {\n continue;\n }\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n if (mergeInfo && mergeInfo.start.col !== col) {\n continue;\n }\n const height = cell.attribute.height;\n // cell.setAttribute('height', height);\n // (cell.firstChild as Rect).setAttribute('height', cell.attribute.height);\n updateCellHeightForRow(scene, cell, col, row, height + detaY, detaY, scene.table.isHeader(col, row));\n\n scene.updateCellContentWhileResize(col, row);\n }\n\n let rowStart = 0;\n let rowEnd = 0;\n // 更新header 高度\n if (row < scene.table.frozenRowCount) {\n // scene.colHeaderGroup.setAttribute('height', scene.colHeaderGroup.attribute.height + detaY);\n // scene.rowHeaderGroup.setAttribute('y', scene.rowHeaderGroup.attribute.y + detaY);\n // scene.bodyGroup.setAttribute('y', scene.bodyGroup.attribute.y + detaY);\n\n rowStart = row + 1;\n rowEnd = scene.table.frozenRowCount - 1;\n } else if (row >= scene.table.rowCount - scene.table.bottomFrozenRowCount) {\n rowStart = row + 1;\n rowEnd = scene.table.rowCount - 1;\n } else {\n rowStart = row + 1;\n // rowEnd = scene.table.rowCount - 1;\n rowEnd = Math.min(scene.proxy.rowEnd, scene.table.rowCount - scene.table.bottomFrozenRowCount - 1); //- scene.table.bottomFrozenRowCount;\n }\n\n // 更新以下行位置\n for (let colIndex = 0; colIndex < scene.table.colCount; colIndex++) {\n for (let rowIndex = rowStart; rowIndex <= rowEnd; rowIndex++) {\n const cellGroup = scene.highPerformanceGetCell(colIndex, rowIndex);\n if (cellGroup.role === 'cell') {\n cellGroup.setAttribute('y', cellGroup.attribute.y + detaY);\n }\n }\n }\n}\n\n/**\n * @description: 更新单个单元格高度\n * @return {*}\n */\nexport function updateCellHeightForRow(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n height: number,\n detaY: number,\n isHeader: boolean\n // autoRowHeight: boolean\n) {\n // cell.setAttribute('height', height);\n const cellGroup = cell;\n const distHeight = height;\n\n if (!cellGroup) {\n // 合并单元格非主单元格,不处理\n return;\n }\n\n updateCellHeight(scene, cellGroup, col, row, distHeight, detaY, isHeader);\n}\n\nexport function updateCellHeightForColumn(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n height: number,\n detaY: number,\n isHeader: boolean\n) {\n // cell.setAttribute('height', height);\n const cellGroup = cell;\n updateCellHeight(scene, cellGroup, col, row, height, 0, isHeader);\n}\n\nexport function updateCellHeight(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n distHeight: number,\n detaY: number,\n isHeader: boolean\n) {\n if (cell.attribute.height === distHeight && !cell.needUpdateHeight) {\n return;\n }\n cell.needUpdateHeight = false;\n\n cell.setAttribute('height', distHeight);\n const isVtableMerge = scene.table.getCellRawRecord(col, row)?.vtableMerge;\n const isCustomMerge = !!scene.table.getCustomMerge(col, row);\n // 更新单元格布局\n const type =\n isVtableMerge || isCustomMerge\n ? 'text'\n : scene.table.isHeader(col, row)\n ? (scene.table._getHeaderLayoutMap(col, row) as HeaderData).headerType\n : scene.table.getBodyColumnType(col, row);\n if (type === 'progressbar') {\n // 目前先采用重新生成节点的方案\n const columnDefine = scene.table.getBodyColumnDefine(col, row) as IProgressbarColumnBodyDefine;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const value = scene.table.getCellValue(col, row);\n const dataValue = scene.table.getCellOriginValue(col, row);\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n\n // deal with bar\n let range;\n if (columnDefine?.mergeCell) {\n range = scene.table.getCellRange(col, row);\n }\n\n const createProgressBarCell = Factory.getFunction('createProgressBarCell') as CreateProgressBarCell;\n const newBarCell = createProgressBarCell(\n columnDefine,\n style,\n cell.attribute.width,\n // cell.attribute.height,\n value,\n dataValue,\n col,\n row,\n padding,\n scene.table,\n range\n );\n\n const oldBarCell = cell.getChildByName('progress-bar') as Group;\n // cell.replaceChild(newBarCell, oldBarCell);\n cell.insertBefore(newBarCell, oldBarCell);\n cell.removeChild(oldBarCell);\n oldBarCell.removeAllChild();\n oldBarCell.release();\n\n // deal with text\n updateMergeCellContentHeight(\n cell,\n distHeight,\n detaY,\n // scene.table.heightMode === 'autoHeight',\n scene.table.isAutoRowHeight(row),\n true,\n scene.table\n );\n } else if (type === 'sparkline') {\n // 目前先采用重新生成节点的方案\n cell.removeAllChild();\n const headerStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', headerStyle, col, row, scene.table));\n const createSparkLineCellGroup = Factory.getFunction('createSparkLineCellGroup') as CreateSparkLineCellGroup;\n createSparkLineCellGroup(\n cell,\n cell.parent,\n cell.attribute.x,\n cell.attribute.y,\n col,\n row,\n cell.attribute.width,\n cell.attribute.height,\n padding,\n scene.table,\n getStyleTheme(headerStyle, scene.table, col, row, getProp).theme,\n false\n );\n } else if (type === 'image' || type === 'video') {\n updateImageCellContentWhileResize(cell, col, row, 0, detaY, scene.table);\n } else if (cell.firstChild?.name === 'axis') {\n (cell.firstChild as any)?.originAxis.resize(cell.attribute.width, cell.attribute.height);\n } else {\n let renderDefault = true;\n const customContainer =\n (cell.getChildByName(CUSTOM_CONTAINER_NAME) as Group) ||\n (cell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME) as Group);\n if (customContainer) {\n if (scene.table.reactCustomLayout) {\n scene.table.reactCustomLayout.removeCustomCell(col, row);\n }\n\n let customElementsGroup;\n customContainer.removeAllChild();\n cell.removeChild(customContainer);\n\n const customMergeRange = getCustomCellMergeCustom(col, row, cell, scene.table);\n if (customMergeRange) {\n for (let mergeRow = customMergeRange.start.row; mergeRow <= customMergeRange.end.row; mergeRow++) {\n if (mergeRow === row) {\n continue;\n }\n const mergedCell = scene.getCell(col, mergeRow);\n const customContainer =\n (mergedCell.getChildByName(CUSTOM_CONTAINER_NAME) as Group) ||\n (mergedCell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME) as Group);\n customContainer.removeAllChild();\n mergedCell.removeChild(customContainer);\n getCustomCellMergeCustom(col, mergeRow, mergedCell, scene.table);\n }\n } else {\n let customRender;\n let customLayout;\n const cellLocation = scene.table.getCellLocation(col, row);\n const { vtableMerge } = scene.table.getCellRawRecord(col, row) || {};\n\n if (vtableMerge && (scene.table.options as ListTableConstructorOptions).groupTitleCustomLayout) {\n customLayout = (scene.table.options as ListTableConstructorOptions).groupTitleCustomLayout;\n } else if (cellLocation !== 'body') {\n const define = scene.table.getHeaderDefine(col, row);\n customRender = (define as ColumnDefine)?.headerCustomRender;\n customLayout = (define as ColumnDefine)?.headerCustomLayout;\n } else {\n const define = scene.table.getBodyColumnDefine(col, row);\n customRender = (define as ColumnDefine)?.customRender || scene.table.customRender;\n customLayout = (define as ColumnDefine)?.customLayout;\n }\n\n if ((customRender || customLayout) && isMergeCellGroup(cell)) {\n for (let mergeCol = cell.mergeStartCol; mergeCol <= cell.mergeEndCol; mergeCol++) {\n for (let mergeRow = cell.mergeStartRow; mergeRow <= cell.mergeEndRow; mergeRow++) {\n if (mergeRow !== row) {\n scene.updateCellContent(mergeCol, mergeRow);\n }\n }\n }\n }\n\n if (customLayout || customRender) {\n // const { autoRowHeight } = table.internalProps;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n let width = cell.attribute.width;\n let height = cell.attribute.height;\n if (isMergeCellGroup(cell)) {\n width = scene.table.getColsWidth(cell.mergeStartCol, cell.mergeEndCol);\n height = scene.table.getRowsHeight(cell.mergeStartRow, cell.mergeEndRow);\n }\n const customResult = dealWithCustom(\n customLayout,\n customRender,\n col,\n row,\n width,\n height,\n false,\n // scene.table.heightMode === 'autoHeight',\n scene.table.isAutoRowHeight(row),\n padding,\n isMergeCellGroup(cell)\n ? {\n start: { col: cell.mergeStartCol, row: cell.mergeStartRow },\n end: { col: cell.mergeEndCol, row: cell.mergeEndRow }\n }\n : undefined,\n scene.table\n );\n customElementsGroup = customResult.elementsGroup;\n renderDefault = customResult.renderDefault;\n }\n\n if (cell.childrenCount > 0 && customElementsGroup) {\n cell.insertBefore(customElementsGroup, cell.firstChild);\n } else if (customElementsGroup) {\n cell.appendChild(customElementsGroup);\n }\n }\n }\n // if (renderDefault) {\n // // 处理文字\n // const style = scene.table._getCellStyle(col, row);\n // updateMergeCellContentHeight(\n // cell,\n // distHeight,\n // detaY,\n // // scene.table.internalProps.autoRowHeight,\n // scene.table.heightMode === 'autoHeight',\n // getQuadProps(style.padding as number),\n // style.textAlign,\n // style.textBaseline,\n // scene.table\n // );\n // }\n updateMergeCellContentHeight(\n cell,\n distHeight,\n detaY,\n // scene.table.heightMode === 'autoHeight',\n scene.table.isAutoRowHeight(row),\n renderDefault,\n scene.table\n );\n }\n}\n\nfunction updateMergeCellContentHeight(\n cellGroup: Group,\n distHeight: number,\n detaY: number,\n autoRowHeight: boolean,\n renderDefault: boolean,\n table: BaseTableAPI\n) {\n if (isMergeCellGroup(cellGroup)) {\n distHeight = 0;\n for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {\n distHeight += table.getRowHeight(row);\n }\n const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);\n for (let col = colStart; col <= colEnd; col++) {\n for (let row = rowStart; row <= rowEnd; row++) {\n const singleCellGroup = table.scenegraph.getCell(col, row);\n singleCellGroup.forEachChildren((child: IGraphic) => {\n child.setAttributes({\n dx: 0,\n dy: 0\n });\n });\n\n if (renderDefault) {\n const style = table._getCellStyle(colStart, rowStart);\n updateCellContentHeight(\n singleCellGroup,\n distHeight,\n detaY,\n autoRowHeight,\n getQuadProps(style.padding as number),\n style.textAlign,\n style.textBaseline\n );\n }\n\n const rangeHeight = table.getRowHeight(row);\n const rangeWidth = table.getColWidth(col);\n\n // const { height: contentHeight } = cellGroup.attribute;\n singleCellGroup.contentHeight = distHeight;\n\n const { widthChange } = resizeCellGroup(\n singleCellGroup,\n rangeWidth,\n rangeHeight,\n {\n start: {\n col: cellGroup.mergeStartCol,\n row: cellGroup.mergeStartRow\n },\n end: {\n col: cellGroup.mergeEndCol,\n row: cellGroup.mergeEndRow\n }\n },\n table\n );\n\n if (widthChange) {\n singleCellGroup.needUpdateWidth = true;\n }\n }\n }\n } else {\n const style = table._getCellStyle(cellGroup.col, cellGroup.row);\n updateCellContentHeight(\n cellGroup,\n distHeight,\n detaY,\n autoRowHeight,\n getQuadProps(style.padding as number),\n style.textAlign,\n style.textBaseline\n );\n }\n}\n"]}
|
|
@@ -109,12 +109,12 @@ function updateColunmWidth(columnGroup, detaX, mode, scene) {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
function updateCellWidth(scene, cell, col, row, oldWidth, distWidth, detaX, isHeader, autoWrapText) {
|
|
112
|
-
var _a, _b, _c, _d, _e, _f;
|
|
112
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
113
113
|
if (cell.attribute.width === distWidth && !cell.needUpdateWidth) return !1;
|
|
114
114
|
cell.needUpdateWidth = !1, cell.setAttribute("width", distWidth);
|
|
115
115
|
const cellGroup = cell;
|
|
116
116
|
if (!cellGroup) return !1;
|
|
117
|
-
const autoRowHeight = scene.table.isAutoRowHeight(row),
|
|
117
|
+
const autoRowHeight = scene.table.isAutoRowHeight(row), isVtableMerge = null === (_a = scene.table.getCellRawRecord(col, row)) || void 0 === _a ? void 0 : _a.vtableMerge, isCustomMerge = !!scene.table.getCustomMerge(col, row), type = isVtableMerge || isCustomMerge ? "text" : scene.table.isHeader(col, row) ? scene.table._getHeaderLayoutMap(col, row).headerType : scene.table.getBodyColumnType(col, row);
|
|
118
118
|
let isHeightChange = !1;
|
|
119
119
|
if ("progressbar" === type) {
|
|
120
120
|
const columnDefine = scene.table.getBodyColumnDefine(col, row), style = scene.table._getCellStyle(col, row), value = scene.table.getCellValue(col, row), dataValue = scene.table.getCellOriginValue(col, row), padding = getQuadProps(getProp("padding", style, col, row, scene.table));
|
|
@@ -132,10 +132,10 @@ function updateCellWidth(scene, cell, col, row, oldWidth, distWidth, detaX, isHe
|
|
|
132
132
|
} else if ("image" === type || "video" === type) updateImageCellContentWhileResize(cellGroup, col, row, detaX, 0, scene.table); else if ("axis" === (null === (_b = cellGroup.firstChild) || void 0 === _b ? void 0 : _b.name)) {
|
|
133
133
|
const axisConfig = scene.table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row), cellStyle = scene.table._getCellStyle(col, row), padding = getQuadProps(getProp("padding", cellStyle, col, row, scene.table));
|
|
134
134
|
if (axisConfig) {
|
|
135
|
-
const axis = new (Factory.getComponent("axis"))(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, padding, scene.table);
|
|
135
|
+
const axis = new (Factory.getComponent("axis"))(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, null !== (_c = axisConfig.__vtablePadding) && void 0 !== _c ? _c : padding, scene.table);
|
|
136
136
|
cellGroup.clear(), cellGroup.appendChild(axis.component), axis.overlap();
|
|
137
137
|
}
|
|
138
|
-
} else if ("axis" === (null === (
|
|
138
|
+
} else if ("axis" === (null === (_d = cell.firstChild) || void 0 === _d ? void 0 : _d.name)) null === (_e = cell.firstChild) || void 0 === _e || _e.originAxis.resize(cell.attribute.width, cell.attribute.height); else {
|
|
139
139
|
let renderDefault = !0;
|
|
140
140
|
const customContainer = cell.getChildByName(CUSTOM_CONTAINER_NAME) || cell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME);
|
|
141
141
|
if (customContainer) {
|
|
@@ -164,7 +164,7 @@ function updateCellWidth(scene, cell, col, row, oldWidth, distWidth, detaX, isHe
|
|
|
164
164
|
let width = cellGroup.attribute.width, height = cellGroup.attribute.height;
|
|
165
165
|
isMergeCellGroup(cellGroup) && (width = scene.table.getColsWidth(cellGroup.mergeStartCol, cellGroup.mergeEndCol),
|
|
166
166
|
height = scene.table.getRowsHeight(cellGroup.mergeStartRow, cellGroup.mergeEndRow));
|
|
167
|
-
const customResult = dealWithCustom(customLayout, customRender, null !== (
|
|
167
|
+
const customResult = dealWithCustom(customLayout, customRender, null !== (_f = cellGroup.mergeStartCol) && void 0 !== _f ? _f : col, null !== (_g = cellGroup.mergeStartRow) && void 0 !== _g ? _g : row, width, height, !1, scene.table.isAutoRowHeight(row), padding, isMergeCellGroup(cellGroup) ? {
|
|
168
168
|
start: {
|
|
169
169
|
col: cellGroup.mergeStartCol,
|
|
170
170
|
row: cellGroup.mergeStartRow
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/layout/update-width.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGvD,OAAO,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEzG,OAAO,EAAE,iCAAiC,EAAE,MAAM,uCAAuC,CAAC;AAG1F,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAEzF,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAW5D,MAAM,UAAU,cAAc,CAAC,KAAiB,EAAE,GAAW,EAAE,KAAa,EAAE,iBAA2B;IACvG,IAAI,CAAC,iBAAiB,EAAE;QACtB,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,KAAK,EAAE,IAA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,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE;QACnD,MAAM,UAAU,GAAG,SAAS,CAAC;QAC7B,MAAM,IAAI,GAAG,KAAK,CAAC,sBAAsB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACpD,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE;YACzB,OAAO;SACR;QAED,sBAAsB,CACpB,KAAK,EACL,IAAI,EACJ,GAAG,EACH,GAAG,EACH,UAAU,EACV,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAClC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAC/B,CAAC;KACH;AACH,CAAC","file":"update-width.js","sourcesContent":["import type { IGraphic } from './../../vrender';\nimport type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport type { ICartesianAxis } from '../../components/axis/axis';\nimport { Factory } from '../../core/factory';\nimport { getStyleTheme } from '../../core/tableHelper';\nimport type { BaseTableAPI, HeaderData } from '../../ts-types/base-table';\nimport type { IProgressbarColumnBodyDefine } from '../../ts-types/list-table/define/progressbar-define';\nimport { CUSTOM_CONTAINER_NAME, CUSTOM_MERGE_CONTAINER_NAME, dealWithCustom } from '../component/custom';\nimport type { Group } from '../graphic/group';\nimport { updateImageCellContentWhileResize } from '../group-creater/cell-type/image-cell';\nimport type { CreateProgressBarCell } from '../group-creater/cell-type/progress-bar-cell';\nimport type { CreateSparkLineCellGroup } from '../group-creater/cell-type/spark-line-cell';\nimport { resizeCellGroup, getCustomCellMergeCustom } from '../group-creater/cell-helper';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport { getProp } from '../utils/get-prop';\nimport { isMergeCellGroup } from '../utils/is-merge-cell-group';\nimport { getQuadProps } from '../utils/padding';\nimport { updateCellContentWidth } from '../utils/text-icon-layout';\nimport { computeRowHeight } from './compute-row-height';\nimport { updateCellHeightForRow } from './update-height';\nimport { getHierarchyOffset } from '../utils/get-hierarchy-offset';\nimport { getCellMergeRange } from '../../tools/merge-range';\nimport type { ColumnDefine, ListTableConstructorOptions } from '../../ts-types';\n// import { updateAutoRowHeight } from './auto-height';\n\n/**\n * @description: 更新指定列列宽,在拖拽调整列宽中使用\n * @param {Scenegraph} scene\n * @param {number} col\n * @param {number} detaX\n * @return {*}\n */\nexport function updateColWidth(scene: Scenegraph, col: number, detaX: number, skipTableWidthMap?: boolean) {\n if (!skipTableWidthMap) {\n scene.table._setColWidth(col, scene.table.getColWidth(col) + detaX, true);\n }\n\n // deal with corner header or column header\n const colOrCornerHeaderColumn = scene.getColGroup(col, true) as Group;\n const rightTopColumn = scene.getColGroupInRightTopCorner(col);\n if (colOrCornerHeaderColumn && !rightTopColumn) {\n updateColunmWidth(colOrCornerHeaderColumn, detaX, 'col-corner', scene);\n }\n // deal with right bottom frozen cells\n if (rightTopColumn) {\n updateColunmWidth(rightTopColumn, detaX, 'right-top', scene);\n }\n\n // deal with row header or body or right frozen cells\n const rowHeaderOrBodyColumn = scene.getColGroup(col) as Group;\n if (rowHeaderOrBodyColumn) {\n updateColunmWidth(rowHeaderOrBodyColumn, detaX, 'row-body', scene);\n }\n\n const leftBottomColumn = scene.getColGroupInLeftBottomCorner(col);\n // deal with left bottom frozen cells\n if (leftBottomColumn) {\n updateColunmWidth(leftBottomColumn, detaX, 'left-bottom', scene);\n }\n // deal with bottom frozen cells\n const bottomColumn = scene.getColGroupInBottom(col);\n if (bottomColumn) {\n updateColunmWidth(bottomColumn, detaX, 'bottom', scene);\n }\n // deal with right bottom frozen cells\n const rightBottomColumn = scene.getColGroupInRightBottomCorner(col);\n if (rightBottomColumn) {\n updateColunmWidth(rightBottomColumn, detaX, 'right-bottom', scene);\n }\n\n // 更新剩余列位置\n if (col < scene.frozenColCount) {\n scene.cornerHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.rowHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n } else {\n scene.colHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.bodyGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n\n if (leftBottomColumn) {\n scene.leftBottomCornerGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n if (bottomColumn) {\n scene.bottomFrozenGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n if (rightBottomColumn) {\n scene.rightBottomCornerGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n\n // scene.table.setColWidth(col, rowHeaderOrBodyColumn.attribute.width, true);\n}\n\nfunction updateColunmWidth(\n columnGroup: Group,\n detaX: number,\n // autoRowHeight: boolean,\n mode: 'col-corner' | 'row-body' | 'bottom' | 'left-bottom' | 'right-top' | 'right-bottom',\n scene: Scenegraph\n) {\n let needRerangeRow = false;\n // const colOrCornerHeaderColumn = scene.getColGroup(col, true) as Group;\n const oldColumnWidth = columnGroup?.attribute.width ?? 0;\n columnGroup?.setAttribute('width', oldColumnWidth + detaX);\n // 更新单元格宽度\n columnGroup?.forEachChildren((cell: Group, index: number) => {\n const isHeightChange = updateCellWidth(\n scene,\n cell,\n cell.col,\n cell.row,\n oldColumnWidth,\n oldColumnWidth + detaX,\n detaX,\n mode === 'row-body' ? cell.col < scene.table.rowHeaderLevelCount : true,\n scene.table.internalProps.autoWrapText\n );\n if (isHeightChange) {\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n resetRowHeight(scene, row);\n }\n } else {\n resetRowHeight(scene, cell.row);\n }\n needRerangeRow = true;\n }\n });\n\n if (needRerangeRow) {\n let newTotalHeight = 0;\n let colGroup;\n let oldContainerHeight;\n let row;\n for (let col = 0; col < scene.table.colCount; col++) {\n // const colGroup = scene.getColGroup(col, true);\n if (mode === 'col-corner') {\n row = 0;\n colGroup = scene.getColGroup(col, true);\n oldContainerHeight = scene.colHeaderGroup.attribute.height ?? 0;\n } else if (mode === 'row-body') {\n row = scene.table.frozenRowCount;\n colGroup = scene.getColGroup(col, false);\n oldContainerHeight = scene.bodyGroup.attribute.height ?? 0;\n } else if (mode === 'bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInBottom(col);\n oldContainerHeight = scene.bottomFrozenGroup.attribute.height ?? 0;\n } else if (mode === 'left-bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInLeftBottomCorner(col);\n oldContainerHeight = scene.leftBottomCornerGroup.attribute.height ?? 0;\n } else if (mode === 'right-top') {\n row = 0;\n colGroup = scene.getColGroupInRightTopCorner(col);\n oldContainerHeight = scene.rightTopCornerGroup.attribute.height ?? 0;\n } else if (mode === 'right-bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInRightBottomCorner(col);\n oldContainerHeight = scene.rightBottomCornerGroup.attribute.height ?? 0;\n }\n if (!colGroup) {\n continue;\n }\n let y = 0;\n colGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row) ?? 0;\n });\n newTotalHeight = y;\n }\n scene.updateContainerHeight(row, newTotalHeight - oldContainerHeight);\n //#region 修改bug:https://github.com/VisActor/VTable/issues/954 添加底部冻结行的三块区域\n for (let col = 0; col < scene.table.frozenColCount; col++) {\n const leftBottomFrozenColumnGroup = scene.getColGroupInLeftBottomCorner(col);\n // reset cell y\n let y = 0;\n leftBottomFrozenColumnGroup?.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row);\n });\n }\n for (let col = scene.table.colCount - scene.table.rightFrozenColCount; col < scene.table.colCount; col++) {\n const rightBottomFrozenColumnGroup = scene.getColGroupInRightBottomCorner(col);\n // reset cell y\n let y = 0;\n rightBottomFrozenColumnGroup?.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row);\n });\n }\n\n for (let col = scene.table.frozenColCount; col < scene.table.colCount - scene.table.rightFrozenColCount; col++) {\n const rightBottomFrozenColumnGroup = scene.getColGroupInBottom(col);\n // reset cell y\n let y = 0;\n rightBottomFrozenColumnGroup?.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row);\n });\n }\n //#endregion\n }\n}\n\n/**\n * @description: 更新单个单元格宽度\n * @return {*}\n */\nfunction updateCellWidth(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n oldWidth: number, // old width, not dist\n distWidth: number, // old width, not dist\n detaX: number,\n isHeader: boolean,\n // autoColWidth: boolean,\n autoWrapText: boolean\n): boolean {\n if (cell.attribute.width === distWidth && !cell.needUpdateWidth) {\n return false;\n }\n cell.needUpdateWidth = false;\n\n cell.setAttribute('width', distWidth);\n // const mergeInfo = getCellMergeInfo(scene.table, col, row);\n // if (mergeInfo && mergeInfo.start.row !== row) {\n // return false;\n // }\n const cellGroup = cell;\n // const distWidth = width + detaX;\n\n if (!cellGroup) {\n // 合并单元格非主单元格,不处理\n return false;\n }\n const autoRowHeight = scene.table.isAutoRowHeight(row);\n const isvtableMerge = scene.table.getCellRawRecord(col, row)?.vtableMerge;\n // 更新单元格布局\n const type = isvtableMerge\n ? 'text'\n : scene.table.isHeader(col, row)\n ? (scene.table._getHeaderLayoutMap(col, row) as HeaderData).headerType\n : scene.table.getBodyColumnType(col, row);\n let isHeightChange = false;\n if (type === 'progressbar') {\n // 目前先采用重新生成节点的方案\n const columnDefine = scene.table.getBodyColumnDefine(col, row) as IProgressbarColumnBodyDefine;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const value = scene.table.getCellValue(col, row);\n const dataValue = scene.table.getCellOriginValue(col, row);\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n\n // deal with bar\n let range;\n if (columnDefine?.mergeCell) {\n range = scene.table.getCellRange(col, row);\n }\n\n const createProgressBarCell = Factory.getFunction('createProgressBarCell') as CreateProgressBarCell;\n const newBarCell = createProgressBarCell(\n columnDefine,\n style,\n cellGroup.attribute.width,\n // cellGroup.attribute.height,\n value,\n dataValue,\n col,\n row,\n padding,\n scene.table,\n range\n );\n\n const oldBarCell = cellGroup.getChildByName('progress-bar') as Group;\n // cell.replaceChild(newBarCell, oldBarCell);\n cellGroup.insertBefore(newBarCell, oldBarCell);\n cellGroup.removeChild(oldBarCell);\n oldBarCell.removeAllChild();\n oldBarCell.release();\n\n // deal width text\n const cellChange = updateMergeCellContentWidth(cellGroup, distWidth, detaX, autoRowHeight, true, scene.table);\n isHeightChange = isHeightChange || cellChange;\n } else if (type === 'sparkline') {\n // 目前先采用重新生成节点的方案\n cellGroup.removeAllChild();\n const headerStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', headerStyle, col, row, scene.table));\n const createSparkLineCellGroup = Factory.getFunction('createSparkLineCellGroup') as CreateSparkLineCellGroup;\n createSparkLineCellGroup(\n cellGroup,\n cellGroup.parent,\n cellGroup.attribute.x,\n cellGroup.attribute.y,\n col,\n row,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n padding,\n scene.table,\n getStyleTheme(headerStyle, scene.table, col, row, getProp).theme,\n false\n );\n } else if (type === 'image' || type === 'video') {\n // // 只更新背景边框\n // const rect = cell.firstChild as Rect;\n // rect.setAttribute('width', cell.attribute.width);\n updateImageCellContentWhileResize(cellGroup, col, row, detaX, 0, scene.table);\n } else if (cellGroup.firstChild?.name === 'axis') {\n // recreate axis component\n const axisConfig = scene.table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);\n const cellStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', cellStyle, col, row, scene.table));\n if (axisConfig) {\n const CartesianAxis: ICartesianAxis = Factory.getComponent('axis');\n const axis = new CartesianAxis(\n axisConfig,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n padding,\n scene.table\n );\n cellGroup.clear();\n cellGroup.appendChild(axis.component);\n axis.overlap();\n }\n } else if (cell.firstChild?.name === 'axis') {\n (cell.firstChild as any)?.originAxis.resize(cell.attribute.width, cell.attribute.height);\n } else {\n let renderDefault = true;\n const customContainer =\n (cell.getChildByName(CUSTOM_CONTAINER_NAME) as Group) ||\n (cell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME) as Group);\n if (customContainer) {\n if (scene.table.reactCustomLayout) {\n scene.table.reactCustomLayout.removeCustomCell(col, row);\n }\n let customElementsGroup;\n customContainer.removeAllChild();\n cell.removeChild(customContainer);\n\n const customMergeRange = getCustomCellMergeCustom(col, row, cell, scene.table);\n if (customMergeRange) {\n for (let mergeCol = customMergeRange.start.col; mergeCol <= customMergeRange.end.col; mergeCol++) {\n if (mergeCol === col) {\n continue;\n }\n const mergedCell = scene.getCell(mergeCol, row);\n const customContainer =\n (mergedCell.getChildByName(CUSTOM_CONTAINER_NAME) as Group) ||\n (mergedCell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME) as Group);\n customContainer.removeAllChild();\n mergedCell.removeChild(customContainer);\n getCustomCellMergeCustom(mergeCol, row, mergedCell, scene.table);\n }\n } else {\n let customRender;\n let customLayout;\n const cellType = scene.table.getCellLocation(col, row);\n const { vtableMerge } = scene.table.getCellRawRecord(col, row) || {};\n\n if (vtableMerge && (scene.table.options as ListTableConstructorOptions).groupTitleCustomLayout) {\n customLayout = (scene.table.options as ListTableConstructorOptions).groupTitleCustomLayout;\n } else if (cellType !== 'body') {\n const define = scene.table.getHeaderDefine(col, row);\n customRender = (define as ColumnDefine)?.headerCustomRender;\n customLayout = (define as ColumnDefine)?.headerCustomLayout;\n } else {\n const define = scene.table.getBodyColumnDefine(col, row);\n customRender = (define as ColumnDefine)?.customRender || scene.table.customRender;\n customLayout = (define as ColumnDefine)?.customLayout;\n }\n\n if ((customRender || customLayout) && isMergeCellGroup(cellGroup)) {\n for (let mergeCol = cellGroup.mergeStartCol; mergeCol <= cellGroup.mergeEndCol; mergeCol++) {\n if (mergeCol !== col) {\n for (let mergeRow = cellGroup.mergeStartRow; mergeRow <= cellGroup.mergeEndRow; mergeRow++) {\n scene.updateCellContent(mergeCol, mergeRow);\n }\n }\n }\n }\n\n if (customLayout || customRender) {\n // const { autoRowHeight } = table.internalProps;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n let width = cellGroup.attribute.width;\n let height = cellGroup.attribute.height;\n if (isMergeCellGroup(cellGroup)) {\n width = scene.table.getColsWidth(cellGroup.mergeStartCol, cellGroup.mergeEndCol);\n height = scene.table.getRowsHeight(cellGroup.mergeStartRow, cellGroup.mergeEndRow);\n }\n const customResult = dealWithCustom(\n customLayout,\n customRender,\n cellGroup.mergeStartCol ?? col,\n cellGroup.mergeStartRow ?? row,\n width,\n height,\n false,\n // scene.table.heightMode === 'autoHeight',\n scene.table.isAutoRowHeight(row),\n padding,\n isMergeCellGroup(cellGroup)\n ? {\n start: { col: cellGroup.mergeStartCol, row: cellGroup.mergeStartRow },\n end: { col: cellGroup.mergeEndCol, row: cellGroup.mergeEndRow }\n }\n : undefined,\n scene.table\n );\n customElementsGroup = customResult.elementsGroup;\n renderDefault = customResult.renderDefault;\n isHeightChange = true;\n }\n\n if (cell.childrenCount > 0 && customElementsGroup) {\n cell.insertBefore(customElementsGroup, cell.firstChild);\n } else if (customElementsGroup) {\n cell.appendChild(customElementsGroup);\n }\n }\n }\n const cellChange = updateMergeCellContentWidth(\n cellGroup,\n distWidth,\n detaX,\n autoRowHeight,\n renderDefault,\n scene.table\n );\n isHeightChange = isHeightChange || cellChange;\n }\n if (!autoWrapText) {\n const style = scene.table._getCellStyle(col, row);\n autoWrapText = style.autoWrapText;\n }\n return autoRowHeight && autoWrapText ? isHeightChange : false;\n}\n\nfunction updateMergeCellContentWidth(\n cellGroup: Group,\n distWidth: number,\n detaX: number,\n autoRowHeight: boolean,\n renderDefault: boolean,\n table: BaseTableAPI\n) {\n if (isMergeCellGroup(cellGroup)) {\n distWidth = 0;\n let isHeightChange = false;\n for (let col = cellGroup.mergeStartCol; col <= cellGroup.mergeEndCol; col++) {\n distWidth += table.getColWidth(col);\n }\n let cellHeight = 0;\n for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {\n cellHeight += table.getRowHeight(row);\n }\n\n const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);\n for (let col = colStart; col <= colEnd; col++) {\n for (let row = rowStart; row <= rowEnd; row++) {\n if (col === cellGroup.col && row !== cellGroup.row) {\n continue;\n }\n const singleCellGroup = table.scenegraph.getCell(col, row);\n singleCellGroup.forEachChildren((child: IGraphic) => {\n child.setAttributes({\n dx: 0,\n dy: 0\n });\n });\n\n let changed = false;\n if (renderDefault) {\n // 处理文字\n // const style = table._getCellStyle(col, row);\n const style = table._getCellStyle(colStart, rowStart);\n const padding = getQuadProps(style.padding as number);\n const textAlign = style.textAlign;\n const textBaseline = style.textBaseline;\n changed = updateCellContentWidth(\n singleCellGroup,\n distWidth,\n cellHeight,\n detaX,\n autoRowHeight,\n padding,\n textAlign,\n textBaseline,\n table.scenegraph\n );\n\n // reset hierarchy offset\n const hierarchyOffset = getHierarchyOffset(singleCellGroup.col, singleCellGroup.row, table);\n if (hierarchyOffset) {\n const text = singleCellGroup.getChildByName('text');\n const icon = singleCellGroup.getChildByName('expand') || singleCellGroup.getChildByName('collapse');\n // icon-left deal with hierarchy offset, no need add to text dx\n if (icon?.role !== 'icon-left' && text) {\n text.setAttribute('dx', hierarchyOffset);\n }\n }\n }\n\n const rangeHeight = table.getRowHeight(row);\n const rangeWidth = table.getColWidth(col);\n\n // const { width: contentWidth } = cellGroup.attribute;\n singleCellGroup.contentWidth = distWidth;\n\n const { heightChange } = resizeCellGroup(\n singleCellGroup,\n rangeWidth,\n rangeHeight,\n {\n start: {\n col: cellGroup.mergeStartCol,\n row: cellGroup.mergeStartRow\n },\n end: {\n col: cellGroup.mergeEndCol,\n row: cellGroup.mergeEndRow\n }\n },\n table\n );\n\n if (heightChange) {\n singleCellGroup.needUpdateHeight = true;\n }\n\n isHeightChange = isHeightChange || changed;\n }\n }\n return isHeightChange;\n }\n\n // 处理文字\n const style = table._getCellStyle(cellGroup.col, cellGroup.row);\n const padding = getQuadProps(style.padding as number);\n const textAlign = style.textAlign;\n const textBaseline = style.textBaseline;\n return updateCellContentWidth(\n cellGroup,\n distWidth,\n table.getRowHeight(cellGroup.row),\n detaX,\n autoRowHeight,\n padding,\n textAlign,\n textBaseline,\n table.scenegraph\n );\n}\n\n/**\n * @description: 重置指定行行高\n * @param {Scenegraph} scene\n * @param {number} row\n * @return {*}\n */\nfunction resetRowHeight(scene: Scenegraph, row: number) {\n // 获取高度\n const maxHeight = Math.round(computeRowHeight(row, 0, scene.table.colCount - 1, scene.table));\n // 更新table行高存储\n scene.table._setRowHeight(row, maxHeight, true);\n\n // 更新高度\n for (let col = 0; col < scene.table.colCount; col++) {\n const distHeight = maxHeight;\n const cell = scene.highPerformanceGetCell(col, row);\n if (cell.role === 'empty') {\n return;\n }\n\n updateCellHeightForRow(\n scene,\n cell,\n col,\n row,\n distHeight,\n distHeight - cell.attribute.height,\n scene.table.isHeader(col, row)\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/scenegraph/lay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K,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE;QACnD,MAAM,UAAU,GAAG,SAAS,CAAC;QAC7B,MAAM,IAAI,GAAG,KAAK,CAAC,sBAAsB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACpD,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE;YACzB,OAAO;SACR;QAED,sBAAsB,CACpB,KAAK,EACL,IAAI,EACJ,GAAG,EACH,GAAG,EACH,UAAU,EACV,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAClC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAC/B,CAAC;KACH;AACH,CAAC","file":"update-width.js","sourcesContent":["import type { IGraphic } from './../../vrender';\nimport type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport type { ICartesianAxis } from '../../components/axis/axis';\nimport { Factory } from '../../core/factory';\nimport { getStyleTheme } from '../../core/tableHelper';\nimport type { BaseTableAPI, HeaderData } from '../../ts-types/base-table';\nimport type { IProgressbarColumnBodyDefine } from '../../ts-types/list-table/define/progressbar-define';\nimport { CUSTOM_CONTAINER_NAME, CUSTOM_MERGE_CONTAINER_NAME, dealWithCustom } from '../component/custom';\nimport type { Group } from '../graphic/group';\nimport { updateImageCellContentWhileResize } from '../group-creater/cell-type/image-cell';\nimport type { CreateProgressBarCell } from '../group-creater/cell-type/progress-bar-cell';\nimport type { CreateSparkLineCellGroup } from '../group-creater/cell-type/spark-line-cell';\nimport { resizeCellGroup, getCustomCellMergeCustom } from '../group-creater/cell-helper';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport { getProp } from '../utils/get-prop';\nimport { isMergeCellGroup } from '../utils/is-merge-cell-group';\nimport { getQuadProps } from '../utils/padding';\nimport { updateCellContentWidth } from '../utils/text-icon-layout';\nimport { computeRowHeight } from './compute-row-height';\nimport { updateCellHeightForRow } from './update-height';\nimport { getHierarchyOffset } from '../utils/get-hierarchy-offset';\nimport { getCellMergeRange } from '../../tools/merge-range';\nimport type { ColumnDefine, ListTableConstructorOptions } from '../../ts-types';\n// import { updateAutoRowHeight } from './auto-height';\n\n/**\n * @description: 更新指定列列宽,在拖拽调整列宽中使用\n * @param {Scenegraph} scene\n * @param {number} col\n * @param {number} detaX\n * @return {*}\n */\nexport function updateColWidth(scene: Scenegraph, col: number, detaX: number, skipTableWidthMap?: boolean) {\n if (!skipTableWidthMap) {\n scene.table._setColWidth(col, scene.table.getColWidth(col) + detaX, true);\n }\n\n // deal with corner header or column header\n const colOrCornerHeaderColumn = scene.getColGroup(col, true) as Group;\n const rightTopColumn = scene.getColGroupInRightTopCorner(col);\n if (colOrCornerHeaderColumn && !rightTopColumn) {\n updateColunmWidth(colOrCornerHeaderColumn, detaX, 'col-corner', scene);\n }\n // deal with right bottom frozen cells\n if (rightTopColumn) {\n updateColunmWidth(rightTopColumn, detaX, 'right-top', scene);\n }\n\n // deal with row header or body or right frozen cells\n const rowHeaderOrBodyColumn = scene.getColGroup(col) as Group;\n if (rowHeaderOrBodyColumn) {\n updateColunmWidth(rowHeaderOrBodyColumn, detaX, 'row-body', scene);\n }\n\n const leftBottomColumn = scene.getColGroupInLeftBottomCorner(col);\n // deal with left bottom frozen cells\n if (leftBottomColumn) {\n updateColunmWidth(leftBottomColumn, detaX, 'left-bottom', scene);\n }\n // deal with bottom frozen cells\n const bottomColumn = scene.getColGroupInBottom(col);\n if (bottomColumn) {\n updateColunmWidth(bottomColumn, detaX, 'bottom', scene);\n }\n // deal with right bottom frozen cells\n const rightBottomColumn = scene.getColGroupInRightBottomCorner(col);\n if (rightBottomColumn) {\n updateColunmWidth(rightBottomColumn, detaX, 'right-bottom', scene);\n }\n\n // 更新剩余列位置\n if (col < scene.frozenColCount) {\n scene.cornerHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.rowHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n } else {\n scene.colHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.bodyGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n\n if (leftBottomColumn) {\n scene.leftBottomCornerGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n if (bottomColumn) {\n scene.bottomFrozenGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n if (rightBottomColumn) {\n scene.rightBottomCornerGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n\n // scene.table.setColWidth(col, rowHeaderOrBodyColumn.attribute.width, true);\n}\n\nfunction updateColunmWidth(\n columnGroup: Group,\n detaX: number,\n // autoRowHeight: boolean,\n mode: 'col-corner' | 'row-body' | 'bottom' | 'left-bottom' | 'right-top' | 'right-bottom',\n scene: Scenegraph\n) {\n let needRerangeRow = false;\n // const colOrCornerHeaderColumn = scene.getColGroup(col, true) as Group;\n const oldColumnWidth = columnGroup?.attribute.width ?? 0;\n columnGroup?.setAttribute('width', oldColumnWidth + detaX);\n // 更新单元格宽度\n columnGroup?.forEachChildren((cell: Group, index: number) => {\n const isHeightChange = updateCellWidth(\n scene,\n cell,\n cell.col,\n cell.row,\n oldColumnWidth,\n oldColumnWidth + detaX,\n detaX,\n mode === 'row-body' ? cell.col < scene.table.rowHeaderLevelCount : true,\n scene.table.internalProps.autoWrapText\n );\n if (isHeightChange) {\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n resetRowHeight(scene, row);\n }\n } else {\n resetRowHeight(scene, cell.row);\n }\n needRerangeRow = true;\n }\n });\n\n if (needRerangeRow) {\n let newTotalHeight = 0;\n let colGroup;\n let oldContainerHeight;\n let row;\n for (let col = 0; col < scene.table.colCount; col++) {\n // const colGroup = scene.getColGroup(col, true);\n if (mode === 'col-corner') {\n row = 0;\n colGroup = scene.getColGroup(col, true);\n oldContainerHeight = scene.colHeaderGroup.attribute.height ?? 0;\n } else if (mode === 'row-body') {\n row = scene.table.frozenRowCount;\n colGroup = scene.getColGroup(col, false);\n oldContainerHeight = scene.bodyGroup.attribute.height ?? 0;\n } else if (mode === 'bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInBottom(col);\n oldContainerHeight = scene.bottomFrozenGroup.attribute.height ?? 0;\n } else if (mode === 'left-bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInLeftBottomCorner(col);\n oldContainerHeight = scene.leftBottomCornerGroup.attribute.height ?? 0;\n } else if (mode === 'right-top') {\n row = 0;\n colGroup = scene.getColGroupInRightTopCorner(col);\n oldContainerHeight = scene.rightTopCornerGroup.attribute.height ?? 0;\n } else if (mode === 'right-bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInRightBottomCorner(col);\n oldContainerHeight = scene.rightBottomCornerGroup.attribute.height ?? 0;\n }\n if (!colGroup) {\n continue;\n }\n let y = 0;\n colGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row) ?? 0;\n });\n newTotalHeight = y;\n }\n scene.updateContainerHeight(row, newTotalHeight - oldContainerHeight);\n //#region 修改bug:https://github.com/VisActor/VTable/issues/954 添加底部冻结行的三块区域\n for (let col = 0; col < scene.table.frozenColCount; col++) {\n const leftBottomFrozenColumnGroup = scene.getColGroupInLeftBottomCorner(col);\n // reset cell y\n let y = 0;\n leftBottomFrozenColumnGroup?.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row);\n });\n }\n for (let col = scene.table.colCount - scene.table.rightFrozenColCount; col < scene.table.colCount; col++) {\n const rightBottomFrozenColumnGroup = scene.getColGroupInRightBottomCorner(col);\n // reset cell y\n let y = 0;\n rightBottomFrozenColumnGroup?.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row);\n });\n }\n\n for (let col = scene.table.frozenColCount; col < scene.table.colCount - scene.table.rightFrozenColCount; col++) {\n const rightBottomFrozenColumnGroup = scene.getColGroupInBottom(col);\n // reset cell y\n let y = 0;\n rightBottomFrozenColumnGroup?.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row);\n });\n }\n //#endregion\n }\n}\n\n/**\n * @description: 更新单个单元格宽度\n * @return {*}\n */\nfunction updateCellWidth(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n oldWidth: number, // old width, not dist\n distWidth: number, // old width, not dist\n detaX: number,\n isHeader: boolean,\n // autoColWidth: boolean,\n autoWrapText: boolean\n): boolean {\n if (cell.attribute.width === distWidth && !cell.needUpdateWidth) {\n return false;\n }\n cell.needUpdateWidth = false;\n\n cell.setAttribute('width', distWidth);\n // const mergeInfo = getCellMergeInfo(scene.table, col, row);\n // if (mergeInfo && mergeInfo.start.row !== row) {\n // return false;\n // }\n const cellGroup = cell;\n // const distWidth = width + detaX;\n\n if (!cellGroup) {\n // 合并单元格非主单元格,不处理\n return false;\n }\n const autoRowHeight = scene.table.isAutoRowHeight(row);\n const isVtableMerge = scene.table.getCellRawRecord(col, row)?.vtableMerge;\n const isCustomMerge = !!scene.table.getCustomMerge(col, row);\n // 更新单元格布局\n const type =\n isVtableMerge || isCustomMerge\n ? 'text'\n : scene.table.isHeader(col, row)\n ? (scene.table._getHeaderLayoutMap(col, row) as HeaderData).headerType\n : scene.table.getBodyColumnType(col, row);\n let isHeightChange = false;\n if (type === 'progressbar') {\n // 目前先采用重新生成节点的方案\n const columnDefine = scene.table.getBodyColumnDefine(col, row) as IProgressbarColumnBodyDefine;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const value = scene.table.getCellValue(col, row);\n const dataValue = scene.table.getCellOriginValue(col, row);\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n\n // deal with bar\n let range;\n if (columnDefine?.mergeCell) {\n range = scene.table.getCellRange(col, row);\n }\n\n const createProgressBarCell = Factory.getFunction('createProgressBarCell') as CreateProgressBarCell;\n const newBarCell = createProgressBarCell(\n columnDefine,\n style,\n cellGroup.attribute.width,\n // cellGroup.attribute.height,\n value,\n dataValue,\n col,\n row,\n padding,\n scene.table,\n range\n );\n\n const oldBarCell = cellGroup.getChildByName('progress-bar') as Group;\n // cell.replaceChild(newBarCell, oldBarCell);\n cellGroup.insertBefore(newBarCell, oldBarCell);\n cellGroup.removeChild(oldBarCell);\n oldBarCell.removeAllChild();\n oldBarCell.release();\n\n // deal width text\n const cellChange = updateMergeCellContentWidth(cellGroup, distWidth, detaX, autoRowHeight, true, scene.table);\n isHeightChange = isHeightChange || cellChange;\n } else if (type === 'sparkline') {\n // 目前先采用重新生成节点的方案\n cellGroup.removeAllChild();\n const headerStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', headerStyle, col, row, scene.table));\n const createSparkLineCellGroup = Factory.getFunction('createSparkLineCellGroup') as CreateSparkLineCellGroup;\n createSparkLineCellGroup(\n cellGroup,\n cellGroup.parent,\n cellGroup.attribute.x,\n cellGroup.attribute.y,\n col,\n row,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n padding,\n scene.table,\n getStyleTheme(headerStyle, scene.table, col, row, getProp).theme,\n false\n );\n } else if (type === 'image' || type === 'video') {\n // // 只更新背景边框\n // const rect = cell.firstChild as Rect;\n // rect.setAttribute('width', cell.attribute.width);\n updateImageCellContentWhileResize(cellGroup, col, row, detaX, 0, scene.table);\n } else if (cellGroup.firstChild?.name === 'axis') {\n // recreate axis component\n const axisConfig = scene.table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);\n const cellStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', cellStyle, col, row, scene.table));\n if (axisConfig) {\n const CartesianAxis: ICartesianAxis = Factory.getComponent('axis');\n const axis = new CartesianAxis(\n axisConfig,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n axisConfig.__vtablePadding ?? padding,\n scene.table\n );\n cellGroup.clear();\n cellGroup.appendChild(axis.component);\n axis.overlap();\n }\n } else if (cell.firstChild?.name === 'axis') {\n (cell.firstChild as any)?.originAxis.resize(cell.attribute.width, cell.attribute.height);\n } else {\n let renderDefault = true;\n const customContainer =\n (cell.getChildByName(CUSTOM_CONTAINER_NAME) as Group) ||\n (cell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME) as Group);\n if (customContainer) {\n if (scene.table.reactCustomLayout) {\n scene.table.reactCustomLayout.removeCustomCell(col, row);\n }\n let customElementsGroup;\n customContainer.removeAllChild();\n cell.removeChild(customContainer);\n\n const customMergeRange = getCustomCellMergeCustom(col, row, cell, scene.table);\n if (customMergeRange) {\n for (let mergeCol = customMergeRange.start.col; mergeCol <= customMergeRange.end.col; mergeCol++) {\n if (mergeCol === col) {\n continue;\n }\n const mergedCell = scene.getCell(mergeCol, row);\n const customContainer =\n (mergedCell.getChildByName(CUSTOM_CONTAINER_NAME) as Group) ||\n (mergedCell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME) as Group);\n customContainer.removeAllChild();\n mergedCell.removeChild(customContainer);\n getCustomCellMergeCustom(mergeCol, row, mergedCell, scene.table);\n }\n } else {\n let customRender;\n let customLayout;\n const cellType = scene.table.getCellLocation(col, row);\n const { vtableMerge } = scene.table.getCellRawRecord(col, row) || {};\n\n if (vtableMerge && (scene.table.options as ListTableConstructorOptions).groupTitleCustomLayout) {\n customLayout = (scene.table.options as ListTableConstructorOptions).groupTitleCustomLayout;\n } else if (cellType !== 'body') {\n const define = scene.table.getHeaderDefine(col, row);\n customRender = (define as ColumnDefine)?.headerCustomRender;\n customLayout = (define as ColumnDefine)?.headerCustomLayout;\n } else {\n const define = scene.table.getBodyColumnDefine(col, row);\n customRender = (define as ColumnDefine)?.customRender || scene.table.customRender;\n customLayout = (define as ColumnDefine)?.customLayout;\n }\n\n if ((customRender || customLayout) && isMergeCellGroup(cellGroup)) {\n for (let mergeCol = cellGroup.mergeStartCol; mergeCol <= cellGroup.mergeEndCol; mergeCol++) {\n if (mergeCol !== col) {\n for (let mergeRow = cellGroup.mergeStartRow; mergeRow <= cellGroup.mergeEndRow; mergeRow++) {\n scene.updateCellContent(mergeCol, mergeRow);\n }\n }\n }\n }\n\n if (customLayout || customRender) {\n // const { autoRowHeight } = table.internalProps;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n let width = cellGroup.attribute.width;\n let height = cellGroup.attribute.height;\n if (isMergeCellGroup(cellGroup)) {\n width = scene.table.getColsWidth(cellGroup.mergeStartCol, cellGroup.mergeEndCol);\n height = scene.table.getRowsHeight(cellGroup.mergeStartRow, cellGroup.mergeEndRow);\n }\n const customResult = dealWithCustom(\n customLayout,\n customRender,\n cellGroup.mergeStartCol ?? col,\n cellGroup.mergeStartRow ?? row,\n width,\n height,\n false,\n // scene.table.heightMode === 'autoHeight',\n scene.table.isAutoRowHeight(row),\n padding,\n isMergeCellGroup(cellGroup)\n ? {\n start: { col: cellGroup.mergeStartCol, row: cellGroup.mergeStartRow },\n end: { col: cellGroup.mergeEndCol, row: cellGroup.mergeEndRow }\n }\n : undefined,\n scene.table\n );\n customElementsGroup = customResult.elementsGroup;\n renderDefault = customResult.renderDefault;\n isHeightChange = true;\n }\n\n if (cell.childrenCount > 0 && customElementsGroup) {\n cell.insertBefore(customElementsGroup, cell.firstChild);\n } else if (customElementsGroup) {\n cell.appendChild(customElementsGroup);\n }\n }\n }\n const cellChange = updateMergeCellContentWidth(\n cellGroup,\n distWidth,\n detaX,\n autoRowHeight,\n renderDefault,\n scene.table\n );\n isHeightChange = isHeightChange || cellChange;\n }\n if (!autoWrapText) {\n const style = scene.table._getCellStyle(col, row);\n autoWrapText = style.autoWrapText;\n }\n return autoRowHeight && autoWrapText ? isHeightChange : false;\n}\n\nfunction updateMergeCellContentWidth(\n cellGroup: Group,\n distWidth: number,\n detaX: number,\n autoRowHeight: boolean,\n renderDefault: boolean,\n table: BaseTableAPI\n) {\n if (isMergeCellGroup(cellGroup)) {\n distWidth = 0;\n let isHeightChange = false;\n for (let col = cellGroup.mergeStartCol; col <= cellGroup.mergeEndCol; col++) {\n distWidth += table.getColWidth(col);\n }\n let cellHeight = 0;\n for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {\n cellHeight += table.getRowHeight(row);\n }\n\n const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);\n for (let col = colStart; col <= colEnd; col++) {\n for (let row = rowStart; row <= rowEnd; row++) {\n if (col === cellGroup.col && row !== cellGroup.row) {\n continue;\n }\n const singleCellGroup = table.scenegraph.getCell(col, row);\n singleCellGroup.forEachChildren((child: IGraphic) => {\n child.setAttributes({\n dx: 0,\n dy: 0\n });\n });\n\n let changed = false;\n if (renderDefault) {\n // 处理文字\n // const style = table._getCellStyle(col, row);\n const style = table._getCellStyle(colStart, rowStart);\n const padding = getQuadProps(style.padding as number);\n const textAlign = style.textAlign;\n const textBaseline = style.textBaseline;\n changed = updateCellContentWidth(\n singleCellGroup,\n distWidth,\n cellHeight,\n detaX,\n autoRowHeight,\n padding,\n textAlign,\n textBaseline,\n table.scenegraph\n );\n\n // reset hierarchy offset\n const hierarchyOffset = getHierarchyOffset(singleCellGroup.col, singleCellGroup.row, table);\n if (hierarchyOffset) {\n const text = singleCellGroup.getChildByName('text');\n const icon = singleCellGroup.getChildByName('expand') || singleCellGroup.getChildByName('collapse');\n // icon-left deal with hierarchy offset, no need add to text dx\n if (icon?.role !== 'icon-left' && text) {\n text.setAttribute('dx', hierarchyOffset);\n }\n }\n }\n\n const rangeHeight = table.getRowHeight(row);\n const rangeWidth = table.getColWidth(col);\n\n // const { width: contentWidth } = cellGroup.attribute;\n singleCellGroup.contentWidth = distWidth;\n\n const { heightChange } = resizeCellGroup(\n singleCellGroup,\n rangeWidth,\n rangeHeight,\n {\n start: {\n col: cellGroup.mergeStartCol,\n row: cellGroup.mergeStartRow\n },\n end: {\n col: cellGroup.mergeEndCol,\n row: cellGroup.mergeEndRow\n }\n },\n table\n );\n\n if (heightChange) {\n singleCellGroup.needUpdateHeight = true;\n }\n\n isHeightChange = isHeightChange || changed;\n }\n }\n return isHeightChange;\n }\n\n // 处理文字\n const style = table._getCellStyle(cellGroup.col, cellGroup.row);\n const padding = getQuadProps(style.padding as number);\n const textAlign = style.textAlign;\n const textBaseline = style.textBaseline;\n return updateCellContentWidth(\n cellGroup,\n distWidth,\n table.getRowHeight(cellGroup.row),\n detaX,\n autoRowHeight,\n padding,\n textAlign,\n textBaseline,\n table.scenegraph\n );\n}\n\n/**\n * @description: 重置指定行行高\n * @param {Scenegraph} scene\n * @param {number} row\n * @return {*}\n */\nfunction resetRowHeight(scene: Scenegraph, row: number) {\n // 获取高度\n const maxHeight = Math.round(computeRowHeight(row, 0, scene.table.colCount - 1, scene.table));\n // 更新table行高存储\n scene.table._setRowHeight(row, maxHeight, true);\n\n // 更新高度\n for (let col = 0; col < scene.table.colCount; col++) {\n const distHeight = maxHeight;\n const cell = scene.highPerformanceGetCell(col, row);\n if (cell.role === 'empty') {\n return;\n }\n\n updateCellHeightForRow(\n scene,\n cell,\n col,\n row,\n distHeight,\n distHeight - cell.attribute.height,\n scene.table.isHeader(col, row)\n );\n }\n}\n"]}
|
|
@@ -146,11 +146,12 @@ export function updateChartState(scenegraph, datum) {
|
|
|
146
146
|
function updateTableAxes(containerGroup, table) {
|
|
147
147
|
containerGroup.forEachChildren((column => {
|
|
148
148
|
"column" === column.role && column.forEachChildren((cell => {
|
|
149
|
+
var _a;
|
|
149
150
|
if ("cell" === cell.role) {
|
|
150
151
|
let isAxisComponent = !1;
|
|
151
152
|
if (cell.forEachChildren((mark => "axis" === mark.name && (isAxisComponent = !0,
|
|
152
153
|
!0))), isAxisComponent) {
|
|
153
|
-
const axisConfig = table.internalProps.layoutMap.getAxisConfigInPivotChart(cell.col, cell.row), cellStyle = table._getCellStyle(cell.col, cell.row), padding = getQuadProps(getProp("padding", cellStyle, cell.col, cell.row, table)), axis = new (Factory.getComponent("axis"))(axisConfig, cell.attribute.width, cell.attribute.height, padding, table);
|
|
154
|
+
const axisConfig = table.internalProps.layoutMap.getAxisConfigInPivotChart(cell.col, cell.row), cellStyle = table._getCellStyle(cell.col, cell.row), padding = getQuadProps(getProp("padding", cellStyle, cell.col, cell.row, table)), axis = new (Factory.getComponent("axis"))(axisConfig, cell.attribute.width, cell.attribute.height, null !== (_a = axisConfig.__vtablePadding) && void 0 !== _a ? _a : padding, table);
|
|
154
155
|
cell.clear(), cell.appendChild(axis.component), axis.overlap();
|
|
155
156
|
}
|
|
156
157
|
}
|