@visactor/vtable 0.9.1-alpha.5 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/cjs/core/BaseTable.js +2 -2
  2. package/cjs/core/BaseTable.js.map +1 -1
  3. package/cjs/index.d.ts +1 -1
  4. package/cjs/index.js +1 -1
  5. package/cjs/index.js.map +1 -1
  6. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +5 -4
  7. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  8. package/cjs/scenegraph/layout/frozen.d.ts +3 -0
  9. package/cjs/scenegraph/layout/frozen.js +66 -0
  10. package/cjs/scenegraph/layout/frozen.js.map +1 -0
  11. package/cjs/scenegraph/layout/update-width.js +1 -1
  12. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  13. package/cjs/scenegraph/refresh-node/update-chart.js +5 -5
  14. package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
  15. package/cjs/scenegraph/scenegraph.js +7 -47
  16. package/cjs/scenegraph/scenegraph.js.map +1 -1
  17. package/cjs/scenegraph/style/frame-border.d.ts +1 -1
  18. package/cjs/scenegraph/style/frame-border.js +3 -3
  19. package/cjs/scenegraph/style/frame-border.js.map +1 -1
  20. package/cjs/scenegraph/utils/text-icon-layout.js +2 -2
  21. package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
  22. package/dist/vtable.es5.js +129 -109
  23. package/dist/vtable.es5.min.js +1 -1
  24. package/dist/vtable.js +129 -109
  25. package/dist/vtable.min.js +2 -2
  26. package/es/core/BaseTable.js +2 -2
  27. package/es/core/BaseTable.js.map +1 -1
  28. package/es/index.d.ts +1 -1
  29. package/es/index.js +1 -1
  30. package/es/index.js.map +1 -1
  31. package/es/scenegraph/group-creater/cell-type/chart-cell.js +5 -4
  32. package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  33. package/es/scenegraph/layout/frozen.d.ts +3 -0
  34. package/es/scenegraph/layout/frozen.js +58 -0
  35. package/es/scenegraph/layout/frozen.js.map +1 -0
  36. package/es/scenegraph/layout/update-width.js +1 -1
  37. package/es/scenegraph/layout/update-width.js.map +1 -1
  38. package/es/scenegraph/refresh-node/update-chart.js +5 -5
  39. package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
  40. package/es/scenegraph/scenegraph.js +8 -46
  41. package/es/scenegraph/scenegraph.js.map +1 -1
  42. package/es/scenegraph/style/frame-border.d.ts +1 -1
  43. package/es/scenegraph/style/frame-border.js +3 -3
  44. package/es/scenegraph/style/frame-border.js.map +1 -1
  45. package/es/scenegraph/utils/text-icon-layout.js +2 -2
  46. package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
  47. package/package.json +4 -3
@@ -1 +1 @@
1
- {"version":3,"sources":["scenegraph/utils/text-icon-layout.ts"],"names":[],"mappings":";;;AAEA,+CAA6C;AAC7C,2CAAmD;AAEnD,6CAAgE;AAChE,4DAAwD;AAExD,0CAAuC;AACvC,0CAA2C;AAE3C,qDAAoD;AACpD,iEAA4D;AAE5D,6CAA4C;AAwB5C,SAAgB,iBAAiB,CAC/B,SAAgB,EAChB,KAAgC,EAChC,OAAe,EACf,OAAyC,EACzC,YAAqB,EACrB,aAAsB,EACtB,YAAqB,EACrB,SAA6B,EAC7B,SAAiB,EACjB,UAAkB,EAClB,SAA0B,EAC1B,YAAgC,EAChC,KAAmB,EACnB,SAAsB;;IAEtB,MAAM,SAAS,GAAuB,EAAE,CAAC;IACzC,MAAM,UAAU,GAAuB,EAAE,CAAC;IAC1C,MAAM,gBAAgB,GAAuB,EAAE,CAAC;IAChD,MAAM,iBAAiB,GAAuB,EAAE,CAAC;IACjD,MAAM,gBAAgB,GAAuB,EAAE,CAAC;IAChD,MAAM,cAAc,GAAuB,EAAE,CAAC;IAC9C,MAAM,iBAAiB,GAAuB,EAAE,CAAC;IACjD,MAAM,kBAAkB,GAAuB,EAAE,CAAC;IAElD,IAAI,YAAoB,CAAC;I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Q,IAAI,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE;YAClF,MAAM,SAAS,GAAG,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;YAE/C,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,SAAS,EAAE;gBAEtD,OAAO,IAAI,CAAC;aACb;iBAAM,IAAI,SAAS,GAAG,SAAS,EAAE;gBAEhC,OAAO,IAAI,CAAC;aACb;SACF;KACF;SAAM;QACL,MAAM,SAAS,GAAG,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAEpD,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,SAAS,EAAE;YAEtD,OAAO,IAAI,CAAC;SACb;aAAM,IAAI,SAAS,GAAG,SAAS,EAAE;YAEhC,OAAO,IAAI,CAAC;SACb;KACF;IAED,OAAO,KAAK,CAAC;AACf,CAAC","file":"text-icon-layout.js","sourcesContent":["/* eslint-disable no-undef */\nimport type { IThemeSpec } from '@visactor/vrender';\nimport { RichText } from '@visactor/vrender';\nimport { convertInternal } from '../../tools/util';\nimport type { ColumnIconOption } from '../../ts-types';\nimport { IconFuncTypeEnum, IconPosition } from '../../ts-types';\nimport { CellContent } from '../component/cell-content';\nimport type { Group } from '../graphic/group';\nimport { Icon } from '../graphic/icon';\nimport { WrapText } from '../graphic/text';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from './get-cell-merge';\nimport { getHierarchyOffset } from './get-hierarchy-offset';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport { isNumber } from '@visactor/vutils';\n\n/**\n * @description: 创建单元格内容\n * cellGroup\n * |-- content\n * |-- leftContentIcons\n * |-- rightContentIcons\n * |-- wrapText / richtext\n * |-- leftIcons\n * |-- rightIcons\n * |-- absoluteIcons\n * @param {ColumnIconOption} icons\n * @param {string} textStr\n * @param {array} padding\n * @param {boolean} autoColWidth\n * @param {boolean} autoRowHeight\n * @param {boolean} autoWrapText\n * @param {number} cellWidth\n * @param {number} cellHeight\n * @param {CanvasTextAlign} textAlign\n * @param {CanvasTextBaseline} textBaseline\n * @return {*}\n */\nexport function createCellContent(\n cellGroup: Group,\n icons: ColumnIconOption[] | null,\n textStr: string,\n padding: [number, number, number, number],\n autoColWidth: boolean,\n autoRowHeight: boolean,\n autoWrapText: boolean,\n lineClamp: number | undefined,\n cellWidth: number,\n cellHeight: number,\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n table: BaseTableAPI,\n cellTheme?: IThemeSpec\n) {\n const leftIcons: ColumnIconOption[] = [];\n const rightIcons: ColumnIconOption[] = [];\n const contentLeftIcons: ColumnIconOption[] = [];\n const contentRightIcons: ColumnIconOption[] = [];\n const inlineFrontIcons: ColumnIconOption[] = [];\n const inlineEndIcons: ColumnIconOption[] = [];\n const absoluteLeftIcons: ColumnIconOption[] = [];\n const absoluteRightIcons: ColumnIconOption[] = [];\n\n let contentWidth: number;\n let contentHeight: number;\n let leftIconWidth = 0;\n let leftIconHeight = 0;\n let rightIconWidth = 0;\n let rightIconHeight = 0;\n let absoluteLeftIconWidth = 0;\n let absoluteRightIconWidth = 0;\n\n if (!Array.isArray(icons) || icons.length === 0) {\n // 没有icon,cellGroup只添加WrapText\n const text = convertInternal(textStr).replace(/\\r?\\n/g, '\\n').replace(/\\r/g, '\\n').split('\\n');\n\n const hierarchyOffset = getHierarchyOffset(cellGroup.col, cellGroup.row, table);\n\n const attribute = {\n text: text.length === 1 && !autoWrapText ? text[0] : text, // 单行(no-autoWrapText)为字符串,多行(autoWrapText)为字符串数组\n maxLineWidth: autoColWidth ? Infinity : cellWidth - (padding[1] + padding[3] + hierarchyOffset),\n // fill: true,\n // textAlign: 'left',\n textBaseline: 'top',\n autoWrapText,\n lineClamp,\n // widthLimit: autoColWidth ? -1 : colWidth - (padding[1] + padding[3]),\n heightLimit: autoRowHeight ? -1 : cellHeight - (padding[0] + padding[2]),\n pickable: false,\n dx: hierarchyOffset\n };\n const wrapText = new WrapText(\n cellTheme && cellTheme.text ? (Object.assign({}, cellTheme.text, attribute) as any) : attribute\n );\n wrapText.name = 'text';\n\n cellGroup.appendChild(wrapText);\n\n contentWidth = wrapText.AABBBounds.width();\n contentHeight = wrapText.AABBBounds.height();\n } else {\n // icon分类\n icons.forEach(icon => {\n switch (icon.positionType) {\n case IconPosition.left:\n leftIcons.push(icon);\n break;\n case IconPosition.right:\n rightIcons.push(icon);\n break;\n case IconPosition.contentLeft:\n contentLeftIcons.push(icon);\n break;\n case IconPosition.contentRight:\n contentRightIcons.push(icon);\n break;\n // case IconPosition.absoluteLeft:\n // absoluteLeftIcons.push(icon);\n // break;\n case IconPosition.absoluteRight:\n absoluteRightIcons.push(icon);\n break;\n case IconPosition.inlineFront:\n inlineFrontIcons.push(icon);\n break;\n case IconPosition.inlineEnd:\n inlineEndIcons.push(icon);\n break;\n }\n });\n\n // 添加非cell icon & absolute icon\n leftIcons.forEach(icon => {\n const iconMark = dealWithIcon(icon, undefined, cellGroup.col, cellGroup.row, table);\n iconMark.role = 'icon-left';\n iconMark.name = icon.name;\n iconMark.setAttribute('x', leftIconWidth + (iconMark.attribute.marginLeft ?? 0));\n leftIconWidth +=\n iconMark.AABBBounds.width() + (iconMark.attribute.marginLeft ?? 0) + (iconMark.attribute.marginRight ?? 0);\n leftIconHeight = Math.max(leftIconHeight, iconMark.AABBBounds.height());\n cellGroup.appendChild(iconMark);\n });\n\n rightIcons.forEach(icon => {\n const iconMark = dealWithIcon(icon, undefined, cellGroup.col, cellGroup.row, table);\n iconMark.role = 'icon-right';\n iconMark.name = icon.name;\n iconMark.setAttribute('x', rightIconWidth + (iconMark.attribute.marginLeft ?? 0));\n rightIconWidth +=\n iconMark.AABBBounds.width() + (iconMark.attribute.marginLeft ?? 0) + (iconMark.attribute.marginRight ?? 0);\n rightIconHeight = Math.max(rightIconHeight, iconMark.AABBBounds.height());\n cellGroup.appendChild(iconMark);\n });\n\n absoluteLeftIcons.forEach(icon => {\n const iconMark = dealWithIcon(icon, undefined, cellGroup.col, cellGroup.row, table);\n iconMark.role = 'icon-absolute-left';\n iconMark.name = icon.name;\n iconMark.setAttribute('x', absoluteLeftIconWidth + (iconMark.attribute.marginLeft ?? 0));\n absoluteLeftIconWidth +=\n iconMark.AABBBounds.width() + (iconMark.attribute.marginLeft ?? 0) + (iconMark.attribute.marginRight ?? 0);\n cellGroup.appendChild(iconMark);\n });\n\n absoluteRightIcons.forEach(icon => {\n const iconMark = dealWithIcon(icon, undefined, cellGroup.col, cellGroup.row, table);\n iconMark.role = 'icon-absolute-right';\n iconMark.name = icon.name;\n iconMark.setAttribute('x', absoluteRightIconWidth + (iconMark.attribute.marginLeft ?? 0));\n absoluteRightIconWidth +=\n iconMark.AABBBounds.width() + (iconMark.attribute.marginLeft ?? 0) + (iconMark.attribute.marginRight ?? 0);\n cellGroup.appendChild(iconMark);\n });\n\n // 添加text & content icon & inline icon\n let textMark;\n // 直接添加richtext / wrapText\n if (inlineFrontIcons.length === 0 && inlineEndIcons.length === 0) {\n const text = convertInternal(textStr).replace(/\\r?\\n/g, '\\n').replace(/\\r/g, '\\n').split('\\n');\n const attribute = {\n text: text.length === 1 && !autoWrapText ? text[0] : text, // 单行(no-autoWrapText)为字符串,多行(autoWrapText)为字符串数组\n maxLineWidth: autoColWidth ? Infinity : cellWidth - (padding[1] + padding[3]) - leftIconWidth - rightIconWidth,\n // fill: true,\n // textAlign: 'left',\n textBaseline: 'top',\n // widthLimit: autoColWidth ? -1 : colWidth - (padding[1] + padding[3]),\n heightLimit: autoRowHeight ? -1 : cellHeight - (padding[0] + padding[2]),\n pickable: false,\n autoWrapText,\n lineClamp\n };\n const wrapText = new WrapText(\n cellTheme && cellTheme.text ? (Object.assign({}, cellTheme.text, attribute) as any) : attribute\n );\n wrapText.name = 'text';\n textMark = wrapText;\n } else {\n const textOption = Object.assign(\n {\n text: textStr?.toString()\n },\n (cellGroup.parent as Group)?.theme?.userTheme?.text || {}\n );\n if (cellTheme && cellTheme.text) {\n Object.assign(textOption, cellTheme.text);\n }\n textOption.textBaseline = 'middle';\n const textConfig = [\n ...inlineFrontIcons.map(icon => dealWithRichTextIcon(icon)),\n textOption,\n ...inlineEndIcons.map(icon => dealWithRichTextIcon(icon))\n ];\n textConfig[0].textAlign = textAlign;\n const text = new RichText({\n width: autoColWidth ? 0 : cellWidth - (padding[1] + padding[3]) - leftIconWidth - rightIconWidth,\n height: autoRowHeight ? 0 : cellHeight - (padding[0] + padding[2]),\n textConfig,\n verticalDirection: autoRowHeight ? 'top' : (textBaseline as any)\n // textAlign: textAlign as any,\n // textBaseline: textBaseline as any,\n });\n text.name = 'text';\n textMark = text;\n text.bindIconEvent();\n }\n\n if (contentLeftIcons.length !== 0 || contentRightIcons.length !== 0) {\n // 创建CellContent处理conten icon;有content icon,cellGroup: CellIcons + cellContent\n\n const cellContent = new CellContent({\n // x: padding[3] + leftIconWidth,\n // y: padding[0],\n x: 0,\n y: 0,\n fill: false,\n stroke: false\n // pickable: false,\n });\n cellContent.name = 'content';\n\n cellContent.setCellContentOption({\n autoWidth: autoColWidth,\n autoHeight: autoRowHeight,\n cellWidth: cellWidth - (padding[1] + padding[3]) - leftIconWidth - rightIconWidth,\n cellHeight: cellHeight - (padding[0] + padding[2]),\n align: textAlign,\n baseline: textBaseline\n });\n\n contentLeftIcons.forEach(icon => {\n const iconMark = dealWithIcon(icon, undefined, cellGroup.col, cellGroup.row, table);\n iconMark.role = 'icon-content-left';\n iconMark.name = icon.name;\n cellContent.addLeftOccupyingIcon(iconMark);\n });\n contentRightIcons.forEach(icon => {\n const iconMark = dealWithIcon(icon, undefined, cellGroup.col, cellGroup.row, table);\n iconMark.role = 'icon-content-right';\n iconMark.name = icon.name;\n cellContent.addRightOccupyingIcon(iconMark);\n });\n cellContent.addContent(textMark);\n\n cellGroup.appendChild(cellContent);\n cellContent.layout();\n\n contentWidth = cellContent.AABBBounds.width();\n contentHeight = cellContent.AABBBounds.height();\n } else {\n // 没有content icon,cellGroup: CellIcons + wrapText/richtext\n // cellGroup.appendChild(textMark);\n if (cellGroup.firstChild) {\n cellGroup.insertBefore(textMark, cellGroup.firstChild);\n } else {\n cellGroup.appendChild(textMark);\n }\n contentWidth = textMark.AABBBounds.width();\n contentHeight = textMark.AABBBounds.height();\n }\n }\n\n // 内容添加后单元格的宽高\n const width = autoColWidth\n ? leftIconWidth + contentWidth + rightIconWidth // + padding[1] + padding[3]\n : cellWidth - (padding[1] + padding[3]);\n const height = autoRowHeight\n ? Math.max(leftIconHeight, contentHeight, rightIconHeight) // + padding[0] + padding[2]\n : cellHeight - (padding[0] + padding[2]);\n\n // 更新各个部分横向位置\n cellGroup.forEachChildren((child: any) => {\n if (child.role === 'icon-left') {\n child.setAttribute('x', child.attribute.x + padding[3]);\n } else if (child.role === 'icon-right') {\n child.setAttribute('x', child.attribute.x + width - rightIconWidth + padding[3]);\n } else if (child.role === 'icon-absolute-right') {\n child.setAttribute('x', child.attribute.x + width - absoluteRightIconWidth + padding[3] + padding[1]);\n } else if (child.name === 'content' || child.name === 'text') {\n if (textAlign === 'center' && child.type !== 'richtext') {\n child.setAttribute('x', padding[3] + leftIconWidth + (width - leftIconWidth - rightIconWidth) / 2);\n } else if (textAlign === 'right' && child.type !== 'richtext') {\n child.setAttribute('x', padding[3] + width - rightIconWidth);\n } else {\n child.setAttribute('x', padding[3] + leftIconWidth);\n }\n }\n });\n\n // 更新各个部分纵向位置\n cellGroup.forEachChildren((child: any) => {\n if (textBaseline === 'middle') {\n child.setAttribute('y', padding[0] + (height - child.AABBBounds.height()) / 2);\n } else if (textBaseline === 'bottom') {\n child.setAttribute('y', padding[0] + height - child.AABBBounds.height());\n } else {\n child.setAttribute('y', padding[0]);\n }\n });\n\n // 更新cell Group宽高\n cellGroup.setAttributes({\n width: width + padding[1] + padding[3],\n height: height + padding[0] + padding[2]\n } as any);\n}\n\n/**\n * @description: icon option生成icon mark\n * @param {ColumnIconOption} icon\n * @return {*}\n */\nexport function dealWithIcon(\n icon: ColumnIconOption,\n mark?: Icon,\n col?: number,\n row?: number,\n table?: BaseTableAPI\n): Icon {\n // positionType在外部处理\n const iconAttribute = {} as any;\n\n // 图片内容\n if (icon.type === 'image') {\n iconAttribute.image = icon.src;\n } else if (icon.type === 'svg' || 'svg' in icon) {\n iconAttribute.image = icon.svg;\n // } else if (icon.type === 'path') {\n // // to do: 暂不支持\n // } else if (icon.type === 'font') {\n // // to do: 暂不支持\n }\n\n // name\n // iconAttribute.name = icon.name;\n iconAttribute.width = icon.width;\n iconAttribute.height = icon.height;\n iconAttribute.visibleTime = icon.visibleTime ?? 'always';\n iconAttribute.funcType = icon.funcType;\n\n let hierarchyOffset = 0;\n if (\n isNumber(col) &&\n isNumber(row) &&\n table &&\n (icon.funcType === IconFuncTypeEnum.collapse || icon.funcType === IconFuncTypeEnum.expand)\n ) {\n // compute hierarchy offset\n hierarchyOffset = getHierarchyOffset(col, row, table);\n }\n\n iconAttribute.marginLeft = (icon.marginLeft ?? 0) + hierarchyOffset;\n iconAttribute.marginRight = icon.marginRight ?? 0;\n\n if (icon.interactive) {\n iconAttribute.pickable = false;\n }\n\n if (icon.hover) {\n iconAttribute.backgroundWidth = icon.hover.width ?? icon.width;\n iconAttribute.backgroundHeight = icon.hover.width ?? icon.width;\n iconAttribute.backgroundColor = icon.hover.bgColor ?? 'rgba(22,44,66,0.2)';\n iconAttribute.hoverImage = icon.hover.image;\n }\n\n if (icon.cursor) {\n iconAttribute.cursor = icon.cursor;\n }\n\n if ('shape' in icon && icon.shape === 'circle') {\n iconAttribute.shape = icon.shape;\n }\n\n if (mark) {\n mark.setAttributes(iconAttribute);\n mark.loadImage(iconAttribute.image);\n return mark;\n }\n // funcType, cursor, tooltip, hover在事件响应阶段处理\n const iconMark = new Icon(iconAttribute);\n iconMark.tooltip = icon.tooltip;\n\n return iconMark;\n}\n\n/**\n * @description: icon option生成richtext icon config\n * @param {ColumnIconOption} icon\n * @return {*}\n */\nfunction dealWithRichTextIcon(icon: ColumnIconOption) {\n // positionType在外部处理\n const config = {} as any;\n\n // 图片内容\n if (icon.type === 'image') {\n config.image = icon.src;\n } else if (icon.type === 'svg' || 'svg' in icon) {\n config.image = icon.svg;\n // } else if (icon.type === 'path') {\n // // to do: 暂不支持\n // } else if (icon.type === 'font') {\n // // to do: 暂不支持\n }\n\n // name\n config.visibleTime = icon.visibleTime ?? 'always';\n config.funcType = icon.funcType;\n config.id = icon.name;\n config.width = icon.width;\n config.height = icon.height;\n\n if (icon.marginRight || icon.marginLeft) {\n config.margin = [0, icon.marginRight ?? 0, 0, icon.marginLeft ?? 0];\n }\n\n if (icon.hover) {\n config.backgroundWidth = icon.hover.width ?? icon.width;\n config.backgroundHeight = icon.hover.height ?? icon.height;\n config.backgroundShowMode = 'hover';\n config.hoverImage = icon.hover.image;\n config.backgroundStroke = false;\n config.backgroundFill = icon.hover.bgColor ?? 'rgba(22,44,66,0.2)';\n }\n\n if (icon.cursor) {\n config.cursor = icon.cursor;\n }\n\n config.tooltip = icon.tooltip;\n\n // funcType, cursor, tooltip在事件响应阶段处理\n return config;\n}\n\n/**\n * @description: 更新单元格内容宽度\n * @param {Group} cellGroup\n * @param {number} distWidth\n * @param {boolean} autoRowHeight\n * @return {*}\n */\nexport function updateCellContentWidth(\n cellGroup: Group,\n distWidth: number,\n detaX: number,\n autoRowHeight: boolean,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n scene: Scenegraph\n): boolean {\n let leftIconWidth = 0;\n let leftIconHeight = 0;\n let rightIconWidth = 0;\n let rightIconHeight = 0;\n // let hasIcon = false;\n cellGroup.forEachChildren((iconMark: Icon) => {\n if (iconMark.role === 'icon-left') {\n leftIconWidth += iconMark.AABBBounds.width();\n leftIconHeight = Math.max(leftIconHeight, iconMark.AABBBounds.height());\n } else if (iconMark.role === 'icon-right') {\n rightIconWidth += iconMark.AABBBounds.width();\n rightIconHeight = Math.max(rightIconHeight, iconMark.AABBBounds.height());\n }\n });\n\n // 记录原始内容高度\n let oldTextHeight;\n const textMark = cellGroup.getChildByName('text');\n const cellContent = cellGroup.getChildByName('content') as CellContent;\n let contentHeight: number;\n if (textMark instanceof WrapText) {\n oldTextHeight = textMark.AABBBounds.height();\n textMark.setAttribute('maxLineWidth', distWidth - leftIconWidth - rightIconHeight - (padding[1] + padding[3]));\n // contentWidth = textMark.AABBBounds.width();\n contentHeight = textMark.AABBBounds.height();\n } else if (textMark instanceof RichText) {\n oldTextHeight = textMark.AABBBounds.height();\n textMark.setAttribute('width', distWidth - leftIconWidth - rightIconHeight - (padding[1] + padding[3]));\n // contentWidth = textMark.AABBBounds.width();\n contentHeight = textMark.AABBBounds.height();\n } else if (cellContent) {\n oldTextHeight = cellContent.AABBBounds.height();\n cellContent.updateWidth(distWidth - leftIconWidth - rightIconHeight - (padding[1] + padding[3]));\n // contentWidth = cellContent.AABBBounds.width();\n contentHeight = cellContent.AABBBounds.height();\n }\n\n const oldCellHeight = Math.max(leftIconHeight, rightIconHeight, oldTextHeight) + padding[0] + padding[2];\n\n // 更新x方向位置\n cellGroup.forEachChildren((child: any) => {\n if (child.role === 'icon-left') {\n // do nothing\n } else if (child.role === 'icon-right') {\n child.setAttribute('x', child.attribute.x + detaX);\n } else if (child.role === 'icon-absolute-right') {\n child.setAttribute('x', child.attribute.x + detaX);\n } else if (child.name === 'content' || child.name === 'text') {\n const contentWidth = child.AABBBounds.width();\n if (textAlign === 'center') {\n child.setAttribute(\n 'x',\n padding[3] + leftIconWidth + (distWidth - (padding[1] + padding[3]) - leftIconWidth - rightIconWidth) / 2\n );\n } else if (textAlign === 'right') {\n child.setAttribute('x', padding[3] + distWidth - (padding[1] + padding[3]) - rightIconWidth);\n } else {\n // left: do nothing\n }\n } else if (child.name === 'mark') {\n child.setAttribute('x', cellGroup.attribute.width);\n }\n });\n\n // 如果autoRowHeight && 高度改变 更新y方向位置\n if (autoRowHeight) {\n let newHeight = Math.max(leftIconHeight, contentHeight, rightIconHeight); // + padding[0] + padding[2]\n\n if (isCellHeightUpdate(scene, cellGroup, newHeight + padding[0] + padding[2], oldCellHeight)) {\n // cellGroup.setAttribute('height', newHeight + padding[0] + padding[2]);\n return true;\n }\n\n newHeight = cellGroup.attribute.height - (padding[0] + padding[2]);\n\n cellGroup.forEachChildren((child: any) => {\n if (child.type === 'rect') {\n return;\n }\n if (child.name === 'mark') {\n child.setAttribute('y', 0);\n } else if (textBaseline === 'middle') {\n child.setAttribute('y', padding[0] + (newHeight - child.AABBBounds.height()) / 2);\n } else if (textBaseline === 'bottom') {\n child.setAttribute('y', padding[0] + newHeight - child.AABBBounds.height());\n } else {\n child.setAttribute('y', padding[0]);\n }\n });\n } else if (textBaseline === 'middle' || textBaseline === 'bottom') {\n cellGroup.forEachChildren((child: any) => {\n if (child.type === 'rect') {\n return;\n }\n if (child.name === 'mark') {\n child.setAttribute('y', 0);\n } else if (textBaseline === 'middle') {\n child.setAttribute('y', (cellGroup.attribute.height - padding[2] + padding[0] - child.AABBBounds.height()) / 2);\n } else if (textBaseline === 'bottom') {\n child.setAttribute('y', cellGroup.attribute.height - child.AABBBounds.height() - padding[2]);\n } else {\n child.setAttribute('y', padding[0]);\n }\n });\n }\n return false;\n}\n\n/**\n * @description: 更新单元格内容宽度\n */\nexport function updateCellContentHeight(\n cellGroup: Group,\n distHeight: number,\n detaY: number,\n autoRowHeight: boolean,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline\n) {\n const newHeight = distHeight - (padding[0] + padding[2]);\n\n const textMark = cellGroup.getChildByName('text');\n\n if (textMark instanceof WrapText && !autoRowHeight) {\n textMark.setAttribute('heightLimit', newHeight);\n } else if (textMark instanceof RichText && !autoRowHeight) {\n textMark.setAttribute('height', newHeight);\n } else if (cellGroup.getChildByName('content')) {\n const cellContent = cellGroup.getChildByName('content') as CellContent;\n cellContent.updateHeight(newHeight);\n }\n\n // 更新y方向位置\n cellGroup.forEachChildren((child: any) => {\n if (child.type === 'rect') {\n // do nothing\n } else if (child.name === 'mark') {\n child.setAttribute('y', 0);\n } else if (textBaseline === 'middle') {\n child.setAttribute('y', padding[0] + (newHeight - child.AABBBounds.height()) / 2);\n } else if (textBaseline === 'bottom') {\n child.setAttribute('y', padding[0] + newHeight - child.AABBBounds.height());\n } else {\n child.setAttribute('y', padding[0]);\n }\n });\n}\n\n/**\n * @description: 自适应行高模式下,判断当前单元格是否需要更新行高\n * @param {Scenegraph} scene\n * @param {Group} cellGroup\n * @param {number} newHeight\n * @param {number} oldHeight\n * @return {*}\n */\nfunction isCellHeightUpdate(scene: Scenegraph, cellGroup: Group, newHeight: number, oldHeight: number): boolean {\n const table = scene.table;\n const mergeInfo = getCellMergeInfo(table, cellGroup.col, cellGroup.row);\n\n // let rowHeight: number = 0;\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n oldHeight = oldHeight / (mergeInfo.end.row - mergeInfo.start.row + 1);\n newHeight = newHeight / (mergeInfo.end.row - mergeInfo.start.row + 1);\n for (let rowIndex = mergeInfo.start.row; rowIndex <= mergeInfo.end.row; rowIndex++) {\n const rowHeight = table.getRowHeight(rowIndex);\n\n if (rowHeight === oldHeight && newHeight !== rowHeight) {\n // 当前行的自适应行高,是由本单元格撑起;如果当前单元格高度发生变化,则更新行高\n return true;\n } else if (newHeight > rowHeight) {\n // 如果当前单元格高度超过目前所在行的行高,则更新行高\n return true;\n }\n }\n } else {\n const rowHeight = table.getRowHeight(cellGroup.row);\n\n if (rowHeight === oldHeight && newHeight !== rowHeight) {\n // 当前行的自适应行高,是由本单元格撑起;如果当前单元格高度发生变化,则更新行高\n return true;\n } else if (newHeight > rowHeight) {\n // 如果当前单元格高度超过目前所在行的行高,则更新行高\n return true;\n }\n }\n\n return false;\n}\n"]}
1
+ {"version":3,"sources":["scenegraph/utils/text-icon-layout.ts"],"names":[],"mappings":";;;AAEA,+CAA6C;AAC7C,2CAAmD;AAEnD,6CAAgE;AAChE,4DAAwD;AAExD,0CAAuC;AACvC,0CA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O,KAAK,CAAC;AACf,CAAC","file":"text-icon-layout.js","sourcesContent":["/* eslint-disable no-undef */\nimport type { IThemeSpec } from '@visactor/vrender';\nimport { RichText } from '@visactor/vrender';\nimport { convertInternal } from '../../tools/util';\nimport type { ColumnIconOption } from '../../ts-types';\nimport { IconFuncTypeEnum, IconPosition } from '../../ts-types';\nimport { CellContent } from '../component/cell-content';\nimport type { Group } from '../graphic/group';\nimport { Icon } from '../graphic/icon';\nimport { WrapText } from '../graphic/text';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from './get-cell-merge';\nimport { getHierarchyOffset } from './get-hierarchy-offset';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport { isNumber } from '@visactor/vutils';\n\n/**\n * @description: 创建单元格内容\n * cellGroup\n * |-- content\n * |-- leftContentIcons\n * |-- rightContentIcons\n * |-- wrapText / richtext\n * |-- leftIcons\n * |-- rightIcons\n * |-- absoluteIcons\n * @param {ColumnIconOption} icons\n * @param {string} textStr\n * @param {array} padding\n * @param {boolean} autoColWidth\n * @param {boolean} autoRowHeight\n * @param {boolean} autoWrapText\n * @param {number} cellWidth\n * @param {number} cellHeight\n * @param {CanvasTextAlign} textAlign\n * @param {CanvasTextBaseline} textBaseline\n * @return {*}\n */\nexport function createCellContent(\n cellGroup: Group,\n icons: ColumnIconOption[] | null,\n textStr: string,\n padding: [number, number, number, number],\n autoColWidth: boolean,\n autoRowHeight: boolean,\n autoWrapText: boolean,\n lineClamp: number | undefined,\n cellWidth: number,\n cellHeight: number,\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n table: BaseTableAPI,\n cellTheme?: IThemeSpec\n) {\n const leftIcons: ColumnIconOption[] = [];\n const rightIcons: ColumnIconOption[] = [];\n const contentLeftIcons: ColumnIconOption[] = [];\n const contentRightIcons: ColumnIconOption[] = [];\n const inlineFrontIcons: ColumnIconOption[] = [];\n const inlineEndIcons: ColumnIconOption[] = [];\n const absoluteLeftIcons: ColumnIconOption[] = [];\n const absoluteRightIcons: ColumnIconOption[] = [];\n\n let contentWidth: number;\n let contentHeight: number;\n let leftIconWidth = 0;\n let leftIconHeight = 0;\n let rightIconWidth = 0;\n let rightIconHeight = 0;\n let absoluteLeftIconWidth = 0;\n let absoluteRightIconWidth = 0;\n\n if (!Array.isArray(icons) || icons.length === 0) {\n // 没有icon,cellGroup只添加WrapText\n const text = convertInternal(textStr).replace(/\\r?\\n/g, '\\n').replace(/\\r/g, '\\n').split('\\n');\n\n const hierarchyOffset = getHierarchyOffset(cellGroup.col, cellGroup.row, table);\n\n const attribute = {\n text: text.length === 1 && !autoWrapText ? text[0] : text, // 单行(no-autoWrapText)为字符串,多行(autoWrapText)为字符串数组\n maxLineWidth: autoColWidth ? Infinity : cellWidth - (padding[1] + padding[3] + hierarchyOffset),\n // fill: true,\n // textAlign: 'left',\n textBaseline: 'top',\n autoWrapText,\n lineClamp,\n // widthLimit: autoColWidth ? -1 : colWidth - (padding[1] + padding[3]),\n heightLimit: autoRowHeight ? -1 : cellHeight - (padding[0] + padding[2]),\n pickable: false,\n dx: hierarchyOffset\n };\n const wrapText = new WrapText(\n cellTheme && cellTheme.text ? (Object.assign({}, cellTheme.text, attribute) as any) : attribute\n );\n wrapText.name = 'text';\n\n cellGroup.appendChild(wrapText);\n\n contentWidth = wrapText.AABBBounds.width();\n contentHeight = wrapText.AABBBounds.height();\n } else {\n // icon分类\n icons.forEach(icon => {\n switch (icon.positionType) {\n case IconPosition.left:\n leftIcons.push(icon);\n break;\n case IconPosition.right:\n rightIcons.push(icon);\n break;\n case IconPosition.contentLeft:\n contentLeftIcons.push(icon);\n break;\n case IconPosition.contentRight:\n contentRightIcons.push(icon);\n break;\n // case IconPosition.absoluteLeft:\n // absoluteLeftIcons.push(icon);\n // break;\n case IconPosition.absoluteRight:\n absoluteRightIcons.push(icon);\n break;\n case IconPosition.inlineFront:\n inlineFrontIcons.push(icon);\n break;\n case IconPosition.inlineEnd:\n inlineEndIcons.push(icon);\n break;\n }\n });\n\n // 添加非cell icon & absolute icon\n leftIcons.forEach(icon => {\n const iconMark = dealWithIcon(icon, undefined, cellGroup.col, cellGroup.row, table);\n iconMark.role = 'icon-left';\n iconMark.name = icon.name;\n iconMark.setAttribute('x', leftIconWidth + (iconMark.attribute.marginLeft ?? 0));\n leftIconWidth +=\n iconMark.AABBBounds.width() + (iconMark.attribute.marginLeft ?? 0) + (iconMark.attribute.marginRight ?? 0);\n leftIconHeight = Math.max(leftIconHeight, iconMark.AABBBounds.height());\n cellGroup.appendChild(iconMark);\n });\n\n rightIcons.forEach(icon => {\n const iconMark = dealWithIcon(icon, undefined, cellGroup.col, cellGroup.row, table);\n iconMark.role = 'icon-right';\n iconMark.name = icon.name;\n iconMark.setAttribute('x', rightIconWidth + (iconMark.attribute.marginLeft ?? 0));\n rightIconWidth +=\n iconMark.AABBBounds.width() + (iconMark.attribute.marginLeft ?? 0) + (iconMark.attribute.marginRight ?? 0);\n rightIconHeight = Math.max(rightIconHeight, iconMark.AABBBounds.height());\n cellGroup.appendChild(iconMark);\n });\n\n absoluteLeftIcons.forEach(icon => {\n const iconMark = dealWithIcon(icon, undefined, cellGroup.col, cellGroup.row, table);\n iconMark.role = 'icon-absolute-left';\n iconMark.name = icon.name;\n iconMark.setAttribute('x', absoluteLeftIconWidth + (iconMark.attribute.marginLeft ?? 0));\n absoluteLeftIconWidth +=\n iconMark.AABBBounds.width() + (iconMark.attribute.marginLeft ?? 0) + (iconMark.attribute.marginRight ?? 0);\n cellGroup.appendChild(iconMark);\n });\n\n absoluteRightIcons.forEach(icon => {\n const iconMark = dealWithIcon(icon, undefined, cellGroup.col, cellGroup.row, table);\n iconMark.role = 'icon-absolute-right';\n iconMark.name = icon.name;\n iconMark.setAttribute('x', absoluteRightIconWidth + (iconMark.attribute.marginLeft ?? 0));\n absoluteRightIconWidth +=\n iconMark.AABBBounds.width() + (iconMark.attribute.marginLeft ?? 0) + (iconMark.attribute.marginRight ?? 0);\n cellGroup.appendChild(iconMark);\n });\n\n // 添加text & content icon & inline icon\n let textMark;\n // 直接添加richtext / wrapText\n if (inlineFrontIcons.length === 0 && inlineEndIcons.length === 0) {\n const text = convertInternal(textStr).replace(/\\r?\\n/g, '\\n').replace(/\\r/g, '\\n').split('\\n');\n const attribute = {\n text: text.length === 1 && !autoWrapText ? text[0] : text, // 单行(no-autoWrapText)为字符串,多行(autoWrapText)为字符串数组\n maxLineWidth: autoColWidth ? Infinity : cellWidth - (padding[1] + padding[3]) - leftIconWidth - rightIconWidth,\n // fill: true,\n // textAlign: 'left',\n textBaseline: 'top',\n // widthLimit: autoColWidth ? -1 : colWidth - (padding[1] + padding[3]),\n heightLimit: autoRowHeight ? -1 : cellHeight - (padding[0] + padding[2]),\n pickable: false,\n autoWrapText,\n lineClamp\n };\n const wrapText = new WrapText(\n cellTheme && cellTheme.text ? (Object.assign({}, cellTheme.text, attribute) as any) : attribute\n );\n wrapText.name = 'text';\n textMark = wrapText;\n } else {\n const textOption = Object.assign(\n {\n text: textStr?.toString()\n },\n (cellGroup.parent as Group)?.theme?.userTheme?.text || {}\n );\n if (cellTheme && cellTheme.text) {\n Object.assign(textOption, cellTheme.text);\n }\n textOption.textBaseline = 'middle';\n const textConfig = [\n ...inlineFrontIcons.map(icon => dealWithRichTextIcon(icon)),\n textOption,\n ...inlineEndIcons.map(icon => dealWithRichTextIcon(icon))\n ];\n textConfig[0].textAlign = textAlign;\n const text = new RichText({\n width: autoColWidth ? 0 : cellWidth - (padding[1] + padding[3]) - leftIconWidth - rightIconWidth,\n height: autoRowHeight ? 0 : cellHeight - (padding[0] + padding[2]),\n textConfig,\n verticalDirection: autoRowHeight ? 'top' : (textBaseline as any)\n // textAlign: textAlign as any,\n // textBaseline: textBaseline as any,\n });\n text.name = 'text';\n textMark = text;\n text.bindIconEvent();\n }\n\n if (contentLeftIcons.length !== 0 || contentRightIcons.length !== 0) {\n // 创建CellContent处理conten icon;有content icon,cellGroup: CellIcons + cellContent\n\n const cellContent = new CellContent({\n // x: padding[3] + leftIconWidth,\n // y: padding[0],\n x: 0,\n y: 0,\n fill: false,\n stroke: false\n // pickable: false,\n });\n cellContent.name = 'content';\n\n cellContent.setCellContentOption({\n autoWidth: autoColWidth,\n autoHeight: autoRowHeight,\n cellWidth: cellWidth - (padding[1] + padding[3]) - leftIconWidth - rightIconWidth,\n cellHeight: cellHeight - (padding[0] + padding[2]),\n align: textAlign,\n baseline: textBaseline\n });\n\n contentLeftIcons.forEach(icon => {\n const iconMark = dealWithIcon(icon, undefined, cellGroup.col, cellGroup.row, table);\n iconMark.role = 'icon-content-left';\n iconMark.name = icon.name;\n cellContent.addLeftOccupyingIcon(iconMark);\n });\n contentRightIcons.forEach(icon => {\n const iconMark = dealWithIcon(icon, undefined, cellGroup.col, cellGroup.row, table);\n iconMark.role = 'icon-content-right';\n iconMark.name = icon.name;\n cellContent.addRightOccupyingIcon(iconMark);\n });\n cellContent.addContent(textMark);\n\n cellGroup.appendChild(cellContent);\n cellContent.layout();\n\n contentWidth = cellContent.AABBBounds.width();\n contentHeight = cellContent.AABBBounds.height();\n } else {\n // 没有content icon,cellGroup: CellIcons + wrapText/richtext\n // cellGroup.appendChild(textMark);\n if (cellGroup.firstChild) {\n cellGroup.insertBefore(textMark, cellGroup.firstChild);\n } else {\n cellGroup.appendChild(textMark);\n }\n contentWidth = textMark.AABBBounds.width();\n contentHeight = textMark.AABBBounds.height();\n }\n }\n\n // 内容添加后单元格的宽高\n const width = autoColWidth\n ? leftIconWidth + contentWidth + rightIconWidth // + padding[1] + padding[3]\n : cellWidth - (padding[1] + padding[3]);\n const height = autoRowHeight\n ? Math.max(leftIconHeight, contentHeight, rightIconHeight) // + padding[0] + padding[2]\n : cellHeight - (padding[0] + padding[2]);\n\n // 更新各个部分横向位置\n cellGroup.forEachChildren((child: any) => {\n if (child.role === 'icon-left') {\n child.setAttribute('x', child.attribute.x + padding[3]);\n } else if (child.role === 'icon-right') {\n child.setAttribute('x', child.attribute.x + width - rightIconWidth + padding[3]);\n } else if (child.role === 'icon-absolute-right') {\n child.setAttribute('x', child.attribute.x + width - absoluteRightIconWidth + padding[3] + padding[1]);\n } else if (child.name === 'content' || child.name === 'text') {\n if (textAlign === 'center' && child.type !== 'richtext') {\n child.setAttribute('x', padding[3] + leftIconWidth + (width - leftIconWidth - rightIconWidth) / 2);\n } else if (textAlign === 'right' && child.type !== 'richtext') {\n child.setAttribute('x', padding[3] + width - rightIconWidth);\n } else {\n child.setAttribute('x', padding[3] + leftIconWidth);\n }\n }\n });\n\n // 更新各个部分纵向位置\n cellGroup.forEachChildren((child: any) => {\n if (textBaseline === 'middle') {\n child.setAttribute('y', padding[0] + (height - child.AABBBounds.height()) / 2);\n } else if (textBaseline === 'bottom') {\n child.setAttribute('y', padding[0] + height - child.AABBBounds.height());\n } else {\n child.setAttribute('y', padding[0]);\n }\n });\n\n // 更新cell Group宽高\n cellGroup.setAttributes({\n width: width + padding[1] + padding[3],\n height: height + padding[0] + padding[2]\n } as any);\n}\n\n/**\n * @description: icon option生成icon mark\n * @param {ColumnIconOption} icon\n * @return {*}\n */\nexport function dealWithIcon(\n icon: ColumnIconOption,\n mark?: Icon,\n col?: number,\n row?: number,\n table?: BaseTableAPI\n): Icon {\n // positionType在外部处理\n const iconAttribute = {} as any;\n\n // 图片内容\n if (icon.type === 'image') {\n iconAttribute.image = icon.src;\n } else if (icon.type === 'svg' || 'svg' in icon) {\n iconAttribute.image = icon.svg;\n // } else if (icon.type === 'path') {\n // // to do: 暂不支持\n // } else if (icon.type === 'font') {\n // // to do: 暂不支持\n }\n\n // name\n // iconAttribute.name = icon.name;\n iconAttribute.width = icon.width;\n iconAttribute.height = icon.height;\n iconAttribute.visibleTime = icon.visibleTime ?? 'always';\n iconAttribute.funcType = icon.funcType;\n\n let hierarchyOffset = 0;\n if (\n isNumber(col) &&\n isNumber(row) &&\n table &&\n (icon.funcType === IconFuncTypeEnum.collapse || icon.funcType === IconFuncTypeEnum.expand)\n ) {\n // compute hierarchy offset\n hierarchyOffset = getHierarchyOffset(col, row, table);\n }\n\n iconAttribute.marginLeft = (icon.marginLeft ?? 0) + hierarchyOffset;\n iconAttribute.marginRight = icon.marginRight ?? 0;\n\n if (icon.interactive) {\n iconAttribute.pickable = false;\n }\n\n if (icon.hover) {\n iconAttribute.backgroundWidth = icon.hover.width ?? icon.width;\n iconAttribute.backgroundHeight = icon.hover.width ?? icon.width;\n iconAttribute.backgroundColor = icon.hover.bgColor ?? 'rgba(22,44,66,0.2)';\n iconAttribute.hoverImage = icon.hover.image;\n }\n\n if (icon.cursor) {\n iconAttribute.cursor = icon.cursor;\n }\n\n if ('shape' in icon && icon.shape === 'circle') {\n iconAttribute.shape = icon.shape;\n }\n\n if (mark) {\n mark.setAttributes(iconAttribute);\n mark.loadImage(iconAttribute.image);\n return mark;\n }\n // funcType, cursor, tooltip, hover在事件响应阶段处理\n const iconMark = new Icon(iconAttribute);\n iconMark.tooltip = icon.tooltip;\n\n return iconMark;\n}\n\n/**\n * @description: icon option生成richtext icon config\n * @param {ColumnIconOption} icon\n * @return {*}\n */\nfunction dealWithRichTextIcon(icon: ColumnIconOption) {\n // positionType在外部处理\n const config = {} as any;\n\n // 图片内容\n if (icon.type === 'image') {\n config.image = icon.src;\n } else if (icon.type === 'svg' || 'svg' in icon) {\n config.image = icon.svg;\n // } else if (icon.type === 'path') {\n // // to do: 暂不支持\n // } else if (icon.type === 'font') {\n // // to do: 暂不支持\n }\n\n // name\n config.visibleTime = icon.visibleTime ?? 'always';\n config.funcType = icon.funcType;\n config.id = icon.name;\n config.width = icon.width;\n config.height = icon.height;\n\n if (icon.marginRight || icon.marginLeft) {\n config.margin = [0, icon.marginRight ?? 0, 0, icon.marginLeft ?? 0];\n }\n\n if (icon.hover) {\n config.backgroundWidth = icon.hover.width ?? icon.width;\n config.backgroundHeight = icon.hover.height ?? icon.height;\n config.backgroundShowMode = 'hover';\n config.hoverImage = icon.hover.image;\n config.backgroundStroke = false;\n config.backgroundFill = icon.hover.bgColor ?? 'rgba(22,44,66,0.2)';\n }\n\n if (icon.cursor) {\n config.cursor = icon.cursor;\n }\n\n config.tooltip = icon.tooltip;\n\n // funcType, cursor, tooltip在事件响应阶段处理\n return config;\n}\n\n/**\n * @description: 更新单元格内容宽度\n * @param {Group} cellGroup\n * @param {number} distWidth\n * @param {boolean} autoRowHeight\n * @return {*}\n */\nexport function updateCellContentWidth(\n cellGroup: Group,\n distWidth: number,\n detaX: number,\n autoRowHeight: boolean,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n scene: Scenegraph\n): boolean {\n let leftIconWidth = 0;\n let leftIconHeight = 0;\n let rightIconWidth = 0;\n let rightIconHeight = 0;\n // let hasIcon = false;\n cellGroup.forEachChildren((iconMark: Icon) => {\n if (iconMark.role === 'icon-left') {\n leftIconWidth += iconMark.AABBBounds.width();\n leftIconHeight = Math.max(leftIconHeight, iconMark.AABBBounds.height());\n } else if (iconMark.role === 'icon-right') {\n rightIconWidth += iconMark.AABBBounds.width();\n rightIconHeight = Math.max(rightIconHeight, iconMark.AABBBounds.height());\n }\n });\n\n // 记录原始内容高度\n let oldTextHeight;\n const textMark = cellGroup.getChildByName('text');\n const cellContent = cellGroup.getChildByName('content') as CellContent;\n let contentHeight: number;\n if (textMark instanceof WrapText) {\n oldTextHeight = textMark.AABBBounds.height();\n textMark.setAttribute('maxLineWidth', distWidth - leftIconWidth - rightIconHeight - (padding[1] + padding[3]));\n // contentWidth = textMark.AABBBounds.width();\n contentHeight = textMark.AABBBounds.height();\n } else if (textMark instanceof RichText) {\n oldTextHeight = textMark.AABBBounds.height();\n textMark.setAttribute('width', distWidth - leftIconWidth - rightIconHeight - (padding[1] + padding[3]));\n // contentWidth = textMark.AABBBounds.width();\n contentHeight = textMark.AABBBounds.height();\n } else if (cellContent) {\n oldTextHeight = cellContent.AABBBounds.height();\n cellContent.updateWidth(distWidth - leftIconWidth - rightIconHeight - (padding[1] + padding[3]));\n // contentWidth = cellContent.AABBBounds.width();\n contentHeight = cellContent.AABBBounds.height();\n }\n\n const oldCellHeight = Math.max(leftIconHeight, rightIconHeight, oldTextHeight) + padding[0] + padding[2];\n\n // 更新x方向位置\n cellGroup.forEachChildren((child: any) => {\n if (child.role === 'icon-left') {\n // do nothing\n } else if (child.role === 'icon-right') {\n child.setAttribute('x', child.attribute.x + detaX);\n } else if (child.role === 'icon-absolute-right') {\n child.setAttribute('x', child.attribute.x + detaX);\n } else if (child.name === 'content' || child.name === 'text') {\n const contentWidth = child.AABBBounds.width();\n if (textAlign === 'center') {\n child.setAttribute(\n 'x',\n padding[3] + leftIconWidth + (distWidth - (padding[1] + padding[3]) - leftIconWidth - rightIconWidth) / 2\n );\n } else if (textAlign === 'right') {\n child.setAttribute('x', padding[3] + distWidth - (padding[1] + padding[3]) - rightIconWidth);\n } else {\n // left: do nothing\n }\n } else if (child.name === 'mark') {\n child.setAttribute('x', cellGroup.attribute.width);\n }\n });\n\n // 如果autoRowHeight && 高度改变 更新y方向位置\n if (autoRowHeight) {\n let newHeight = Math.max(leftIconHeight, contentHeight, rightIconHeight); // + padding[0] + padding[2]\n\n if (isCellHeightUpdate(scene, cellGroup, newHeight + padding[0] + padding[2], oldCellHeight)) {\n // cellGroup.setAttribute('height', newHeight + padding[0] + padding[2]);\n return true;\n }\n\n newHeight = cellGroup.attribute.height - (padding[0] + padding[2]);\n\n cellGroup.forEachChildren((child: any) => {\n if (child.type === 'rect' || child.type === 'chart') {\n return;\n }\n if (child.name === 'mark') {\n child.setAttribute('y', 0);\n } else if (textBaseline === 'middle') {\n child.setAttribute('y', padding[0] + (newHeight - child.AABBBounds.height()) / 2);\n } else if (textBaseline === 'bottom') {\n child.setAttribute('y', padding[0] + newHeight - child.AABBBounds.height());\n } else {\n child.setAttribute('y', padding[0]);\n }\n });\n } else if (textBaseline === 'middle' || textBaseline === 'bottom') {\n cellGroup.forEachChildren((child: any) => {\n if (child.type === 'rect' || child.type === 'chart') {\n return;\n }\n if (child.name === 'mark') {\n child.setAttribute('y', 0);\n } else if (textBaseline === 'middle') {\n child.setAttribute('y', (cellGroup.attribute.height - padding[2] + padding[0] - child.AABBBounds.height()) / 2);\n } else if (textBaseline === 'bottom') {\n child.setAttribute('y', cellGroup.attribute.height - child.AABBBounds.height() - padding[2]);\n } else {\n child.setAttribute('y', padding[0]);\n }\n });\n }\n return false;\n}\n\n/**\n * @description: 更新单元格内容宽度\n */\nexport function updateCellContentHeight(\n cellGroup: Group,\n distHeight: number,\n detaY: number,\n autoRowHeight: boolean,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline\n) {\n const newHeight = distHeight - (padding[0] + padding[2]);\n\n const textMark = cellGroup.getChildByName('text');\n\n if (textMark instanceof WrapText && !autoRowHeight) {\n textMark.setAttribute('heightLimit', newHeight);\n } else if (textMark instanceof RichText && !autoRowHeight) {\n textMark.setAttribute('height', newHeight);\n } else if (cellGroup.getChildByName('content')) {\n const cellContent = cellGroup.getChildByName('content') as CellContent;\n cellContent.updateHeight(newHeight);\n }\n\n // 更新y方向位置\n cellGroup.forEachChildren((child: any) => {\n if (child.type === 'rect') {\n // do nothing\n } else if (child.name === 'mark') {\n child.setAttribute('y', 0);\n } else if (textBaseline === 'middle') {\n child.setAttribute('y', padding[0] + (newHeight - child.AABBBounds.height()) / 2);\n } else if (textBaseline === 'bottom') {\n child.setAttribute('y', padding[0] + newHeight - child.AABBBounds.height());\n } else {\n child.setAttribute('y', padding[0]);\n }\n });\n}\n\n/**\n * @description: 自适应行高模式下,判断当前单元格是否需要更新行高\n * @param {Scenegraph} scene\n * @param {Group} cellGroup\n * @param {number} newHeight\n * @param {number} oldHeight\n * @return {*}\n */\nfunction isCellHeightUpdate(scene: Scenegraph, cellGroup: Group, newHeight: number, oldHeight: number): boolean {\n const table = scene.table;\n const mergeInfo = getCellMergeInfo(table, cellGroup.col, cellGroup.row);\n\n // let rowHeight: number = 0;\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n oldHeight = oldHeight / (mergeInfo.end.row - mergeInfo.start.row + 1);\n newHeight = newHeight / (mergeInfo.end.row - mergeInfo.start.row + 1);\n for (let rowIndex = mergeInfo.start.row; rowIndex <= mergeInfo.end.row; rowIndex++) {\n const rowHeight = table.getRowHeight(rowIndex);\n\n if (rowHeight === oldHeight && newHeight !== rowHeight) {\n // 当前行的自适应行高,是由本单元格撑起;如果当前单元格高度发生变化,则更新行高\n return true;\n } else if (newHeight > rowHeight) {\n // 如果当前单元格高度超过目前所在行的行高,则更新行高\n return true;\n }\n }\n } else {\n const rowHeight = table.getRowHeight(cellGroup.row);\n\n if (rowHeight === oldHeight && newHeight !== rowHeight) {\n // 当前行的自适应行高,是由本单元格撑起;如果当前单元格高度发生变化,则更新行高\n return true;\n } else if (newHeight > rowHeight) {\n // 如果当前单元格高度超过目前所在行的行高,则更新行高\n return true;\n }\n }\n\n return false;\n}\n"]}
@@ -33321,7 +33321,7 @@
33321
33321
  }
33322
33322
  newHeight = cellGroup.attribute.height - (padding[0] + padding[2]);
33323
33323
  cellGroup.forEachChildren((child) => {
33324
- if (child.type === 'rect') {
33324
+ if (child.type === 'rect' || child.type === 'chart') {
33325
33325
  return;
33326
33326
  }
33327
33327
  if (child.name === 'mark') {
@@ -33340,7 +33340,7 @@
33340
33340
  }
33341
33341
  else if (textBaseline === 'middle' || textBaseline === 'bottom') {
33342
33342
  cellGroup.forEachChildren((child) => {
33343
- if (child.type === 'rect') {
33343
+ if (child.type === 'rect' || child.type === 'chart') {
33344
33344
  return;
33345
33345
  }
33346
33346
  if (child.name === 'mark') {
@@ -34818,6 +34818,7 @@
34818
34818
  }
34819
34819
  cellGroup.AABBBounds.width();
34820
34820
  const chartGroup = new Chart({
34821
+ stroke: false,
34821
34822
  x: padding[3],
34822
34823
  y: padding[0],
34823
34824
  canvas: table.canvas,
@@ -34830,10 +34831,10 @@
34830
34831
  data: table.getCellValue(col, row),
34831
34832
  cellPadding: padding,
34832
34833
  viewBox: {
34833
- x1: Math.ceil(cellGroup.globalAABBBounds.x1 + table.tableX + padding[3]) + table.scrollLeft,
34834
- x2: Math.ceil(cellGroup.globalAABBBounds.x1 + width + table.tableX - padding[1]) + table.scrollLeft,
34835
- y1: Math.ceil(cellGroup.globalAABBBounds.y1 + table.tableY + padding[0]) + table.scrollTop,
34836
- y2: Math.ceil(cellGroup.globalAABBBounds.y1 + height + table.tableY - padding[2] + table.scrollTop)
34834
+ x1: Math.ceil(cellGroup.globalAABBBounds.x1 + padding[3] + table.scrollLeft),
34835
+ x2: Math.ceil(cellGroup.globalAABBBounds.x1 + width - padding[1] + table.scrollLeft),
34836
+ y1: Math.ceil(cellGroup.globalAABBBounds.y1 + padding[0] + table.scrollTop),
34837
+ y2: Math.ceil(cellGroup.globalAABBBounds.y1 + height - padding[2] + table.scrollTop)
34837
34838
  }
34838
34839
  });
34839
34840
  cellGroup.appendChild(chartGroup);
@@ -37288,7 +37289,7 @@
37288
37289
  const { autoRowHeight } = scene.table.internalProps;
37289
37290
  let needRerangeRow = false;
37290
37291
  const colOrCornerHeaderColumn = scene.getColGroup(col, true);
37291
- const oldColOrCornerHeaderColumnWidth = colOrCornerHeaderColumn.attribute.width;
37292
+ const oldColOrCornerHeaderColumnWidth = colOrCornerHeaderColumn?.attribute.width;
37292
37293
  colOrCornerHeaderColumn?.setAttribute('width', oldColOrCornerHeaderColumnWidth + detaX);
37293
37294
  colOrCornerHeaderColumn?.forEachChildren((cell, index) => {
37294
37295
  const isHeightChange = updateCellWidth(scene, cell, col, cell.row, oldColOrCornerHeaderColumnWidth, detaX, index < scene.table.columnHeaderLevelCount, autoRowHeight);
@@ -38603,7 +38604,7 @@
38603
38604
  }
38604
38605
  }
38605
38606
 
38606
- function createFrameBorder(group, frameTheme, role, strokeArray) {
38607
+ function createFrameBorder(group, frameTheme, role, strokeArray, justForXYPosition) {
38607
38608
  if (!frameTheme) {
38608
38609
  return;
38609
38610
  }
@@ -38658,10 +38659,13 @@
38658
38659
  if (isTableGroup && (rectAttributes.shadowBlur || rectAttributes.lineWidth)) {
38659
38660
  const deltaX = (rectAttributes.shadowBlur ?? 0) + (borderLeft + borderRight) / 2;
38660
38661
  const deltaY = (rectAttributes.shadowBlur ?? 0) + (borderTop + borderBottom) / 2;
38661
- groupAttributes.x = group.attribute.x + deltaX;
38662
- groupAttributes.y = group.attribute.y + deltaY;
38662
+ groupAttributes.x = deltaX;
38663
+ groupAttributes.y = deltaY;
38663
38664
  }
38664
38665
  group.setAttributes(groupAttributes);
38666
+ if (justForXYPosition) {
38667
+ return;
38668
+ }
38665
38669
  if (rectAttributes.stroke) {
38666
38670
  rectAttributes.x = borderLeft / 2;
38667
38671
  rectAttributes.y = borderTop / 2;
@@ -40586,32 +40590,18 @@
40586
40590
  const chartInstance = columnGroup.attribute?.chartInstance;
40587
40591
  if (chartInstance) {
40588
40592
  columnGroup.getChildren().forEach((cellNode) => {
40589
- const width = cellNode.AABBBounds.width();
40590
- const height = cellNode.AABBBounds.height();
40593
+ const width = scenegraph.table.getColWidth(cellNode.col);
40594
+ const height = scenegraph.table.getRowHeight(cellNode.row);
40591
40595
  cellNode.children.forEach((node) => {
40592
40596
  if (node.type === 'chart') {
40593
40597
  node.cacheCanvas = null;
40594
40598
  node.setAttribute('width', Math.ceil(width - node.attribute.cellPadding[3] - node.attribute.cellPadding[1]));
40595
40599
  node.setAttribute('height', Math.ceil(height - node.attribute.cellPadding[0] - node.attribute.cellPadding[2]));
40596
40600
  node.setAttribute('viewBox', {
40597
- x1: Math.ceil(cellNode.globalAABBBounds.x1 +
40598
- scenegraph.table.tableX +
40599
- node.attribute.cellPadding[3] +
40600
- scenegraph.table.scrollLeft),
40601
- x2: Math.ceil(cellNode.globalAABBBounds.x1 +
40602
- width +
40603
- scenegraph.table.tableX -
40604
- node.attribute.cellPadding[1] +
40605
- scenegraph.table.scrollLeft),
40606
- y1: Math.ceil(cellNode.globalAABBBounds.y1 +
40607
- scenegraph.table.tableY +
40608
- node.attribute.cellPadding[0] +
40609
- scenegraph.table.scrollTop),
40610
- y2: Math.ceil(cellNode.globalAABBBounds.y1 +
40611
- height +
40612
- scenegraph.table.tableY -
40613
- node.attribute.cellPadding[2] +
40614
- scenegraph.table.scrollTop)
40601
+ x1: Math.ceil(cellNode.globalAABBBounds.x1 + node.attribute.cellPadding[3] + scenegraph.table.scrollLeft),
40602
+ x2: Math.ceil(cellNode.globalAABBBounds.x1 + width - node.attribute.cellPadding[1] + scenegraph.table.scrollLeft),
40603
+ y1: Math.ceil(cellNode.globalAABBBounds.y1 + node.attribute.cellPadding[0] + scenegraph.table.scrollTop),
40604
+ y2: Math.ceil(cellNode.globalAABBBounds.y1 + height - node.attribute.cellPadding[2] + scenegraph.table.scrollTop)
40615
40605
  });
40616
40606
  }
40617
40607
  });
@@ -40620,6 +40610,107 @@
40620
40610
  }
40621
40611
  }
40622
40612
 
40613
+ function dealFrozen(scene) {
40614
+ if (scene.table.frozenColCount > scene.table.rowHeaderLevelCount) {
40615
+ scene.rowHeaderGroup.setAttribute('height', scene.bodyGroup.attribute.height);
40616
+ scene.rowHeaderGroup.setAttribute('y', scene.bodyGroup.attribute.y);
40617
+ scene.cornerHeaderGroup.setAttribute('height', scene.colHeaderGroup.attribute.height);
40618
+ for (let i = 0; i < scene.table.frozenColCount - scene.table.rowHeaderLevelCount; i++) {
40619
+ moveColumnFromBodyToRowHeader(scene);
40620
+ moveColumnFromColHeaderToCornerHeader(scene);
40621
+ }
40622
+ }
40623
+ else if (scene.table.frozenColCount < scene.table.rowHeaderLevelCount) {
40624
+ for (let i = 0; i < scene.table.rowHeaderLevelCount - scene.table.frozenColCount; i++) {
40625
+ moveColumnFromRowHeaderToBody(scene);
40626
+ moveColumnFromCornerHeaderToColHeader(scene);
40627
+ }
40628
+ }
40629
+ scene.bodyGroup.setAttribute('x', scene.rowHeaderGroup.attribute.width);
40630
+ scene.colHeaderGroup.setAttribute('x', scene.cornerHeaderGroup.attribute.width);
40631
+ scene.updateContainer();
40632
+ scene.updateBorderSizeAndPosition();
40633
+ if (!scene.isPivot && !scene.transpose) {
40634
+ scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1);
40635
+ }
40636
+ scene.hasFrozen = true;
40637
+ scene.frozenColCount = scene.table.frozenColCount;
40638
+ scene.frozenRowCount = scene.colHeaderGroup.firstChild?.childrenCount ?? 0;
40639
+ }
40640
+ function resetFrozen(scene) {
40641
+ if (scene.frozenColCount > scene.table.rowHeaderLevelCount) {
40642
+ for (let i = 0; i < scene.frozenColCount - scene.table.rowHeaderLevelCount; i++) {
40643
+ moveColumnFromRowHeaderToBody(scene);
40644
+ moveColumnFromCornerHeaderToColHeader(scene);
40645
+ }
40646
+ }
40647
+ else if (scene.frozenColCount < scene.table.rowHeaderLevelCount) {
40648
+ scene.rowHeaderGroup.setAttribute('height', scene.bodyGroup.attribute.height);
40649
+ scene.rowHeaderGroup.setAttribute('y', scene.bodyGroup.attribute.y);
40650
+ scene.cornerHeaderGroup.setAttribute('height', scene.colHeaderGroup.attribute.height);
40651
+ for (let i = 0; i < scene.table.rowHeaderLevelCount - scene.frozenColCount; i++) {
40652
+ moveColumnFromBodyToRowHeader(scene);
40653
+ moveColumnFromColHeaderToCornerHeader(scene);
40654
+ }
40655
+ }
40656
+ scene.bodyGroup.setAttribute('x', scene.rowHeaderGroup.attribute.width);
40657
+ scene.colHeaderGroup.setAttribute('x', scene.cornerHeaderGroup.attribute.width);
40658
+ scene.updateContainer();
40659
+ scene.updateBorderSizeAndPosition();
40660
+ if (!scene.isPivot && !scene.transpose) {
40661
+ scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1);
40662
+ }
40663
+ scene.hasFrozen = true;
40664
+ scene.frozenColCount = scene.table.rowHeaderLevelCount;
40665
+ scene.frozenRowCount = scene.colHeaderGroup.firstChild?.childrenCount ?? 0;
40666
+ }
40667
+ function moveColumnFromBodyToRowHeader(scene) {
40668
+ const column = scene.bodyGroup.firstChild instanceof Group ? scene.bodyGroup.firstChild : null;
40669
+ if (column) {
40670
+ scene.rowHeaderGroup.appendChild(column);
40671
+ scene.rowHeaderGroup.setAttribute('width', scene.rowHeaderGroup.attribute.width + column.attribute.width);
40672
+ scene.bodyGroup.setAttribute('width', scene.bodyGroup.attribute.width - column.attribute.width);
40673
+ }
40674
+ }
40675
+ function moveColumnFromColHeaderToCornerHeader(scene) {
40676
+ const headerColumn = scene.colHeaderGroup.firstChild instanceof Group ? scene.colHeaderGroup.firstChild : null;
40677
+ if (headerColumn) {
40678
+ scene.cornerHeaderGroup.appendChild(headerColumn);
40679
+ scene.cornerHeaderGroup.setAttribute('width', scene.cornerHeaderGroup.attribute.width + headerColumn.attribute.width);
40680
+ scene.colHeaderGroup.setAttribute('width', scene.colHeaderGroup.attribute.width - headerColumn.attribute.width);
40681
+ }
40682
+ }
40683
+ function moveColumnFromRowHeaderToBody(scene) {
40684
+ const column = scene.rowHeaderGroup.lastChild instanceof Group
40685
+ ? scene.rowHeaderGroup.lastChild
40686
+ : scene.rowHeaderGroup.lastChild?._prev;
40687
+ if (column) {
40688
+ if (scene.bodyGroup.firstChild) {
40689
+ scene.bodyGroup.insertBefore(column, scene.bodyGroup.firstChild);
40690
+ }
40691
+ else {
40692
+ scene.bodyGroup.appendChild(column);
40693
+ }
40694
+ scene.bodyGroup.setAttribute('width', scene.bodyGroup.attribute.width + column.attribute.width);
40695
+ scene.rowHeaderGroup.setAttribute('width', scene.rowHeaderGroup.attribute.width - column.attribute.width);
40696
+ }
40697
+ }
40698
+ function moveColumnFromCornerHeaderToColHeader(scene) {
40699
+ const headerColumn = scene.cornerHeaderGroup.lastChild instanceof Group
40700
+ ? scene.cornerHeaderGroup.lastChild
40701
+ : scene.cornerHeaderGroup.lastChild?._prev;
40702
+ if (headerColumn) {
40703
+ if (scene.colHeaderGroup.firstChild) {
40704
+ scene.colHeaderGroup.insertBefore(headerColumn, scene.colHeaderGroup.firstChild);
40705
+ }
40706
+ else {
40707
+ scene.bodyGroup.appendChild(headerColumn);
40708
+ }
40709
+ scene.colHeaderGroup.setAttribute('width', scene.colHeaderGroup.attribute.width + headerColumn.attribute.width);
40710
+ scene.cornerHeaderGroup.setAttribute('width', scene.cornerHeaderGroup.attribute.width - headerColumn.attribute.width);
40711
+ }
40712
+ }
40713
+
40623
40714
  container.load(splitModule);
40624
40715
  class Scenegraph {
40625
40716
  proxy;
@@ -40810,6 +40901,7 @@
40810
40901
  this.frozenColCount = this.table.rowHeaderLevelCount;
40811
40902
  this.frozenRowCount = this.table.columnHeaderLevelCount;
40812
40903
  this.proxy = new SceneProxy(this.table);
40904
+ createFrameBorder(this.tableGroup, this.table.theme.frameStyle, this.tableGroup.role, undefined, true);
40813
40905
  this.createHeaderSceneGraph();
40814
40906
  if (this.transpose || this.isPivot) {
40815
40907
  this.createBodySceneGraph();
@@ -41073,7 +41165,7 @@
41073
41165
  }
41074
41166
  updateColWidth(col, detaX) {
41075
41167
  updateColWidth(this, col, detaX);
41076
- this.updateContainerWidth(col, detaX);
41168
+ this.updateContainer();
41077
41169
  }
41078
41170
  updateChartSize(col) {
41079
41171
  updateChartSize(this, col);
@@ -41266,83 +41358,10 @@
41266
41358
  });
41267
41359
  }
41268
41360
  dealFrozen() {
41269
- if (this.table.frozenColCount > this.table.rowHeaderLevelCount) {
41270
- this.rowHeaderGroup.setAttribute('height', this.bodyGroup.attribute.height);
41271
- this.rowHeaderGroup.setAttribute('y', this.bodyGroup.attribute.y);
41272
- this.cornerHeaderGroup.setAttribute('height', this.colHeaderGroup.attribute.height);
41273
- for (let i = 0; i < this.table.frozenColCount - this.table.rowHeaderLevelCount; i++) {
41274
- const column = this.bodyGroup.firstChild;
41275
- if (column) {
41276
- this.rowHeaderGroup.appendChild(column);
41277
- this.rowHeaderGroup.setAttribute('width', this.rowHeaderGroup.attribute.width + column.attribute.width);
41278
- this.bodyGroup.setAttribute('width', this.bodyGroup.attribute.width - column.attribute.width);
41279
- }
41280
- const headerColumn = this.colHeaderGroup.firstChild;
41281
- if (headerColumn) {
41282
- this.cornerHeaderGroup.appendChild(headerColumn);
41283
- this.cornerHeaderGroup.setAttribute('width', this.cornerHeaderGroup.attribute.width + headerColumn.attribute.width);
41284
- this.colHeaderGroup.setAttribute('width', this.colHeaderGroup.attribute.width - headerColumn.attribute.width);
41285
- }
41286
- }
41287
- }
41288
- this.bodyGroup.setAttribute('x', this.rowHeaderGroup.attribute.width);
41289
- this.colHeaderGroup.setAttribute('x', this.cornerHeaderGroup.attribute.width);
41290
- const bodyDeltaX = this.bodyGroup.firstChild?.attribute.x ?? 0;
41291
- this.bodyGroup.forEachChildrenSkipChild((column) => {
41292
- column.setAttribute('x', column.attribute.x - bodyDeltaX);
41293
- });
41294
- const colDeltaX = this.colHeaderGroup.firstChild?.attribute.x ?? 0;
41295
- this.colHeaderGroup.forEachChildrenSkipChild((column) => {
41296
- column.setAttribute('x', column.attribute.x - colDeltaX);
41297
- });
41298
- this.updateBorderSizeAndPosition();
41299
- if (!this.isPivot && !this.transpose) {
41300
- this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
41301
- }
41302
- this.hasFrozen = true;
41303
- this.frozenColCount = this.table.frozenColCount;
41304
- this.frozenRowCount = this.colHeaderGroup.firstChild?.childrenCount ?? 0;
41361
+ dealFrozen(this);
41305
41362
  }
41306
41363
  resetFrozen() {
41307
- if (this.frozenColCount > this.table.rowHeaderLevelCount) {
41308
- for (let i = 0; i < this.frozenColCount - this.table.rowHeaderLevelCount; i++) {
41309
- const column = this.rowHeaderGroup.lastChild instanceof Group
41310
- ? this.rowHeaderGroup.lastChild
41311
- : this.rowHeaderGroup.lastChild._prev;
41312
- if (column) {
41313
- this.bodyGroup.insertBefore(column, this.bodyGroup.firstChild);
41314
- this.bodyGroup.setAttribute('width', this.bodyGroup.attribute.width + column.attribute.width);
41315
- this.rowHeaderGroup.setAttribute('width', this.rowHeaderGroup.attribute.width - column.attribute.width);
41316
- }
41317
- const headerColumn = this.cornerHeaderGroup.lastChild instanceof Group
41318
- ? this.cornerHeaderGroup.lastChild
41319
- : this.cornerHeaderGroup.lastChild._prev;
41320
- if (headerColumn) {
41321
- this.colHeaderGroup.insertBefore(headerColumn, this.colHeaderGroup.firstChild);
41322
- this.colHeaderGroup.setAttribute('width', this.colHeaderGroup.attribute.width + headerColumn.attribute.width);
41323
- this.cornerHeaderGroup.setAttribute('width', this.cornerHeaderGroup.attribute.width - headerColumn.attribute.width);
41324
- }
41325
- }
41326
- }
41327
- this.bodyGroup.setAttribute('x', this.rowHeaderGroup.attribute.width);
41328
- this.colHeaderGroup.setAttribute('x', this.cornerHeaderGroup.attribute.width);
41329
- let bodyX = 0;
41330
- this.bodyGroup.forEachChildrenSkipChild((column) => {
41331
- column.setAttribute('x', bodyX);
41332
- bodyX += column.attribute.width;
41333
- });
41334
- let colX = 0;
41335
- this.colHeaderGroup.forEachChildrenSkipChild((column) => {
41336
- column.setAttribute('x', colX);
41337
- colX += column.attribute.width;
41338
- });
41339
- this.updateBorderSizeAndPosition();
41340
- if (!this.isPivot && !this.transpose) {
41341
- this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
41342
- }
41343
- this.hasFrozen = true;
41344
- this.frozenColCount = this.table.rowHeaderLevelCount;
41345
- this.frozenRowCount = this.colHeaderGroup.firstChild?.childrenCount ?? 0;
41364
+ resetFrozen(this);
41346
41365
  }
41347
41366
  updateCellLayoutWidthCertainWidth(columnGroup, detaRow, col) {
41348
41367
  const width = columnGroup.attribute.width;
@@ -41416,6 +41435,7 @@
41416
41435
  this.bodyGroup.setDeltaWidth(bodyX - this.bodyGroup.attribute.width);
41417
41436
  this.colHeaderGroup.setAttribute('x', this.cornerHeaderGroup.attribute.width);
41418
41437
  this.bodyGroup.setAttribute('x', this.rowHeaderGroup.attribute.width);
41438
+ this.updateTableSize();
41419
41439
  const oldHorizontalBarPos = this.table.stateManeger.scroll.horizontalBarPos;
41420
41440
  const oldVerticalBarPos = this.table.stateManeger.scroll.verticalBarPos;
41421
41441
  this.component.updateScrollBar();
@@ -41437,7 +41457,7 @@
41437
41457
  createFrameBorder(this.rowHeaderGroup, this.isPivot ? this.table.theme.rowHeaderStyle.frameStyle : this.table.theme.bodyStyle.frameStyle, this.rowHeaderGroup.role, isListTableWithFrozen ? [true, false, true, true] : undefined);
41438
41458
  createFrameBorder(this.colHeaderGroup, this.table.theme.headerStyle.frameStyle, this.colHeaderGroup.role, isListTableWithFrozen ? [true, true, true, false] : undefined);
41439
41459
  createFrameBorder(this.cornerHeaderGroup, this.isPivot ? this.table.theme.cornerHeaderStyle.frameStyle : this.table.theme.headerStyle.frameStyle, this.cornerHeaderGroup.role, isListTableWithFrozen ? [true, false, true, true] : undefined);
41440
- createFrameBorder(this.tableGroup, this.table.theme.frameStyle, this.tableGroup.role);
41460
+ createFrameBorder(this.tableGroup, this.table.theme.frameStyle, this.tableGroup.role, undefined);
41441
41461
  }
41442
41462
  getResizeColAt(abstractX, abstractY, cellGroup, offset = ResizeColumnHotSpotSize / 2) {
41443
41463
  if (!cellGroup) ;
@@ -46249,7 +46269,7 @@
46249
46269
  return TABLE_EVENT_TYPE;
46250
46270
  }
46251
46271
  options;
46252
- version = "0.9.1-alpha.5";
46272
+ version = "0.9.1";
46253
46273
  pagerConf;
46254
46274
  id = `VTable${Date.now()}`;
46255
46275
  headerStyleCache;
@@ -53111,7 +53131,7 @@
53111
53131
  percentCalc: percentCalc
53112
53132
  });
53113
53133
 
53114
- const version = "0.9.1-alpha.5";
53134
+ const version = "0.9.1";
53115
53135
  function getIcons() {
53116
53136
  return get();
53117
53137
  }