@visactor/vtable 1.3.0 → 1.3.1-alpha.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.
- package/cjs/components/tooltip/TooltipHandler.js +1 -3
- package/cjs/components/tooltip/TooltipHandler.js.map +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js +7 -3
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -1
- package/cjs/core/BaseTable.js +1 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +2 -2
- package/cjs/index.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +2 -2
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/layout/frozen.js +12 -4
- package/cjs/scenegraph/layout/frozen.js.map +1 -1
- package/cjs/themes/theme.js +6 -0
- package/cjs/themes/theme.js.map +1 -1
- package/cjs/ts-types/icon.d.ts +2 -0
- package/cjs/ts-types/icon.js.map +1 -1
- package/cjs/ts-types/theme.d.ts +2 -0
- package/cjs/ts-types/theme.js.map +1 -1
- package/cjs/ts-types/tooltip.d.ts +2 -0
- package/cjs/ts-types/tooltip.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +45 -8
- package/dist/vtable.min.js +2 -2
- package/es/components/tooltip/TooltipHandler.js +1 -3
- package/es/components/tooltip/TooltipHandler.js.map +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElement.js +7 -3
- package/es/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElementStyle.js +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -1
- package/es/core/BaseTable.js +1 -1
- package/es/core/BaseTable.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/scenegraph/group-creater/cell-helper.js +2 -2
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/layout/frozen.js +12 -4
- package/es/scenegraph/layout/frozen.js.map +1 -1
- package/es/themes/theme.js +6 -0
- package/es/themes/theme.js.map +1 -1
- package/es/ts-types/icon.d.ts +2 -0
- package/es/ts-types/icon.js.map +1 -1
- package/es/ts-types/theme.d.ts +2 -0
- package/es/ts-types/theme.js.map +1 -1
- package/es/ts-types/tooltip.d.ts +2 -0
- package/es/ts-types/tooltip.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
package/cjs/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { renderChart } from './scenegraph/graphic/contributions/chart-render-hel
|
|
|
16
16
|
import { restoreMeasureText, setCustomAlphabetCharSet } from './scenegraph/utils/text-measure';
|
|
17
17
|
export { getDataCellPath } from './tools/get-data-path';
|
|
18
18
|
export * from './render/jsx';
|
|
19
|
-
export declare const version = "1.3.
|
|
19
|
+
export declare const version = "1.3.1-alpha.1";
|
|
20
20
|
export { TYPES, core, ListTable, ListTableConstructorOptions, PivotTable, PivotTableConstructorOptions, PivotChartConstructorOptions, PivotChart, IHeaderTreeDefine, IDimension, IIndicator, ITitleDefine, ICornerDefine, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, themes, data, MousePointerCellEvent, getIcons, clearGlobal, register, DataStatistics, CustomLayout, updateCell, renderChart, graphicUtil, setCustomAlphabetCharSet, restoreMeasureText };
|
|
21
21
|
declare function getIcons(): {
|
|
22
22
|
[key: string]: TYPES.ColumnIconOption;
|
package/cjs/index.js
CHANGED
|
@@ -142,6 +142,6 @@ Object.defineProperty(exports, "getDataCellPath", {
|
|
|
142
142
|
get: function() {
|
|
143
143
|
return get_data_path_1.getDataCellPath;
|
|
144
144
|
}
|
|
145
|
-
}), __exportStar(require("./render/jsx"), exports), exports.version = "1.3.
|
|
146
|
-
exports.clearGlobal = clearGlobal, TYPES.AggregationType;
|
|
145
|
+
}), __exportStar(require("./render/jsx"), exports), exports.version = "1.3.1-alpha.1",
|
|
146
|
+
exports.getIcons = getIcons, exports.clearGlobal = clearGlobal, TYPES.AggregationType;
|
|
147
147
|
//# sourceMappingURL=index.js.map
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uCAA4D;AA8F1D,4FA9FO,qBAAW,OA8FP;AA7Fb,IAAA,4BAAkB,GAAE,CAAC;AAErB,kDAAoC;AAqDlC,sBAAK;AApDP,6CAA+B;AAqD7B,oBAAI;AApDN,6CAA+B;AA4E7B,oBAAI;AA3EN,+CAAiC;AACjC,qDAAuC;AA+ErC,4BAAQ;AA9EV,iDAAmC;AAwEjC,wBAAM;AAvER,yEAA2D;AAiFzD,wCAAc;AA3DhB,2CAAwC;AA2BtC,0FA3BO,qBAAS,OA2BP;AA1BX,6CAA0C;AA4BxC,2FA5BO,uBAAU,OA4BP;AA3BZ,6CAA0C;AA8BxC,2FA9BO,uBAAU,OA8BP;AA5BZ,8DAAgD;AAwD9C,oCAAY;AAtDd,wEAAoE;AAuDlE,2FAvDO,wBAAU,OAuDP;AAtDZ,gGAAqF;AAuDnF,4FAvDO,iCAAW,OAuDP;AAtDb,kEAA+F;AAyD7F,mGAzDO,iCAAkB,OAyDP;AADlB,yGAxD2B,uCAAwB,OAwD3B;AAnD1B,uDAAwD;AAA/C,gHAAA,eAAe,OAAA;AACxB,+CAA6B;AAEhB,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uCAA4D;AA8F1D,4FA9FO,qBAAW,OA8FP;AA7Fb,IAAA,4BAAkB,GAAE,CAAC;AAErB,kDAAoC;AAqDlC,sBAAK;AApDP,6CAA+B;AAqD7B,oBAAI;AApDN,6CAA+B;AA4E7B,oBAAI;AA3EN,+CAAiC;AACjC,qDAAuC;AA+ErC,4BAAQ;AA9EV,iDAAmC;AAwEjC,wBAAM;AAvER,yEAA2D;AAiFzD,wCAAc;AA3DhB,2CAAwC;AA2BtC,0FA3BO,qBAAS,OA2BP;AA1BX,6CAA0C;AA4BxC,2FA5BO,uBAAU,OA4BP;AA3BZ,6CAA0C;AA8BxC,2FA9BO,uBAAU,OA8BP;AA5BZ,8DAAgD;AAwD9C,oCAAY;AAtDd,wEAAoE;AAuDlE,2FAvDO,wBAAU,OAuDP;AAtDZ,gGAAqF;AAuDnF,4FAvDO,iCAAW,OAuDP;AAtDb,kEAA+F;AAyD7F,mGAzDO,iCAAkB,OAyDP;AADlB,yGAxD2B,uCAAwB,OAwD3B;AAnD1B,uDAAwD;AAA/C,gHAAA,eAAe,OAAA;AACxB,+CAA6B;AAEhB,QAAA,OAAO,GAAG,eAAe,CAAC;AAqDvC,SAAS,QAAQ;IAGf,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC;AACrB,CAAC;AArBC,4BAAQ;AAuBV,SAAS,WAAW;IAClB,QAAQ,CAAC,QAAQ,EAAE,CAAC;AAGtB,CAAC;AA1BC,kCAAW;AA2Bb,KAAK,CAAC,eAAe,CAAC","file":"index.js","sourcesContent":["/* eslint-disable sort-imports */\nimport { graphicUtil, registerForVrender } from './vrender';\nregisterForVrender();\n\nimport * as TYPES from './ts-types';\nimport * as core from './core';\nimport * as data from './data';\nimport * as icons from './icons';\nimport * as register from './register';\nimport * as themes from './themes';\nimport * as DataStatistics from './dataset/DataStatistics';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n ListTableConstructorOptions,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n TextAlignType,\n TextBaselineType\n} from './ts-types';\nimport { ListTable } from './ListTable';\nimport { PivotTable } from './PivotTable';\nimport { PivotChart } from './PivotChart';\nimport type { MousePointerCellEvent } from './ts-types/events';\nimport * as CustomLayout from './render/layout';\n\nimport { updateCell } from './scenegraph/group-creater/cell-helper';\nimport { renderChart } from './scenegraph/graphic/contributions/chart-render-helper';\nimport { restoreMeasureText, setCustomAlphabetCharSet } from './scenegraph/utils/text-measure';\n\n// import { container, loadCanvasPicker } from '@src/vrender';\n// loadCanvasPicker(container);\n\nexport { getDataCellPath } from './tools/get-data-path';\nexport * from './render/jsx';\n\nexport const version = \"1.3.1-alpha.1\";\n/**\n * @namespace VTable\n */\nexport {\n /**\n * Types\n * @namespace VTable.TYPES\n */\n TYPES,\n core,\n ListTable,\n ListTableConstructorOptions,\n PivotTable,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n PivotChart,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n themes,\n data,\n MousePointerCellEvent,\n getIcons,\n clearGlobal,\n //plugin registers\n register,\n /**\n * 暂不推荐使用\n */\n DataStatistics,\n CustomLayout,\n updateCell,\n renderChart,\n graphicUtil,\n setCustomAlphabetCharSet,\n restoreMeasureText\n};\n\n/** @private */\nfunction getIcons(): {\n [key: string]: TYPES.ColumnIconOption;\n} {\n return icons.get();\n}\n/** 清理内部的全局变量 如注册的icon theme等 以及共享的header column类实例 */\nfunction clearGlobal() {\n register.clearAll();\n // headers.type.clearGlobal();\n // columns.type.clearGlobal();\n}\nTYPES.AggregationType;\n"]}
|
|
@@ -163,9 +163,9 @@ function canUseFastUpdate(col, row, oldCellGroup, autoWrapText, table) {
|
|
|
163
163
|
function dealWithMergeCellSize(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table) {
|
|
164
164
|
for (let col = range.start.col; col <= range.end.col; col++) for (let row = range.start.row; row <= range.end.row; row++) {
|
|
165
165
|
const cellGroup = table.scenegraph.getCell(col, row, !0);
|
|
166
|
-
"cell" === cellGroup.role && range.start.row !== range.end.row && cellGroup.
|
|
166
|
+
"cell" === cellGroup.role && range.start.row !== range.end.row && cellGroup.contentHeight !== cellHeight && (0,
|
|
167
167
|
text_icon_layout_1.updateCellContentHeight)(cellGroup, cellHeight, cellHeight, table.isAutoRowHeight(row), padding, textAlign, textBaseline),
|
|
168
|
-
"cell" === cellGroup.role && range.start.col !== range.end.col && cellGroup.
|
|
168
|
+
"cell" === cellGroup.role && range.start.col !== range.end.col && cellGroup.contentWidth !== cellWidth && (0,
|
|
169
169
|
text_icon_layout_1.updateCellContentWidth)(cellGroup, cellWidth, cellHeight, 0, table.isAutoRowHeight(row), padding, textAlign, textBaseline, table.scenegraph),
|
|
170
170
|
cellGroup.contentWidth = cellWidth, cellGroup.contentHeight = cellHeight;
|
|
171
171
|
const rangeHeight = table.getRowHeight(row);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/group-creater/cell-helper.ts"],"names":[],"mappings":";;;AAEA,+CAA4C;AAc5C,gDAAqD;AAErD,gDAA4C;AAC5C,uDAA8D;AAC9D,uDAA8D;AAC9D,qEAAsE;AACtE,iEAAuE;AACvE,qDAAwD;AACxD,uDAA8D;AAE9D,wDAA4E;AAC5E,+CAA+C;AAC/C,kEAA6D;AAC7D,qDAA2D;AAC3D,6DAAoE;AAGpE,wEAAmE;AACnE,8CAAgD;AAEhD,gEAA4F;AAC5F,6CAA2C;AAC3C,wDAAoD;AACpD,uDAA8D;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CACN,CAAC;gBAEF,MAAM,mBAAmB,GAAG,YAAY,CAAC,aAAa,CAAC;gBAEvD,IAAI,SAAS,CAAC,aAAa,GAAG,CAAC,IAAI,mBAAmB,EAAE;oBACtD,SAAS,CAAC,YAAY,CAAC,mBAAmB,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;iBACnE;qBAAM,IAAI,mBAAmB,EAAE;oBAC9B,SAAS,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC;iBAC5C;gBAED,MAAM,WAAW,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;gBAC5C,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;gBAE1C,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC,SAAS,CAAC;gBACpD,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,SAAS,CAAC,SAAS,CAAC;gBACtD,SAAS,CAAC,YAAY,GAAG,YAAY,CAAC;gBACtC,SAAS,CAAC,aAAa,GAAG,aAAa,CAAC;gBAExC,eAAe,CAAC,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC;gBAE7E,OAAO,gBAAgB,CAAC;aACzB;SACF;KACF;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AApDD,4DAoDC","file":"cell-helper.js","sourcesContent":["import type { Cursor, IGraphic, IThemeSpec, Group as VGroup } from './../../vrender';\nimport type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport { regUrl } from '../../tools/global';\nimport type {\n CellRange,\n ChartColumnDefine,\n CheckboxColumnDefine,\n ColumnDefine,\n ColumnTypeOption,\n ImageColumnDefine,\n MappingRule,\n ProgressbarColumnDefine,\n IRowSeriesNumber,\n TextColumnDefine,\n RadioColumnDefine\n} from '../../ts-types';\nimport { dealWithCustom } from '../component/custom';\nimport type { Group } from '../graphic/group';\nimport { getProp } from '../utils/get-prop';\nimport { createChartCellGroup } from './cell-type/chart-cell';\nimport { createImageCellGroup } from './cell-type/image-cell';\nimport { createProgressBarCell } from './cell-type/progress-bar-cell';\nimport { createSparkLineCellGroup } from './cell-type/spark-line-cell';\nimport { createCellGroup } from './cell-type/text-cell';\nimport { createVideoCellGroup } from './cell-type/video-cell';\nimport type { BaseTableAPI, HeaderData, PivotTableProtected } from '../../ts-types/base-table';\nimport { getCellCornerRadius, getStyleTheme } from '../../core/tableHelper';\nimport { isPromise } from '../../tools/helper';\nimport { dealPromiseData } from '../utils/deal-promise-data';\nimport { CartesianAxis } from '../../components/axis/axis';\nimport { createCheckboxCellGroup } from './cell-type/checkbox-cell';\n// import type { PivotLayoutMap } from '../../layout/pivot-layout';\nimport type { PivotHeaderLayoutMap } from '../../layout/pivot-header-layout';\nimport { getHierarchyOffset } from '../utils/get-hierarchy-offset';\nimport { getQuadProps } from '../utils/padding';\nimport { convertInternal } from '../../tools/util';\nimport { updateCellContentHeight, updateCellContentWidth } from '../utils/text-icon-layout';\nimport { isArray } from '@visactor/vutils';\nimport { breakString } from '../utils/break-string';\nimport { createRadioCellGroup } from './cell-type/radio-cell';\n\nexport function createCell(\n type: ColumnTypeOption,\n value: string,\n define: ColumnDefine,\n table: BaseTableAPI,\n col: number,\n row: number,\n colWidth: number,\n cellWidth: number,\n cellHeight: number,\n columnGroup: Group,\n y: number,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n mayHaveIcon: boolean,\n cellTheme: IThemeSpec,\n range: CellRange | undefined,\n customResult?: {\n elementsGroup: VGroup;\n renderDefault: boolean;\n }\n): Group {\n let isAsync = false;\n if (isPromise(value)) {\n value = table.getCellValue(col, row);\n isAsync = true;\n }\n // let bgColorFunc: Function;\n // // 判断是否有mapping 遍历dataset中mappingRules\n // if ((table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules && !table.isHeader(col, row)) {\n // (table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules?.forEach(\n // (mappingRule: MappingRule, i: number) => {\n // if (\n // mappingRule.bgColor &&\n // (table.internalProps.layoutMap as PivotHeaderLayoutMap).getIndicatorKey(col, row) ===\n // mappingRule.bgColor.indicatorKey\n // ) {\n // bgColorFunc = mappingRule.bgColor.mapping;\n // }\n // }\n // );\n // }\n let cellGroup: Group;\n if (type === 'text' || type === 'link') {\n if (type === 'link') {\n //如果是超链接 颜色按照linkColor绘制 TODO:放到方法_getCellStyle中\n // const columnDefine = table.getHeaderDefine(col, row);\n const cellValue = value;\n const headerStyle = table._getCellStyle(col, row);\n\n if (\n type === 'link' &&\n (('templateLink' in define && define.templateLink) ||\n !('linkDetect' in define && define.linkDetect) ||\n regUrl.test(cellValue))\n ) {\n if (cellTheme) {\n cellTheme.text.fill = getProp('linkColor', headerStyle, col, row, table);\n (cellTheme as any).group.cursor = 'pointer';\n } else {\n cellTheme = {\n text: {\n fill: getProp('linkColor', headerStyle, col, row, table)\n },\n group: {\n cursor: 'pointer' as Cursor\n }\n };\n }\n }\n }\n // 判断是否有mapping 遍历dataset中mappingRules 但这里还需要根据fieldName来判断\n // if (bgColorFunc) {\n // const cellValue = table.getCellOriginValue(col, row);\n // const bgColor = bgColorFunc(table, cellValue);\n // if (bgColor) {\n // if (cellTheme) {\n // cellTheme.group.fill = bgColor;\n // } else {\n // cellTheme = {\n // group: {\n // fill: bgColor\n // }\n // };\n // }\n // }\n // }\n\n let customElementsGroup;\n let renderDefault = true;\n if (customResult) {\n customElementsGroup = customResult.elementsGroup;\n renderDefault = customResult.renderDefault;\n } else {\n let customRender;\n let customLayout;\n const cellLocation = table.getCellLocation(col, row);\n if (cellLocation !== 'body') {\n customRender = define?.headerCustomRender;\n customLayout = define?.headerCustomLayout;\n } else {\n customRender = define?.customRender || table.customRender;\n customLayout = define?.customLayout;\n }\n if (customLayout || customRender) {\n const customResult = dealWithCustom(\n customLayout,\n customRender,\n col,\n row,\n cellWidth,\n cellHeight,\n false,\n // table.heightMode === 'autoHeight',\n table.isAutoRowHeight(row),\n padding,\n range,\n table\n );\n customElementsGroup = customResult.elementsGroup;\n renderDefault = customResult.renderDefault;\n }\n }\n\n cellGroup = createCellGroup(\n table,\n value,\n columnGroup,\n 0,\n y,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n customElementsGroup,\n renderDefault,\n cellTheme,\n range,\n isAsync\n );\n\n const axisConfig = table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);\n if (axisConfig) {\n const axis = new CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, padding, table);\n cellGroup.clear();\n cellGroup.appendChild(axis.component);\n axis.overlap();\n } else if (table.internalProps.layoutMap.isEmpty(col, row)) {\n cellGroup.setAttributes({\n fill: false,\n stroke: false\n });\n cellGroup.clear();\n } else if (table.internalProps.layoutMap.isAxisCell(col, row)) {\n cellGroup.clear();\n }\n } else if (type === 'image') {\n // 创建图片单元格\n cellGroup = createImageCellGroup(\n columnGroup,\n 0,\n y,\n col,\n row,\n cellWidth,\n cellHeight,\n (define as ImageColumnDefine).keepAspectRatio,\n (define as ImageColumnDefine).imageAutoSizing,\n padding,\n textAlign,\n textBaseline,\n table,\n cellTheme,\n isAsync\n );\n } else if (type === 'video') {\n // 创建视频单元格\n cellGroup = createVideoCellGroup(\n columnGroup,\n 0,\n y,\n col,\n row,\n cellWidth,\n cellHeight,\n (define as ImageColumnDefine).keepAspectRatio,\n (define as ImageColumnDefine).imageAutoSizing,\n padding,\n textAlign,\n textBaseline,\n table,\n cellTheme,\n isAsync\n );\n } else if (type === 'chart') {\n const chartInstance = table.internalProps.layoutMap.getChartInstance(col, row);\n cellGroup = createChartCellGroup(\n null,\n columnGroup,\n 0,\n y,\n col,\n row,\n cellWidth,\n cellHeight,\n padding,\n value,\n (define as ChartColumnDefine).chartModule,\n table.internalProps.layoutMap.getChartSpec(col, row),\n chartInstance,\n table.internalProps.layoutMap.getChartDataId(col, row) ?? 'data',\n table,\n cellTheme,\n table.internalProps.layoutMap.isShareChartSpec(col, row),\n isAsync\n );\n } else if (type === 'progressbar') {\n const style = table._getCellStyle(col, row) as ProgressBarStyle;\n const dataValue = table.getCellOriginValue(col, row);\n // 创建基础文字单元格\n cellGroup = createCellGroup(\n table,\n value,\n columnGroup,\n 0,\n y,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n padding,\n textAlign,\n textBaseline,\n false,\n null,\n true,\n cellTheme,\n range,\n isAsync\n );\n\n // 创建bar group\n const progressBarGroup = createProgressBarCell(\n define as ProgressbarColumnDefine,\n style,\n colWidth,\n value,\n dataValue,\n col,\n row,\n padding,\n table\n );\n // 进度图插入到文字前,绘制在文字下\n if (cellGroup.firstChild) {\n cellGroup.insertBefore(progressBarGroup, cellGroup.firstChild);\n } else {\n cellGroup.appendChild(progressBarGroup);\n }\n } else if (type === 'sparkline') {\n cellGroup = createSparkLineCellGroup(\n null,\n columnGroup,\n 0,\n y,\n col,\n row,\n cellWidth,\n cellHeight,\n padding,\n table,\n cellTheme,\n isAsync\n );\n } else if (type === 'checkbox') {\n cellGroup = createCheckboxCellGroup(\n null,\n columnGroup,\n 0,\n y,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n padding,\n textAlign,\n textBaseline,\n table,\n cellTheme,\n define as CheckboxColumnDefine,\n isAsync\n );\n } else if (type === 'radio') {\n cellGroup = createRadioCellGroup(\n null,\n columnGroup,\n 0,\n y,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n padding,\n textAlign,\n textBaseline,\n table,\n cellTheme,\n define as RadioColumnDefine\n );\n }\n\n return cellGroup;\n}\n\nexport function updateCell(col: number, row: number, table: BaseTableAPI, addNew?: boolean) {\n // const oldCellGroup = table.scenegraph.getCell(col, row, true);\n const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, true);\n const cellStyle = table._getCellStyle(col, row);\n const autoWrapText = cellStyle.autoWrapText ?? table.internalProps.autoWrapText;\n const cellLocation = table.getCellLocation(col, row);\n let value = table.getCellValue(col, row);\n\n let isMerge;\n let range;\n let cellTheme;\n let customStyle;\n let customResult;\n if (table.internalProps.customMergeCell) {\n const customMerge = table.getCustomMerge(col, row);\n if (customMerge) {\n const {\n range: customMergeRange,\n text: customMergeText,\n style: customMergeStyle,\n customLayout,\n customRender\n } = customMerge;\n range = customMergeRange;\n isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;\n value = customMergeText;\n customStyle = customMergeStyle;\n if (customStyle) {\n cellTheme = getStyleTheme(customStyle, table, range.start.col, range.start.row, getProp).theme;\n cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);\n }\n\n if (customLayout || customRender) {\n customResult = dealWithCustom(\n customLayout,\n customRender,\n customMergeRange.start.col,\n customMergeRange.start.row,\n table.getColsWidth(customMergeRange.start.col, customMergeRange.end.col),\n table.getRowsHeight(customMergeRange.start.row, customMergeRange.end.row),\n false,\n // table.heightMode === 'autoHeight',\n table.isAutoRowHeight(row),\n [0, 0, 0, 0],\n range,\n table\n );\n }\n }\n }\n\n // const define = cellLocation !== 'body' ? table.getHeaderDefine(col, row) : table.getBodyColumnDefine(col, row);\n let colForDefine = col;\n let rowForDefine = row;\n if (range) {\n colForDefine = range.start.col;\n rowForDefine = range.start.row;\n }\n const define =\n cellLocation !== 'body'\n ? table.getHeaderDefine(colForDefine, rowForDefine)\n : table.getBodyColumnDefine(colForDefine, rowForDefine);\n\n if (!range && (cellLocation !== 'body' || (define as TextColumnDefine)?.mergeCell)) {\n // 只有表头或者column配置合并单元格后再进行信息获取\n range = table.getCellRange(col, row);\n isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;\n }\n\n if (!cellTheme) {\n cellTheme = getStyleTheme(\n cellStyle,\n table,\n isMerge ? range.start.col : col,\n isMerge ? range.start.row : row,\n getProp\n ).theme;\n }\n cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);\n\n // fast method for text\n if (!addNew && !isMerge && canUseFastUpdate(col, row, oldCellGroup, autoWrapText, table)) {\n // update group\n const cellWidth = table.getColWidth(col);\n const cellHeight = table.getRowHeight(row);\n oldCellGroup.setAttributes({\n width: cellWidth,\n height: cellHeight,\n // 背景相关,cell背景由cellGroup绘制\n lineWidth: cellTheme?.group?.lineWidth ?? undefined,\n fill: cellTheme?.group?.fill ?? undefined,\n stroke: cellTheme?.group?.stroke ?? undefined,\n strokeArrayWidth: (cellTheme?.group as any)?.strokeArrayWidth ?? undefined,\n strokeArrayColor: (cellTheme?.group as any)?.strokeArrayColor ?? undefined,\n cursor: (cellTheme?.group as any)?.cursor ?? undefined,\n cornerRadius: cellTheme?.group?.cornerRadius ?? 0,\n\n y: table.scenegraph.getCellGroupY(row)\n } as any);\n\n oldCellGroup.forEachChildren((child: IGraphic) => {\n child.setAttributes({\n dx: 0,\n dy: 0\n });\n });\n\n // update text\n const textMark = oldCellGroup.getChildByName('text');\n if (textMark) {\n const text = table.getCellValue(col, row);\n const { text: textArr, moreThanMaxCharacters } = breakString(text, table);\n\n const hierarchyOffset = getHierarchyOffset(col, row, table);\n const lineClamp = cellStyle.lineClamp;\n const padding = getQuadProps(getProp('padding', cellStyle, col, row, table)) ?? [0, 0, 0, 0];\n\n const textAlign = cellTheme.text.textAlign;\n let x = 0;\n if (textAlign === 'center') {\n x = padding[3] + (cellWidth - (padding[1] + padding[3])) / 2;\n } else if (textAlign === 'right') {\n x = padding[3] + cellWidth - (padding[1] + padding[3]);\n } else {\n x = padding[3];\n }\n\n const attribute = {\n text: textArr.length === 1 && !autoWrapText ? textArr[0] : textArr, // 单行(no-autoWrapText)为字符串,多行(autoWrapText)为字符串数组\n moreThanMaxCharacters,\n maxLineWidth: cellWidth - (padding[1] + padding[3] + hierarchyOffset),\n // fill: true,\n // textAlign: 'left',\n textBaseline: 'top',\n autoWrapText,\n lineClamp,\n wordBreak: 'break-word',\n // widthLimit: autoColWidth ? -1 : colWidth - (padding[1] + padding[3]),\n heightLimit: cellHeight - Math.floor(padding[0] + padding[2]),\n pickable: false,\n dx: textAlign === 'left' ? hierarchyOffset : 0,\n x\n };\n // const oldText = textMark.attribute.text;\n textMark.setAttributes(cellTheme.text ? (Object.assign({}, cellTheme.text, attribute) as any) : attribute);\n if (textMark.attribute.text) {\n const textBaseline = cellTheme.text.textBaseline;\n const height = cellHeight - (padding[0] + padding[2]);\n let y = 0;\n if (textBaseline === 'middle') {\n y = padding[0] + (height - textMark.AABBBounds.height()) / 2;\n } else if (textBaseline === 'bottom') {\n y = padding[0] + height - textMark.AABBBounds.height();\n } else {\n y = padding[0];\n }\n textMark.setAttributes({\n y\n });\n }\n }\n return oldCellGroup;\n }\n\n if (!addNew && oldCellGroup.role === 'empty') {\n return undefined;\n }\n\n const type = table.isHeader(col, row)\n ? (table._getHeaderLayoutMap(col, row) as HeaderData).headerType\n : table.getBodyColumnType(col, row);\n\n const mayHaveIcon =\n cellLocation !== 'body'\n ? true\n : (define as IRowSeriesNumber)?.dragOrder || !!define?.icon || !!(define as ColumnDefine)?.tree;\n const padding = cellTheme._vtable.padding;\n const textAlign = cellTheme.text.textAlign;\n const textBaseline = cellTheme.text.textBaseline;\n\n let newCellGroup;\n // let bgColorFunc: Function;\n // 判断是否有mapping 遍历dataset中mappingRules\n // if ((table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules && !table.isHeader(col, row)) {\n // (table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules?.forEach(\n // (mappingRule: MappingRule, i: number) => {\n // if (\n // mappingRule.bgColor &&\n // (table.internalProps.layoutMap as PivotHeaderLayoutMap).getIndicatorKey(col, row) ===\n // mappingRule.bgColor.indicatorKey\n // ) {\n // bgColorFunc = mappingRule.bgColor.mapping;\n // }\n // }\n // );\n // }\n\n let cellWidth;\n let cellHeight;\n if (range) {\n cellWidth = table.getColsWidth(range.start.col, range.end.col);\n cellHeight = table.getRowsHeight(range.start.row, range.end.row);\n } else {\n cellWidth = table.getColWidth(col);\n cellHeight = table.getRowHeight(row);\n }\n\n // deal with promise data\n if (isPromise(value)) {\n // clear cell content sync\n oldCellGroup.removeAllChild();\n\n // update cell content async\n dealPromiseData(\n value,\n table,\n updateCellContent.bind(\n null,\n type,\n value,\n define,\n table,\n col,\n row,\n // bgColorFunc,\n cellWidth,\n cellHeight,\n oldCellGroup,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n addNew,\n cellTheme,\n range,\n customResult\n )\n );\n } else {\n newCellGroup = updateCellContent(\n type,\n value,\n define as ColumnDefine,\n table,\n col,\n row,\n // bgColorFunc,\n cellWidth,\n cellHeight,\n oldCellGroup,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n addNew,\n cellTheme,\n range,\n customResult\n );\n }\n\n if (isMerge) {\n // const rangeHeight = table.getRowHeight(row);\n // const rangeWidth = table.getColWidth(col);\n\n const { width: contentWidth } = newCellGroup.attribute;\n const { height: contentHeight } = newCellGroup.attribute;\n newCellGroup.contentWidth = contentWidth;\n newCellGroup.contentHeight = contentHeight;\n\n dealWithMergeCellSize(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table);\n }\n\n return newCellGroup;\n}\n\nfunction updateCellContent(\n type: ColumnTypeOption,\n value: string,\n define: ColumnDefine,\n table: BaseTableAPI,\n col: number,\n row: number,\n // bgColorFunc: Function,\n cellWidth: number,\n cellHeight: number,\n oldCellGroup: Group,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n mayHaveIcon: boolean,\n addNew: boolean,\n cellTheme: IThemeSpec,\n range: CellRange | undefined,\n customResult?: {\n elementsGroup: VGroup;\n renderDefault: boolean;\n }\n) {\n if (isPromise(value)) {\n value = table.getCellValue(col, row);\n }\n //解决报错 getCellByCache递归调用 死循环问题\n if (!addNew && (oldCellGroup.row !== row || oldCellGroup.col !== col)) {\n return null;\n }\n const newCellGroup = createCell(\n type,\n value,\n define,\n table,\n col,\n row,\n table.getColWidth(col),\n cellWidth,\n cellHeight,\n // oldCellGroup.parent,\n addNew ? table.scenegraph.getColGroup(col) : oldCellGroup.parent,\n // oldCellGroup.attribute.y,\n addNew ? 0 : table.scenegraph.getCellGroupY(row), // y\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n cellTheme,\n range,\n customResult\n );\n if (!addNew && oldCellGroup.parent) {\n oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup);\n oldCellGroup.parent.removeChild(oldCellGroup);\n\n // update cache\n if (table.scenegraph?.proxy.cellCache.get(col)) {\n table.scenegraph?.proxy.cellCache.set(col, newCellGroup);\n }\n }\n return newCellGroup;\n}\n\nfunction canUseFastUpdate(col: number, row: number, oldCellGroup: Group, autoWrapText: boolean, table: BaseTableAPI) {\n // return false;\n const define = table.getBodyColumnDefine(col, row);\n const mayHaveIcon = !!define?.icon || !!(define as ColumnDefine)?.tree || (define as IRowSeriesNumber)?.dragOrder;\n const cellType = table.getBodyColumnType(col, row);\n // const autoRowHeight = table.heightMode === 'autoHeight';\n const autoRowHeight = table.isAutoRowHeight(row);\n const value = table.getCellValue(col, row);\n\n if (\n !table.isHeader(col, row) &&\n oldCellGroup.role === 'cell' &&\n cellType === 'text' &&\n !autoWrapText &&\n !autoRowHeight &&\n !mayHaveIcon &&\n oldCellGroup.firstChild?.type === 'text' &&\n !isPromise(value)\n ) {\n return true;\n }\n return false;\n}\n\nexport function dealWithMergeCellSize(\n range: CellRange,\n cellWidth: number,\n cellHeight: number,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n table: BaseTableAPI\n) {\n for (let col = range.start.col; col <= range.end.col; col++) {\n for (let row = range.start.row; row <= range.end.row; row++) {\n const cellGroup = table.scenegraph.getCell(col, row, true);\n\n if (cellGroup.role === 'cell' && range.start.row !== range.end.row && cellGroup.contentWidth !== cellWidth) {\n updateCellContentHeight(\n cellGroup,\n cellHeight,\n cellHeight,\n // table.heightMode === 'autoHeight',\n table.isAutoRowHeight(row),\n padding,\n textAlign,\n textBaseline\n // 'middle'\n );\n }\n if (cellGroup.role === 'cell' && range.start.col !== range.end.col && cellGroup.contentHeight !== cellHeight) {\n updateCellContentWidth(\n cellGroup,\n cellWidth,\n cellHeight,\n 0,\n // table.heightMode === 'autoHeight',\n table.isAutoRowHeight(row),\n padding,\n textAlign,\n textBaseline,\n table.scenegraph\n );\n }\n\n cellGroup.contentWidth = cellWidth;\n cellGroup.contentHeight = cellHeight;\n\n const rangeHeight = table.getRowHeight(row);\n const rangeWidth = table.getColWidth(col);\n\n resizeCellGroup(cellGroup, rangeWidth, rangeHeight, range, table);\n }\n }\n}\n\nexport function resizeCellGroup(\n cellGroup: Group,\n rangeWidth: number,\n rangeHeight: number,\n range: CellRange,\n table: BaseTableAPI\n) {\n const { col, row } = cellGroup;\n const dx = -table.getColsWidth(range.start.col, col - 1);\n const dy = -table.getRowsHeight(range.start.row, row - 1);\n\n cellGroup.forEachChildren((child: IGraphic) => {\n // 利用_dx hack解决掉 合并单元格的范围内的格子依次执行该方法 如果挨个调用updateCell的话 执行多次后dx累计问题\n if (typeof child._dx === 'number') {\n child.setAttributes({\n dx: (child._dx ?? 0) + dx\n });\n } else {\n child._dx = child.attribute.dx ?? 0;\n child.setAttributes({\n dx: (child.attribute.dx ?? 0) + dx\n });\n }\n\n if (typeof child._dy === 'number') {\n child.setAttributes({\n dy: (child._dy ?? 0) + dy\n });\n } else {\n child._dy = child.attribute.dy ?? 0;\n child.setAttributes({\n dy: (child.attribute.dy ?? 0) + dy\n });\n }\n });\n\n const lineWidth = (cellGroup.attribute as any).strokeArrayWidth ?? cellGroup.attribute.lineWidth;\n const isLineWidthArray = isArray(lineWidth);\n const newLineWidth = [0, 0, 0, 0];\n\n if (col === range.start.col) {\n newLineWidth[3] = isLineWidthArray ? lineWidth[3] : lineWidth;\n }\n if (row === range.start.row) {\n newLineWidth[0] = isLineWidthArray ? lineWidth[0] : lineWidth;\n }\n if (col === range.end.col) {\n newLineWidth[1] = isLineWidthArray ? lineWidth[1] : lineWidth;\n }\n if (row === range.end.row) {\n newLineWidth[2] = isLineWidthArray ? lineWidth[2] : lineWidth;\n }\n\n const widthChange = rangeWidth !== cellGroup.attribute.width;\n const heightChange = rangeHeight !== cellGroup.attribute.height;\n\n cellGroup.setAttributes({\n width: rangeWidth,\n height: rangeHeight,\n strokeArrayWidth: newLineWidth\n } as any);\n\n cellGroup.mergeStartCol = range.start.col;\n cellGroup.mergeStartRow = range.start.row;\n cellGroup.mergeEndCol = range.end.col;\n cellGroup.mergeEndRow = range.end.row;\n\n return {\n widthChange,\n heightChange\n };\n}\n\nexport function getCustomCellMergeCustom(col: number, row: number, cellGroup: Group, table: BaseTableAPI) {\n if (table.internalProps.customMergeCell) {\n const customMerge = table.getCustomMerge(col, row);\n if (customMerge) {\n const {\n range: customMergeRange,\n text: customMergeText,\n style: customMergeStyle,\n customLayout: customMergeLayout,\n customRender: customMergeRender\n } = customMerge;\n\n if (customMergeLayout || customMergeRender) {\n const customResult = dealWithCustom(\n customMergeLayout,\n customMergeRender,\n customMergeRange.start.col,\n customMergeRange.start.row,\n table.getColsWidth(customMergeRange.start.col, customMergeRange.end.col),\n table.getRowsHeight(customMergeRange.start.row, customMergeRange.end.row),\n false,\n // table.heightMode === 'autoHeight',\n table.isAutoRowHeight(row),\n [0, 0, 0, 0],\n customMergeRange,\n table\n );\n\n const customElementsGroup = customResult.elementsGroup;\n\n if (cellGroup.childrenCount > 0 && customElementsGroup) {\n cellGroup.insertBefore(customElementsGroup, cellGroup.firstChild);\n } else if (customElementsGroup) {\n cellGroup.appendChild(customElementsGroup);\n }\n\n const rangeHeight = table.getRowHeight(row);\n const rangeWidth = table.getColWidth(col);\n\n const { width: contentWidth } = cellGroup.attribute;\n const { height: contentHeight } = cellGroup.attribute;\n cellGroup.contentWidth = contentWidth;\n cellGroup.contentHeight = contentHeight;\n\n resizeCellGroup(cellGroup, rangeWidth, rangeHeight, customMergeRange, table);\n\n return customMergeRange;\n }\n }\n }\n\n return undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/scenegraph/group-creater/cell-helper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roup } from './../../vrender';\nimport type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport { regUrl } from '../../tools/global';\nimport type {\n CellRange,\n ChartColumnDefine,\n CheckboxColumnDefine,\n ColumnDefine,\n ColumnTypeOption,\n ImageColumnDefine,\n MappingRule,\n ProgressbarColumnDefine,\n IRowSeriesNumber,\n TextColumnDefine,\n RadioColumnDefine\n} from '../../ts-types';\nimport { dealWithCustom } from '../component/custom';\nimport type { Group } from '../graphic/group';\nimport { getProp } from '../utils/get-prop';\nimport { createChartCellGroup } from './cell-type/chart-cell';\nimport { createImageCellGroup } from './cell-type/image-cell';\nimport { createProgressBarCell } from './cell-type/progress-bar-cell';\nimport { createSparkLineCellGroup } from './cell-type/spark-line-cell';\nimport { createCellGroup } from './cell-type/text-cell';\nimport { createVideoCellGroup } from './cell-type/video-cell';\nimport type { BaseTableAPI, HeaderData, PivotTableProtected } from '../../ts-types/base-table';\nimport { getCellCornerRadius, getStyleTheme } from '../../core/tableHelper';\nimport { isPromise } from '../../tools/helper';\nimport { dealPromiseData } from '../utils/deal-promise-data';\nimport { CartesianAxis } from '../../components/axis/axis';\nimport { createCheckboxCellGroup } from './cell-type/checkbox-cell';\n// import type { PivotLayoutMap } from '../../layout/pivot-layout';\nimport type { PivotHeaderLayoutMap } from '../../layout/pivot-header-layout';\nimport { getHierarchyOffset } from '../utils/get-hierarchy-offset';\nimport { getQuadProps } from '../utils/padding';\nimport { convertInternal } from '../../tools/util';\nimport { updateCellContentHeight, updateCellContentWidth } from '../utils/text-icon-layout';\nimport { isArray } from '@visactor/vutils';\nimport { breakString } from '../utils/break-string';\nimport { createRadioCellGroup } from './cell-type/radio-cell';\n\nexport function createCell(\n type: ColumnTypeOption,\n value: string,\n define: ColumnDefine,\n table: BaseTableAPI,\n col: number,\n row: number,\n colWidth: number,\n cellWidth: number,\n cellHeight: number,\n columnGroup: Group,\n y: number,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n mayHaveIcon: boolean,\n cellTheme: IThemeSpec,\n range: CellRange | undefined,\n customResult?: {\n elementsGroup: VGroup;\n renderDefault: boolean;\n }\n): Group {\n let isAsync = false;\n if (isPromise(value)) {\n value = table.getCellValue(col, row);\n isAsync = true;\n }\n // let bgColorFunc: Function;\n // // 判断是否有mapping 遍历dataset中mappingRules\n // if ((table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules && !table.isHeader(col, row)) {\n // (table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules?.forEach(\n // (mappingRule: MappingRule, i: number) => {\n // if (\n // mappingRule.bgColor &&\n // (table.internalProps.layoutMap as PivotHeaderLayoutMap).getIndicatorKey(col, row) ===\n // mappingRule.bgColor.indicatorKey\n // ) {\n // bgColorFunc = mappingRule.bgColor.mapping;\n // }\n // }\n // );\n // }\n let cellGroup: Group;\n if (type === 'text' || type === 'link') {\n if (type === 'link') {\n //如果是超链接 颜色按照linkColor绘制 TODO:放到方法_getCellStyle中\n // const columnDefine = table.getHeaderDefine(col, row);\n const cellValue = value;\n const headerStyle = table._getCellStyle(col, row);\n\n if (\n type === 'link' &&\n (('templateLink' in define && define.templateLink) ||\n !('linkDetect' in define && define.linkDetect) ||\n regUrl.test(cellValue))\n ) {\n if (cellTheme) {\n cellTheme.text.fill = getProp('linkColor', headerStyle, col, row, table);\n (cellTheme as any).group.cursor = 'pointer';\n } else {\n cellTheme = {\n text: {\n fill: getProp('linkColor', headerStyle, col, row, table)\n },\n group: {\n cursor: 'pointer' as Cursor\n }\n };\n }\n }\n }\n // 判断是否有mapping 遍历dataset中mappingRules 但这里还需要根据fieldName来判断\n // if (bgColorFunc) {\n // const cellValue = table.getCellOriginValue(col, row);\n // const bgColor = bgColorFunc(table, cellValue);\n // if (bgColor) {\n // if (cellTheme) {\n // cellTheme.group.fill = bgColor;\n // } else {\n // cellTheme = {\n // group: {\n // fill: bgColor\n // }\n // };\n // }\n // }\n // }\n\n let customElementsGroup;\n let renderDefault = true;\n if (customResult) {\n customElementsGroup = customResult.elementsGroup;\n renderDefault = customResult.renderDefault;\n } else {\n let customRender;\n let customLayout;\n const cellLocation = table.getCellLocation(col, row);\n if (cellLocation !== 'body') {\n customRender = define?.headerCustomRender;\n customLayout = define?.headerCustomLayout;\n } else {\n customRender = define?.customRender || table.customRender;\n customLayout = define?.customLayout;\n }\n if (customLayout || customRender) {\n const customResult = dealWithCustom(\n customLayout,\n customRender,\n col,\n row,\n cellWidth,\n cellHeight,\n false,\n // table.heightMode === 'autoHeight',\n table.isAutoRowHeight(row),\n padding,\n range,\n table\n );\n customElementsGroup = customResult.elementsGroup;\n renderDefault = customResult.renderDefault;\n }\n }\n\n cellGroup = createCellGroup(\n table,\n value,\n columnGroup,\n 0,\n y,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n customElementsGroup,\n renderDefault,\n cellTheme,\n range,\n isAsync\n );\n\n const axisConfig = table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);\n if (axisConfig) {\n const axis = new CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, padding, table);\n cellGroup.clear();\n cellGroup.appendChild(axis.component);\n axis.overlap();\n } else if (table.internalProps.layoutMap.isEmpty(col, row)) {\n cellGroup.setAttributes({\n fill: false,\n stroke: false\n });\n cellGroup.clear();\n } else if (table.internalProps.layoutMap.isAxisCell(col, row)) {\n cellGroup.clear();\n }\n } else if (type === 'image') {\n // 创建图片单元格\n cellGroup = createImageCellGroup(\n columnGroup,\n 0,\n y,\n col,\n row,\n cellWidth,\n cellHeight,\n (define as ImageColumnDefine).keepAspectRatio,\n (define as ImageColumnDefine).imageAutoSizing,\n padding,\n textAlign,\n textBaseline,\n table,\n cellTheme,\n isAsync\n );\n } else if (type === 'video') {\n // 创建视频单元格\n cellGroup = createVideoCellGroup(\n columnGroup,\n 0,\n y,\n col,\n row,\n cellWidth,\n cellHeight,\n (define as ImageColumnDefine).keepAspectRatio,\n (define as ImageColumnDefine).imageAutoSizing,\n padding,\n textAlign,\n textBaseline,\n table,\n cellTheme,\n isAsync\n );\n } else if (type === 'chart') {\n const chartInstance = table.internalProps.layoutMap.getChartInstance(col, row);\n cellGroup = createChartCellGroup(\n null,\n columnGroup,\n 0,\n y,\n col,\n row,\n cellWidth,\n cellHeight,\n padding,\n value,\n (define as ChartColumnDefine).chartModule,\n table.internalProps.layoutMap.getChartSpec(col, row),\n chartInstance,\n table.internalProps.layoutMap.getChartDataId(col, row) ?? 'data',\n table,\n cellTheme,\n table.internalProps.layoutMap.isShareChartSpec(col, row),\n isAsync\n );\n } else if (type === 'progressbar') {\n const style = table._getCellStyle(col, row) as ProgressBarStyle;\n const dataValue = table.getCellOriginValue(col, row);\n // 创建基础文字单元格\n cellGroup = createCellGroup(\n table,\n value,\n columnGroup,\n 0,\n y,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n padding,\n textAlign,\n textBaseline,\n false,\n null,\n true,\n cellTheme,\n range,\n isAsync\n );\n\n // 创建bar group\n const progressBarGroup = createProgressBarCell(\n define as ProgressbarColumnDefine,\n style,\n colWidth,\n value,\n dataValue,\n col,\n row,\n padding,\n table\n );\n // 进度图插入到文字前,绘制在文字下\n if (cellGroup.firstChild) {\n cellGroup.insertBefore(progressBarGroup, cellGroup.firstChild);\n } else {\n cellGroup.appendChild(progressBarGroup);\n }\n } else if (type === 'sparkline') {\n cellGroup = createSparkLineCellGroup(\n null,\n columnGroup,\n 0,\n y,\n col,\n row,\n cellWidth,\n cellHeight,\n padding,\n table,\n cellTheme,\n isAsync\n );\n } else if (type === 'checkbox') {\n cellGroup = createCheckboxCellGroup(\n null,\n columnGroup,\n 0,\n y,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n padding,\n textAlign,\n textBaseline,\n table,\n cellTheme,\n define as CheckboxColumnDefine,\n isAsync\n );\n } else if (type === 'radio') {\n cellGroup = createRadioCellGroup(\n null,\n columnGroup,\n 0,\n y,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n padding,\n textAlign,\n textBaseline,\n table,\n cellTheme,\n define as RadioColumnDefine\n );\n }\n\n return cellGroup;\n}\n\nexport function updateCell(col: number, row: number, table: BaseTableAPI, addNew?: boolean) {\n // const oldCellGroup = table.scenegraph.getCell(col, row, true);\n const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, true);\n const cellStyle = table._getCellStyle(col, row);\n const autoWrapText = cellStyle.autoWrapText ?? table.internalProps.autoWrapText;\n const cellLocation = table.getCellLocation(col, row);\n let value = table.getCellValue(col, row);\n\n let isMerge;\n let range;\n let cellTheme;\n let customStyle;\n let customResult;\n if (table.internalProps.customMergeCell) {\n const customMerge = table.getCustomMerge(col, row);\n if (customMerge) {\n const {\n range: customMergeRange,\n text: customMergeText,\n style: customMergeStyle,\n customLayout,\n customRender\n } = customMerge;\n range = customMergeRange;\n isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;\n value = customMergeText;\n customStyle = customMergeStyle;\n if (customStyle) {\n cellTheme = getStyleTheme(customStyle, table, range.start.col, range.start.row, getProp).theme;\n cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);\n }\n\n if (customLayout || customRender) {\n customResult = dealWithCustom(\n customLayout,\n customRender,\n customMergeRange.start.col,\n customMergeRange.start.row,\n table.getColsWidth(customMergeRange.start.col, customMergeRange.end.col),\n table.getRowsHeight(customMergeRange.start.row, customMergeRange.end.row),\n false,\n // table.heightMode === 'autoHeight',\n table.isAutoRowHeight(row),\n [0, 0, 0, 0],\n range,\n table\n );\n }\n }\n }\n\n // const define = cellLocation !== 'body' ? table.getHeaderDefine(col, row) : table.getBodyColumnDefine(col, row);\n let colForDefine = col;\n let rowForDefine = row;\n if (range) {\n colForDefine = range.start.col;\n rowForDefine = range.start.row;\n }\n const define =\n cellLocation !== 'body'\n ? table.getHeaderDefine(colForDefine, rowForDefine)\n : table.getBodyColumnDefine(colForDefine, rowForDefine);\n\n if (!range && (cellLocation !== 'body' || (define as TextColumnDefine)?.mergeCell)) {\n // 只有表头或者column配置合并单元格后再进行信息获取\n range = table.getCellRange(col, row);\n isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;\n }\n\n if (!cellTheme) {\n cellTheme = getStyleTheme(\n cellStyle,\n table,\n isMerge ? range.start.col : col,\n isMerge ? range.start.row : row,\n getProp\n ).theme;\n }\n cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);\n\n // fast method for text\n if (!addNew && !isMerge && canUseFastUpdate(col, row, oldCellGroup, autoWrapText, table)) {\n // update group\n const cellWidth = table.getColWidth(col);\n const cellHeight = table.getRowHeight(row);\n oldCellGroup.setAttributes({\n width: cellWidth,\n height: cellHeight,\n // 背景相关,cell背景由cellGroup绘制\n lineWidth: cellTheme?.group?.lineWidth ?? undefined,\n fill: cellTheme?.group?.fill ?? undefined,\n stroke: cellTheme?.group?.stroke ?? undefined,\n strokeArrayWidth: (cellTheme?.group as any)?.strokeArrayWidth ?? undefined,\n strokeArrayColor: (cellTheme?.group as any)?.strokeArrayColor ?? undefined,\n cursor: (cellTheme?.group as any)?.cursor ?? undefined,\n cornerRadius: cellTheme?.group?.cornerRadius ?? 0,\n\n y: table.scenegraph.getCellGroupY(row)\n } as any);\n\n oldCellGroup.forEachChildren((child: IGraphic) => {\n child.setAttributes({\n dx: 0,\n dy: 0\n });\n });\n\n // update text\n const textMark = oldCellGroup.getChildByName('text');\n if (textMark) {\n const text = table.getCellValue(col, row);\n const { text: textArr, moreThanMaxCharacters } = breakString(text, table);\n\n const hierarchyOffset = getHierarchyOffset(col, row, table);\n const lineClamp = cellStyle.lineClamp;\n const padding = getQuadProps(getProp('padding', cellStyle, col, row, table)) ?? [0, 0, 0, 0];\n\n const textAlign = cellTheme.text.textAlign;\n let x = 0;\n if (textAlign === 'center') {\n x = padding[3] + (cellWidth - (padding[1] + padding[3])) / 2;\n } else if (textAlign === 'right') {\n x = padding[3] + cellWidth - (padding[1] + padding[3]);\n } else {\n x = padding[3];\n }\n\n const attribute = {\n text: textArr.length === 1 && !autoWrapText ? textArr[0] : textArr, // 单行(no-autoWrapText)为字符串,多行(autoWrapText)为字符串数组\n moreThanMaxCharacters,\n maxLineWidth: cellWidth - (padding[1] + padding[3] + hierarchyOffset),\n // fill: true,\n // textAlign: 'left',\n textBaseline: 'top',\n autoWrapText,\n lineClamp,\n wordBreak: 'break-word',\n // widthLimit: autoColWidth ? -1 : colWidth - (padding[1] + padding[3]),\n heightLimit: cellHeight - Math.floor(padding[0] + padding[2]),\n pickable: false,\n dx: textAlign === 'left' ? hierarchyOffset : 0,\n x\n };\n // const oldText = textMark.attribute.text;\n textMark.setAttributes(cellTheme.text ? (Object.assign({}, cellTheme.text, attribute) as any) : attribute);\n if (textMark.attribute.text) {\n const textBaseline = cellTheme.text.textBaseline;\n const height = cellHeight - (padding[0] + padding[2]);\n let y = 0;\n if (textBaseline === 'middle') {\n y = padding[0] + (height - textMark.AABBBounds.height()) / 2;\n } else if (textBaseline === 'bottom') {\n y = padding[0] + height - textMark.AABBBounds.height();\n } else {\n y = padding[0];\n }\n textMark.setAttributes({\n y\n });\n }\n }\n return oldCellGroup;\n }\n\n if (!addNew && oldCellGroup.role === 'empty') {\n return undefined;\n }\n\n const type = table.isHeader(col, row)\n ? (table._getHeaderLayoutMap(col, row) as HeaderData).headerType\n : table.getBodyColumnType(col, row);\n\n const mayHaveIcon =\n cellLocation !== 'body'\n ? true\n : (define as IRowSeriesNumber)?.dragOrder || !!define?.icon || !!(define as ColumnDefine)?.tree;\n const padding = cellTheme._vtable.padding;\n const textAlign = cellTheme.text.textAlign;\n const textBaseline = cellTheme.text.textBaseline;\n\n let newCellGroup;\n // let bgColorFunc: Function;\n // 判断是否有mapping 遍历dataset中mappingRules\n // if ((table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules && !table.isHeader(col, row)) {\n // (table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules?.forEach(\n // (mappingRule: MappingRule, i: number) => {\n // if (\n // mappingRule.bgColor &&\n // (table.internalProps.layoutMap as PivotHeaderLayoutMap).getIndicatorKey(col, row) ===\n // mappingRule.bgColor.indicatorKey\n // ) {\n // bgColorFunc = mappingRule.bgColor.mapping;\n // }\n // }\n // );\n // }\n\n let cellWidth;\n let cellHeight;\n if (range) {\n cellWidth = table.getColsWidth(range.start.col, range.end.col);\n cellHeight = table.getRowsHeight(range.start.row, range.end.row);\n } else {\n cellWidth = table.getColWidth(col);\n cellHeight = table.getRowHeight(row);\n }\n\n // deal with promise data\n if (isPromise(value)) {\n // clear cell content sync\n oldCellGroup.removeAllChild();\n\n // update cell content async\n dealPromiseData(\n value,\n table,\n updateCellContent.bind(\n null,\n type,\n value,\n define,\n table,\n col,\n row,\n // bgColorFunc,\n cellWidth,\n cellHeight,\n oldCellGroup,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n addNew,\n cellTheme,\n range,\n customResult\n )\n );\n } else {\n newCellGroup = updateCellContent(\n type,\n value,\n define as ColumnDefine,\n table,\n col,\n row,\n // bgColorFunc,\n cellWidth,\n cellHeight,\n oldCellGroup,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n addNew,\n cellTheme,\n range,\n customResult\n );\n }\n\n if (isMerge) {\n // const rangeHeight = table.getRowHeight(row);\n // const rangeWidth = table.getColWidth(col);\n\n const { width: contentWidth } = newCellGroup.attribute;\n const { height: contentHeight } = newCellGroup.attribute;\n newCellGroup.contentWidth = contentWidth;\n newCellGroup.contentHeight = contentHeight;\n\n dealWithMergeCellSize(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table);\n }\n\n return newCellGroup;\n}\n\nfunction updateCellContent(\n type: ColumnTypeOption,\n value: string,\n define: ColumnDefine,\n table: BaseTableAPI,\n col: number,\n row: number,\n // bgColorFunc: Function,\n cellWidth: number,\n cellHeight: number,\n oldCellGroup: Group,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n mayHaveIcon: boolean,\n addNew: boolean,\n cellTheme: IThemeSpec,\n range: CellRange | undefined,\n customResult?: {\n elementsGroup: VGroup;\n renderDefault: boolean;\n }\n) {\n if (isPromise(value)) {\n value = table.getCellValue(col, row);\n }\n //解决报错 getCellByCache递归调用 死循环问题\n if (!addNew && (oldCellGroup.row !== row || oldCellGroup.col !== col)) {\n return null;\n }\n const newCellGroup = createCell(\n type,\n value,\n define,\n table,\n col,\n row,\n table.getColWidth(col),\n cellWidth,\n cellHeight,\n // oldCellGroup.parent,\n addNew ? table.scenegraph.getColGroup(col) : oldCellGroup.parent,\n // oldCellGroup.attribute.y,\n addNew ? 0 : table.scenegraph.getCellGroupY(row), // y\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n cellTheme,\n range,\n customResult\n );\n if (!addNew && oldCellGroup.parent) {\n oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup);\n oldCellGroup.parent.removeChild(oldCellGroup);\n\n // update cache\n if (table.scenegraph?.proxy.cellCache.get(col)) {\n table.scenegraph?.proxy.cellCache.set(col, newCellGroup);\n }\n }\n return newCellGroup;\n}\n\nfunction canUseFastUpdate(col: number, row: number, oldCellGroup: Group, autoWrapText: boolean, table: BaseTableAPI) {\n // return false;\n const define = table.getBodyColumnDefine(col, row);\n const mayHaveIcon = !!define?.icon || !!(define as ColumnDefine)?.tree || (define as IRowSeriesNumber)?.dragOrder;\n const cellType = table.getBodyColumnType(col, row);\n // const autoRowHeight = table.heightMode === 'autoHeight';\n const autoRowHeight = table.isAutoRowHeight(row);\n const value = table.getCellValue(col, row);\n\n if (\n !table.isHeader(col, row) &&\n oldCellGroup.role === 'cell' &&\n cellType === 'text' &&\n !autoWrapText &&\n !autoRowHeight &&\n !mayHaveIcon &&\n oldCellGroup.firstChild?.type === 'text' &&\n !isPromise(value)\n ) {\n return true;\n }\n return false;\n}\n\nexport function dealWithMergeCellSize(\n range: CellRange,\n cellWidth: number,\n cellHeight: number,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n table: BaseTableAPI\n) {\n for (let col = range.start.col; col <= range.end.col; col++) {\n for (let row = range.start.row; row <= range.end.row; row++) {\n const cellGroup = table.scenegraph.getCell(col, row, true);\n\n if (cellGroup.role === 'cell' && range.start.row !== range.end.row && cellGroup.contentHeight !== cellHeight) {\n updateCellContentHeight(\n cellGroup,\n cellHeight,\n cellHeight,\n // table.heightMode === 'autoHeight',\n table.isAutoRowHeight(row),\n padding,\n textAlign,\n textBaseline\n // 'middle'\n );\n }\n if (cellGroup.role === 'cell' && range.start.col !== range.end.col && cellGroup.contentWidth !== cellWidth) {\n updateCellContentWidth(\n cellGroup,\n cellWidth,\n cellHeight,\n 0,\n // table.heightMode === 'autoHeight',\n table.isAutoRowHeight(row),\n padding,\n textAlign,\n textBaseline,\n table.scenegraph\n );\n }\n\n cellGroup.contentWidth = cellWidth;\n cellGroup.contentHeight = cellHeight;\n\n const rangeHeight = table.getRowHeight(row);\n const rangeWidth = table.getColWidth(col);\n\n resizeCellGroup(cellGroup, rangeWidth, rangeHeight, range, table);\n }\n }\n}\n\nexport function resizeCellGroup(\n cellGroup: Group,\n rangeWidth: number,\n rangeHeight: number,\n range: CellRange,\n table: BaseTableAPI\n) {\n const { col, row } = cellGroup;\n const dx = -table.getColsWidth(range.start.col, col - 1);\n const dy = -table.getRowsHeight(range.start.row, row - 1);\n\n cellGroup.forEachChildren((child: IGraphic) => {\n // 利用_dx hack解决掉 合并单元格的范围内的格子依次执行该方法 如果挨个调用updateCell的话 执行多次后dx累计问题\n if (typeof child._dx === 'number') {\n child.setAttributes({\n dx: (child._dx ?? 0) + dx\n });\n } else {\n child._dx = child.attribute.dx ?? 0;\n child.setAttributes({\n dx: (child.attribute.dx ?? 0) + dx\n });\n }\n\n if (typeof child._dy === 'number') {\n child.setAttributes({\n dy: (child._dy ?? 0) + dy\n });\n } else {\n child._dy = child.attribute.dy ?? 0;\n child.setAttributes({\n dy: (child.attribute.dy ?? 0) + dy\n });\n }\n });\n\n const lineWidth = (cellGroup.attribute as any).strokeArrayWidth ?? cellGroup.attribute.lineWidth;\n const isLineWidthArray = isArray(lineWidth);\n const newLineWidth = [0, 0, 0, 0];\n\n if (col === range.start.col) {\n newLineWidth[3] = isLineWidthArray ? lineWidth[3] : lineWidth;\n }\n if (row === range.start.row) {\n newLineWidth[0] = isLineWidthArray ? lineWidth[0] : lineWidth;\n }\n if (col === range.end.col) {\n newLineWidth[1] = isLineWidthArray ? lineWidth[1] : lineWidth;\n }\n if (row === range.end.row) {\n newLineWidth[2] = isLineWidthArray ? lineWidth[2] : lineWidth;\n }\n\n const widthChange = rangeWidth !== cellGroup.attribute.width;\n const heightChange = rangeHeight !== cellGroup.attribute.height;\n\n cellGroup.setAttributes({\n width: rangeWidth,\n height: rangeHeight,\n strokeArrayWidth: newLineWidth\n } as any);\n\n cellGroup.mergeStartCol = range.start.col;\n cellGroup.mergeStartRow = range.start.row;\n cellGroup.mergeEndCol = range.end.col;\n cellGroup.mergeEndRow = range.end.row;\n\n return {\n widthChange,\n heightChange\n };\n}\n\nexport function getCustomCellMergeCustom(col: number, row: number, cellGroup: Group, table: BaseTableAPI) {\n if (table.internalProps.customMergeCell) {\n const customMerge = table.getCustomMerge(col, row);\n if (customMerge) {\n const {\n range: customMergeRange,\n text: customMergeText,\n style: customMergeStyle,\n customLayout: customMergeLayout,\n customRender: customMergeRender\n } = customMerge;\n\n if (customMergeLayout || customMergeRender) {\n const customResult = dealWithCustom(\n customMergeLayout,\n customMergeRender,\n customMergeRange.start.col,\n customMergeRange.start.row,\n table.getColsWidth(customMergeRange.start.col, customMergeRange.end.col),\n table.getRowsHeight(customMergeRange.start.row, customMergeRange.end.row),\n false,\n // table.heightMode === 'autoHeight',\n table.isAutoRowHeight(row),\n [0, 0, 0, 0],\n customMergeRange,\n table\n );\n\n const customElementsGroup = customResult.elementsGroup;\n\n if (cellGroup.childrenCount > 0 && customElementsGroup) {\n cellGroup.insertBefore(customElementsGroup, cellGroup.firstChild);\n } else if (customElementsGroup) {\n cellGroup.appendChild(customElementsGroup);\n }\n\n const rangeHeight = table.getRowHeight(row);\n const rangeWidth = table.getColWidth(col);\n\n const { width: contentWidth } = cellGroup.attribute;\n const { height: contentHeight } = cellGroup.attribute;\n cellGroup.contentWidth = contentWidth;\n cellGroup.contentHeight = contentHeight;\n\n resizeCellGroup(cellGroup, rangeWidth, rangeHeight, customMergeRange, table);\n\n return customMergeRange;\n }\n }\n }\n\n return undefined;\n}\n"]}
|
|
@@ -13,8 +13,12 @@ function dealFrozen(scene) {
|
|
|
13
13
|
scene.cornerHeaderGroup.setAttribute("height", scene.colHeaderGroup.attribute.height);
|
|
14
14
|
for (let i = 0; i < scene.table.frozenColCount - scene.table.rowHeaderLevelCount; i++) moveColumnFromBodyToRowHeader(scene),
|
|
15
15
|
moveColumnFromColHeaderToCornerHeader(scene), moveColumnFromBottomToLeftBottomCorner(scene);
|
|
16
|
-
} else if (scene.table.frozenColCount < scene.table.rowHeaderLevelCount)
|
|
17
|
-
|
|
16
|
+
} else if (scene.table.frozenColCount < scene.table.rowHeaderLevelCount) {
|
|
17
|
+
scene.bodyGroup.setAttribute("height", scene.rowHeaderGroup.attribute.height), scene.bodyGroup.setAttribute("y", scene.rowHeaderGroup.attribute.y),
|
|
18
|
+
scene.colHeaderGroup.setAttribute("height", scene.cornerHeaderGroup.attribute.height);
|
|
19
|
+
for (let i = 0; i < scene.table.rowHeaderLevelCount - scene.table.frozenColCount; i++) moveColumnFromRowHeaderToBody(scene),
|
|
20
|
+
moveColumnFromCornerHeaderToColHeader(scene), moveColumnFromLeftBottomCornerToBottom(scene);
|
|
21
|
+
}
|
|
18
22
|
scene.bodyGroup.setAttribute("x", scene.rowHeaderGroup.attribute.width), scene.colHeaderGroup.setAttribute("x", scene.cornerHeaderGroup.attribute.width),
|
|
19
23
|
scene.updateContainer(), scene.updateBorderSizeAndPosition(), scene.isPivot || scene.table.transpose ? scene.table.options.frozenColCount ? scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1) : scene.table.options.frozenColCount && scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount) : (scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1),
|
|
20
24
|
scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount)),
|
|
@@ -23,8 +27,12 @@ function dealFrozen(scene) {
|
|
|
23
27
|
|
|
24
28
|
function resetFrozen(scene) {
|
|
25
29
|
var _a, _b;
|
|
26
|
-
if (scene.frozenColCount > scene.table.frozenColCount)
|
|
27
|
-
|
|
30
|
+
if (scene.frozenColCount > scene.table.frozenColCount) {
|
|
31
|
+
scene.bodyGroup.setAttribute("height", scene.rowHeaderGroup.attribute.height), scene.bodyGroup.setAttribute("y", scene.rowHeaderGroup.attribute.y),
|
|
32
|
+
scene.colHeaderGroup.setAttribute("height", scene.cornerHeaderGroup.attribute.height);
|
|
33
|
+
for (let i = 0; i < scene.frozenColCount - scene.table.frozenColCount; i++) moveColumnFromRowHeaderToBody(scene),
|
|
34
|
+
moveColumnFromCornerHeaderToColHeader(scene), moveColumnFromLeftBottomCornerToBottom(scene);
|
|
35
|
+
} else if (scene.frozenColCount < scene.table.frozenColCount) {
|
|
28
36
|
scene.rowHeaderGroup.setAttribute("height", scene.bodyGroup.attribute.height), scene.rowHeaderGroup.setAttribute("y", scene.bodyGroup.attribute.y),
|
|
29
37
|
scene.cornerHeaderGroup.setAttribute("height", scene.colHeaderGroup.attribute.height);
|
|
30
38
|
for (let i = 0; i < scene.table.frozenColCount - scene.frozenColCount; i++) moveColumnFromBodyToRowHeader(scene),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/layout/frozen.ts"],"names":[],"mappings":";;;AAAA,wDAAuD;AACvD,4CAAyC;AACzC,oDAAyD;AAEzD,gDAA4C;AAE5C,SAAgB,UAAU,CAAC,KAAiB;;IAC1C,IAAI,KAAK,CAAC,KAAK,CAAC,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC,mBAAm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AE;oBAC3D,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;oBAC/B,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;gBACzC,CAAC,CAAC,CAAC;aACJ;SACF;KACF;IAED,iBAAiB,CAAC,YAAY,CAC5B,QAAQ,EACR,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,GAAG,mBAAmB,EAAE,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAC9E,CAAC;IACF,qBAAqB,CAAC,YAAY,CAChC,QAAQ,EACR,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,GAAG,mBAAmB,EAAE,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAC9E,CAAC;IACF,sBAAsB,CAAC,YAAY,CACjC,QAAQ,EACR,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,GAAG,mBAAmB,EAAE,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAC9E,CAAC;IAEF,KAAK,CAAC,aAAa,CAAC,oBAAoB,GAAG,mBAAmB,CAAC;IAC/D,KAAK,CAAC,eAAe,EAAE,CAAC;IACxB,KAAK,CAAC,SAAS,CAAC,eAAe,EAAE,CAAC;IAClC,KAAK,CAAC,eAAe,EAAE,CAAC;AAC1B,CAAC;AAjLD,4CAiLC;AAED,SAAS,YAAY,CAAC,SAAgB,EAAE,OAAc,EAAE,WAAkB;IACxE,IAAI,CAAC,OAAO,IAAI,CAAC,SAAS,EAAE;QAC1B,OAAO;KACR;IACD,IAAI,WAAW,EAAE;QACf,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;KAC9C;SAAM;QACL,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;KAChC;AACH,CAAC","file":"frozen.js","sourcesContent":["import { getStyleTheme } from '../../core/tableHelper';\nimport { Group } from '../graphic/group';\nimport { createColGroup } from '../group-creater/column';\nimport type { Scenegraph } from '../scenegraph';\nimport { getProp } from '../utils/get-prop';\n\nexport function dealFrozen(scene: Scenegraph) {\n if (scene.table.frozenColCount > scene.table.rowHeaderLevelCount) {\n // 将对应列移入rowHeaderGroup\n scene.rowHeaderGroup.setAttribute('height', scene.bodyGroup.attribute.height);\n scene.rowHeaderGroup.setAttribute('y', scene.bodyGroup.attribute.y);\n scene.cornerHeaderGroup.setAttribute('height', scene.colHeaderGroup.attribute.height);\n for (let i = 0; i < scene.table.frozenColCount - scene.table.rowHeaderLevelCount; i++) {\n moveColumnFromBodyToRowHeader(scene);\n moveColumnFromColHeaderToCornerHeader(scene);\n moveColumnFromBottomToLeftBottomCorner(scene);\n }\n } else if (scene.table.frozenColCount < scene.table.rowHeaderLevelCount) {\n // move columnGroup from rowHeaderGroup into bodyGroup(from cornerHeaderGroup into colHeaderGroup)\n for (let i = 0; i < scene.table.rowHeaderLevelCount - scene.table.frozenColCount; i++) {\n moveColumnFromRowHeaderToBody(scene);\n moveColumnFromCornerHeaderToColHeader(scene);\n moveColumnFromLeftBottomCornerToBottom(scene);\n }\n }\n scene.bodyGroup.setAttribute('x', scene.rowHeaderGroup.attribute.width);\n scene.colHeaderGroup.setAttribute('x', scene.cornerHeaderGroup.attribute.width);\n\n scene.updateContainer();\n scene.updateBorderSizeAndPosition();\n\n if (!scene.isPivot && !(scene.table as any).transpose) {\n scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1);\n scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);\n } else if (scene.table.options.frozenColCount) {\n scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1);\n } else if (scene.table.options.frozenColCount) {\n scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);\n }\n scene.hasFrozen = true;\n\n // scene.frozenColCount = scene.rowHeaderGroup.childrenCount;\n scene.frozenColCount = scene.table.frozenColCount;\n scene.frozenRowCount = scene.colHeaderGroup.firstChild?.childrenCount ?? 0;\n}\n\nexport function resetFrozen(scene: Scenegraph) {\n if (scene.frozenColCount > scene.table.frozenColCount) {\n // move columnGroup from rowHeaderGroup into bodyGroup(from cornerHeaderGroup into colHeaderGroup)\n for (let i = 0; i < scene.frozenColCount - scene.table.frozenColCount; i++) {\n moveColumnFromRowHeaderToBody(scene);\n moveColumnFromCornerHeaderToColHeader(scene);\n moveColumnFromLeftBottomCornerToBottom(scene);\n }\n } else if (scene.frozenColCount < scene.table.frozenColCount) {\n // move columnGroup from bodyGroup into rowHeaderGroup(from colHeaderGroup into cornerHeaderGroup)\n scene.rowHeaderGroup.setAttribute('height', scene.bodyGroup.attribute.height);\n scene.rowHeaderGroup.setAttribute('y', scene.bodyGroup.attribute.y);\n scene.cornerHeaderGroup.setAttribute('height', scene.colHeaderGroup.attribute.height);\n for (let i = 0; i < scene.table.frozenColCount - scene.frozenColCount; i++) {\n moveColumnFromBodyToRowHeader(scene);\n moveColumnFromColHeaderToCornerHeader(scene);\n moveColumnFromBottomToLeftBottomCorner(scene);\n }\n }\n\n scene.deleteAllSelectBorder();\n scene.table.stateManager.select.ranges.forEach(range => {\n scene.updateCellSelectBorder(range);\n });\n\n // scene.frozenColCount = scene.rowHeaderGroup.childrenCount;\n scene.frozenColCount = scene.table.frozenColCount;\n scene.frozenRowCount = scene.colHeaderGroup.firstChild?.childrenCount ?? 0;\n scene.proxy.colStart = scene.table.frozenColCount;\n\n scene.bodyGroup.setAttribute('x', scene.rowHeaderGroup.attribute.width);\n scene.colHeaderGroup.setAttribute('x', scene.cornerHeaderGroup.attribute.width);\n // scene.updateContainerAttrWidthAndX();\n scene.updateContainer();\n scene.updateBorderSizeAndPosition();\n\n if (!scene.isPivot && !(scene.table as any).transpose) {\n scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1);\n scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);\n } else if (scene.table.options.frozenColCount) {\n scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1);\n } else if (scene.table.options.rightFrozenColCount) {\n scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);\n }\n scene.hasFrozen = true;\n}\n\nfunction moveColumnFromBodyToRowHeader(scene: Scenegraph) {\n // deal with bodyGroup\n const column = scene.bodyGroup.firstChild instanceof Group ? scene.bodyGroup.firstChild : null;\n if (column) {\n scene.rowHeaderGroup.appendChild(column);\n // update container width\n scene.rowHeaderGroup.setAttribute('width', scene.rowHeaderGroup.attribute.width + column.attribute.width);\n scene.bodyGroup.setAttribute('width', scene.bodyGroup.attribute.width - column.attribute.width);\n }\n}\n\nfunction moveColumnFromColHeaderToCornerHeader(scene: Scenegraph) {\n // deal width colHeaderGroup\n const headerColumn = scene.colHeaderGroup.firstChild instanceof Group ? scene.colHeaderGroup.firstChild : null;\n if (headerColumn) {\n scene.cornerHeaderGroup.appendChild(headerColumn);\n scene.cornerHeaderGroup.setAttribute(\n 'width',\n scene.cornerHeaderGroup.attribute.width + headerColumn.attribute.width\n );\n scene.colHeaderGroup.setAttribute('width', scene.colHeaderGroup.attribute.width - headerColumn.attribute.width);\n }\n}\n\nfunction moveColumnFromRowHeaderToBody(scene: Scenegraph) {\n const column =\n scene.rowHeaderGroup.lastChild instanceof Group\n ? scene.rowHeaderGroup.lastChild\n : (scene.rowHeaderGroup.lastChild?._prev as Group);\n if (column) {\n insertBefore(scene.bodyGroup, column, scene.bodyGroup.firstChild as Group);\n // 更新容器宽度\n scene.bodyGroup.setAttribute('width', scene.bodyGroup.attribute.width + column.attribute.width);\n scene.rowHeaderGroup.setAttribute('width', scene.rowHeaderGroup.attribute.width - column.attribute.width);\n }\n}\n\nfunction moveColumnFromCornerHeaderToColHeader(scene: Scenegraph) {\n // 处理列表头\n const headerColumn =\n scene.cornerHeaderGroup.lastChild instanceof Group\n ? scene.cornerHeaderGroup.lastChild\n : (scene.cornerHeaderGroup.lastChild?._prev as Group);\n if (headerColumn) {\n insertBefore(scene.colHeaderGroup, headerColumn, scene.colHeaderGroup.firstChild as Group);\n scene.colHeaderGroup.setAttribute('width', scene.colHeaderGroup.attribute.width + headerColumn.attribute.width);\n scene.cornerHeaderGroup.setAttribute(\n 'width',\n scene.cornerHeaderGroup.attribute.width - headerColumn.attribute.width\n );\n }\n}\n\nfunction moveColumnFromBottomToLeftBottomCorner(scene: Scenegraph) {\n // deal with bottomFrozenGroup\n const column = scene.bottomFrozenGroup.firstChild instanceof Group ? scene.bottomFrozenGroup.firstChild : null;\n if (column) {\n scene.leftBottomCornerGroup.appendChild(column);\n // update container width\n scene.leftBottomCornerGroup.setAttribute(\n 'width',\n scene.leftBottomCornerGroup.attribute.width + column.attribute.width\n );\n scene.bottomFrozenGroup.setAttribute('width', scene.bottomFrozenGroup.attribute.width - column.attribute.width);\n\n if (scene.table.isPivotChart()) {\n column.forEachChildren((child: Group) => {\n child.setAttributes({\n stroke: false,\n fill: false\n });\n });\n }\n }\n}\n\nfunction moveColumnFromLeftBottomCornerToBottom(scene: Scenegraph) {\n const column =\n scene.leftBottomCornerGroup.lastChild instanceof Group\n ? scene.leftBottomCornerGroup.lastChild\n : (scene.leftBottomCornerGroup.lastChild?._prev as Group);\n if (column) {\n insertBefore(scene.bottomFrozenGroup, column, scene.bottomFrozenGroup.firstChild as Group);\n // 更新容器宽度\n scene.bottomFrozenGroup.setAttribute('width', scene.bottomFrozenGroup.attribute.width + column.attribute.width);\n scene.leftBottomCornerGroup.setAttribute(\n 'width',\n scene.leftBottomCornerGroup.attribute.width - column.attribute.width\n );\n\n if (scene.table.isPivotChart()) {\n column.forEachChildren((child: Group) => {\n const cellStyle = scene.table._getCellStyle(child.col, child.row);\n const range = scene.table.getCellRange(child.col, child.row);\n const cellTheme = getStyleTheme(\n cellStyle,\n scene.table,\n range ? range.start.col : child.col,\n range ? range.start.row : child.row,\n getProp\n ).theme;\n\n child.setAttributes({\n fill: cellTheme?.group?.fill ?? undefined,\n stroke: cellTheme?.group?.stroke ?? undefined\n });\n });\n }\n }\n}\n\nexport function dealRightFrozen(distRightFrozenCol: number, scene: Scenegraph) {\n const {\n table,\n proxy,\n rightTopCornerGroup,\n rightFrozenGroup,\n rightBottomCornerGroup,\n bottomFrozenGroup,\n bodyGroup,\n colHeaderGroup\n } = scene;\n // const distRightFrozenCol = scene.table.rightFrozenColCount;\n const currentRightFrozenCol = scene.table.rightFrozenColCount;\n if (distRightFrozenCol > currentRightFrozenCol) {\n for (let col = table.colCount - currentRightFrozenCol - 1; col >= table.colCount - distRightFrozenCol; col--) {\n const colGroup = scene.getColGroup(col);\n insertBefore(rightFrozenGroup, colGroup, rightFrozenGroup.firstChild as Group);\n const headerColGroup = scene.getColGroup(col, true);\n insertBefore(rightTopCornerGroup, headerColGroup, rightTopCornerGroup.firstChild as Group);\n const bottomColGroup = scene.getColGroupInBottom(col);\n insertBefore(rightBottomCornerGroup, bottomColGroup, rightBottomCornerGroup.firstChild as Group);\n }\n // reset cell y\n let x = 0;\n rightFrozenGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n x = 0;\n rightTopCornerGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n x = 0;\n rightBottomCornerGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n } else if (distRightFrozenCol < currentRightFrozenCol) {\n for (let col = table.colCount - currentRightFrozenCol; col < table.colCount - distRightFrozenCol; col++) {\n const colGroup = scene.getColGroup(col);\n colGroup.setAttribute(\n 'x',\n (bodyGroup.lastChild as Group).attribute.x + table.getColWidth((bodyGroup.lastChild as Group).col)\n );\n bodyGroup.appendChild(colGroup);\n const headerColGroup = scene.getColGroupInRightTopCorner(col);\n headerColGroup.setAttribute(\n 'x',\n (colHeaderGroup.lastChild as Group).attribute.x + table.getColWidth((colHeaderGroup.lastChild as Group).col)\n );\n colHeaderGroup.appendChild(headerColGroup);\n const bottomColGroup = scene.getColGroupInRightBottomCorner(col);\n bottomColGroup.setAttribute(\n 'x',\n (bottomFrozenGroup.lastChild as Group).attribute.x +\n table.getColWidth((bottomFrozenGroup.lastChild as Group).col)\n );\n bottomFrozenGroup.appendChild(bottomColGroup);\n }\n // reset cell y\n let x = 0;\n rightFrozenGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n x = 0;\n rightTopCornerGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n x = 0;\n rightBottomCornerGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n }\n\n // reset right width\n rightFrozenGroup.setAttribute('width', table.getColsWidth(table.colCount - distRightFrozenCol, table.colCount - 1));\n rightTopCornerGroup.setAttribute(\n 'width',\n table.getColsWidth(table.colCount - distRightFrozenCol, table.colCount - 1)\n );\n rightBottomCornerGroup.setAttribute(\n 'width',\n table.getColsWidth(table.colCount - distRightFrozenCol, table.colCount - 1)\n );\n\n table.internalProps.rightFrozenColCount = distRightFrozenCol;\n scene.updateContainer();\n scene.component.updateScrollBar();\n scene.updateNextFrame();\n}\n\nexport function dealBottomFrozen(distBottomFrozenRow: number, scene: Scenegraph) {\n const { table, proxy, bottomFrozenGroup, leftBottomCornerGroup, rightBottomCornerGroup } = scene;\n if (!bottomFrozenGroup.childrenCount) {\n // init bottom\n if (!proxy.table.isPivotChart()) {\n // create left bottom frozen\n createColGroup(\n leftBottomCornerGroup,\n 0,\n 0,\n 0, // colStart\n table.frozenColCount - 1, // colEnd\n 0, // rowStart\n -1, // rowEnd\n 'rowHeader', // isHeader\n table\n );\n createColGroup(\n rightBottomCornerGroup,\n 0,\n 0,\n table.colCount - table.rightFrozenColCount, // colStart\n table.colCount - 1, // colEnd\n 0, // rowStart\n -1, // rowEnd\n 'body', // isHeader\n table\n );\n }\n // create bottomFrozenGroup\n createColGroup(\n bottomFrozenGroup,\n 0,\n 0,\n proxy.colStart, // colStart\n proxy.colEnd, // colEnd\n 0, // rowStart\n -1, // rowEnd\n 'body', // isHeader\n table\n );\n }\n const currentBottomFrozenRow = scene.table.bottomFrozenRowCount;\n if (distBottomFrozenRow > currentBottomFrozenRow) {\n // row header -> left bottom\n for (let col = 0; col < table.frozenColCount; col++) {\n const bottomFrozenColumnGroup = scene.getColGroupInLeftBottomCorner(col);\n // move cell\n for (let row = table.rowCount - currentBottomFrozenRow - 1; row >= table.rowCount - distBottomFrozenRow; row--) {\n const cellGroup = scene.getCell(col, row, true);\n // bottomFrozenColumnGroup.insertBefore(cellGroup, bottomFrozenColumnGroup.firstChild);\n insertBefore(bottomFrozenColumnGroup, cellGroup, bottomFrozenColumnGroup.firstChild as Group);\n }\n // reset cell y\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n // body -> bottom\n for (let col = proxy.colStart; col <= proxy.colEnd; col++) {\n const bottomFrozenColumnGroup = scene.getColGroupInBottom(col);\n // move cell\n for (let row = table.rowCount - currentBottomFrozenRow - 1; row >= table.rowCount - distBottomFrozenRow; row--) {\n const cellGroup = scene.getCell(col, row, true);\n // bottomFrozenColumnGroup.insertBefore(cellGroup, bottomFrozenColumnGroup.firstChild);\n insertBefore(bottomFrozenColumnGroup, cellGroup, bottomFrozenColumnGroup.firstChild as Group);\n }\n // reset cell y\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n if (table.rightFrozenColCount > 0) {\n // right -> right bottom\n for (let col = table.colCount - table.rightFrozenColCount; col < table.colCount; col++) {\n const bottomFrozenColumnGroup = scene.getColGroupInRightBottomCorner(col);\n // move cell\n for (\n let row = table.rowCount - currentBottomFrozenRow - 1;\n row >= table.rowCount - distBottomFrozenRow;\n row--\n ) {\n const cellGroup = scene.getCell(col, row, true);\n // bottomFrozenColumnGroup.insertBefore(cellGroup, bottomFrozenColumnGroup.firstChild);\n insertBefore(bottomFrozenColumnGroup, cellGroup, bottomFrozenColumnGroup.firstChild as Group);\n }\n // reset cell y\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n }\n } else if (distBottomFrozenRow < currentBottomFrozenRow) {\n // left bottom -> row header\n for (let col = 0; col < table.rowHeaderLevelCount; col++) {\n const columnGroup = scene.getColGroup(col);\n for (let row = table.rowCount - currentBottomFrozenRow; row < table.rowCount - distBottomFrozenRow; row++) {\n const cellGroup = scene.getCell(col, row, true);\n cellGroup.setAttribute(\n 'y',\n (columnGroup.lastChild as Group).attribute.y + table.getRowHeight((columnGroup.lastChild as Group).row)\n );\n columnGroup.appendChild(cellGroup);\n }\n // reset cell y\n const bottomFrozenColumnGroup = scene.getColGroupInLeftBottomCorner(col);\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n // bottom -> body\n for (let col = proxy.colStart; col <= proxy.colEnd; col++) {\n const columnGroup = scene.getColGroup(col);\n for (let row = table.rowCount - currentBottomFrozenRow; row < table.rowCount - distBottomFrozenRow; row++) {\n const cellGroup = scene.getCell(col, row, true);\n cellGroup.setAttribute(\n 'y',\n (columnGroup.lastChild as Group).attribute.y + table.getRowHeight((columnGroup.lastChild as Group).row)\n );\n columnGroup.appendChild(cellGroup);\n }\n // reset cell y\n const bottomFrozenColumnGroup = scene.getColGroupInBottom(col);\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n if (table.rightFrozenColCount > 0) {\n // right bottom -> right\n for (let col = table.colCount - table.rightFrozenColCount; col < table.colCount; col++) {\n const columnGroup = scene.getColGroup(col);\n for (let row = table.rowCount - currentBottomFrozenRow; row < table.rowCount - distBottomFrozenRow; row++) {\n const cellGroup = scene.getCell(col, row, true);\n cellGroup.setAttribute(\n 'y',\n (columnGroup.lastChild as Group).attribute.y + table.getRowHeight((columnGroup.lastChild as Group).row)\n );\n columnGroup.appendChild(cellGroup);\n }\n // reset cell y\n const bottomFrozenColumnGroup = scene.getColGroupInRightBottomCorner(col);\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n }\n }\n // reset bottom height\n bottomFrozenGroup.setAttribute(\n 'height',\n table.getRowsHeight(table.rowCount - distBottomFrozenRow, table.rowCount - 1)\n );\n leftBottomCornerGroup.setAttribute(\n 'height',\n table.getRowsHeight(table.rowCount - distBottomFrozenRow, table.rowCount - 1)\n );\n rightBottomCornerGroup.setAttribute(\n 'height',\n table.getRowsHeight(table.rowCount - distBottomFrozenRow, table.rowCount - 1)\n );\n\n table.internalProps.bottomFrozenRowCount = distBottomFrozenRow;\n scene.updateContainer();\n scene.component.updateScrollBar();\n scene.updateNextFrame();\n}\n\nfunction insertBefore(container: Group, newNode: Group, targetGroup: Group) {\n if (!newNode || !container) {\n return;\n }\n if (targetGroup) {\n container.insertBefore(newNode, targetGroup);\n } else {\n container.appendChild(newNode);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/scenegraph/layout/frozen.ts"],"names":[],"mappings":";;;AAAA,wDAAuD;AACvD,4CAAyC;AACzC,oDAAyD;AAEzD,gDAA4C;AAE5C,SAAgB,UAAU,CAAC,KAAiB;;IAC1C,IAAI,KAAK,CAAC,KAAK,CAAC,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC,mBAAmB,EAAE;QAEhE,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,MAA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AAa,CAAC,oBAAoB,GAAG,mBAAmB,CAAC;IAC/D,KAAK,CAAC,eAAe,EAAE,CAAC;IACxB,KAAK,CAAC,SAAS,CAAC,eAAe,EAAE,CAAC;IAClC,KAAK,CAAC,eAAe,EAAE,CAAC;AAC1B,CAAC;AAjLD,4CAiLC;AAED,SAAS,YAAY,CAAC,SAAgB,EAAE,OAAc,EAAE,WAAkB;IACxE,IAAI,CAAC,OAAO,IAAI,CAAC,SAAS,EAAE;QAC1B,OAAO;KACR;IACD,IAAI,WAAW,EAAE;QACf,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;KAC9C;SAAM;QACL,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;KAChC;AACH,CAAC","file":"frozen.js","sourcesContent":["import { getStyleTheme } from '../../core/tableHelper';\nimport { Group } from '../graphic/group';\nimport { createColGroup } from '../group-creater/column';\nimport type { Scenegraph } from '../scenegraph';\nimport { getProp } from '../utils/get-prop';\n\nexport function dealFrozen(scene: Scenegraph) {\n if (scene.table.frozenColCount > scene.table.rowHeaderLevelCount) {\n // 将对应列移入rowHeaderGroup\n scene.rowHeaderGroup.setAttribute('height', scene.bodyGroup.attribute.height);\n scene.rowHeaderGroup.setAttribute('y', scene.bodyGroup.attribute.y);\n scene.cornerHeaderGroup.setAttribute('height', scene.colHeaderGroup.attribute.height);\n for (let i = 0; i < scene.table.frozenColCount - scene.table.rowHeaderLevelCount; i++) {\n moveColumnFromBodyToRowHeader(scene);\n moveColumnFromColHeaderToCornerHeader(scene);\n moveColumnFromBottomToLeftBottomCorner(scene);\n }\n } else if (scene.table.frozenColCount < scene.table.rowHeaderLevelCount) {\n // move columnGroup from rowHeaderGroup into bodyGroup(from cornerHeaderGroup into colHeaderGroup)\n scene.bodyGroup.setAttribute('height', scene.rowHeaderGroup.attribute.height);\n scene.bodyGroup.setAttribute('y', scene.rowHeaderGroup.attribute.y);\n scene.colHeaderGroup.setAttribute('height', scene.cornerHeaderGroup.attribute.height);\n for (let i = 0; i < scene.table.rowHeaderLevelCount - scene.table.frozenColCount; i++) {\n moveColumnFromRowHeaderToBody(scene);\n moveColumnFromCornerHeaderToColHeader(scene);\n moveColumnFromLeftBottomCornerToBottom(scene);\n }\n }\n scene.bodyGroup.setAttribute('x', scene.rowHeaderGroup.attribute.width);\n scene.colHeaderGroup.setAttribute('x', scene.cornerHeaderGroup.attribute.width);\n\n scene.updateContainer();\n scene.updateBorderSizeAndPosition();\n\n if (!scene.isPivot && !(scene.table as any).transpose) {\n scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1);\n scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);\n } else if (scene.table.options.frozenColCount) {\n scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1);\n } else if (scene.table.options.frozenColCount) {\n scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);\n }\n scene.hasFrozen = true;\n\n // scene.frozenColCount = scene.rowHeaderGroup.childrenCount;\n scene.frozenColCount = scene.table.frozenColCount;\n scene.frozenRowCount = scene.colHeaderGroup.firstChild?.childrenCount ?? 0;\n}\n\nexport function resetFrozen(scene: Scenegraph) {\n if (scene.frozenColCount > scene.table.frozenColCount) {\n // move columnGroup from rowHeaderGroup into bodyGroup(from cornerHeaderGroup into colHeaderGroup)\n scene.bodyGroup.setAttribute('height', scene.rowHeaderGroup.attribute.height);\n scene.bodyGroup.setAttribute('y', scene.rowHeaderGroup.attribute.y);\n scene.colHeaderGroup.setAttribute('height', scene.cornerHeaderGroup.attribute.height);\n for (let i = 0; i < scene.frozenColCount - scene.table.frozenColCount; i++) {\n moveColumnFromRowHeaderToBody(scene);\n moveColumnFromCornerHeaderToColHeader(scene);\n moveColumnFromLeftBottomCornerToBottom(scene);\n }\n } else if (scene.frozenColCount < scene.table.frozenColCount) {\n // move columnGroup from bodyGroup into rowHeaderGroup(from colHeaderGroup into cornerHeaderGroup)\n scene.rowHeaderGroup.setAttribute('height', scene.bodyGroup.attribute.height);\n scene.rowHeaderGroup.setAttribute('y', scene.bodyGroup.attribute.y);\n scene.cornerHeaderGroup.setAttribute('height', scene.colHeaderGroup.attribute.height);\n for (let i = 0; i < scene.table.frozenColCount - scene.frozenColCount; i++) {\n moveColumnFromBodyToRowHeader(scene);\n moveColumnFromColHeaderToCornerHeader(scene);\n moveColumnFromBottomToLeftBottomCorner(scene);\n }\n }\n\n scene.deleteAllSelectBorder();\n scene.table.stateManager.select.ranges.forEach(range => {\n scene.updateCellSelectBorder(range);\n });\n\n // scene.frozenColCount = scene.rowHeaderGroup.childrenCount;\n scene.frozenColCount = scene.table.frozenColCount;\n scene.frozenRowCount = scene.colHeaderGroup.firstChild?.childrenCount ?? 0;\n scene.proxy.colStart = scene.table.frozenColCount;\n\n scene.bodyGroup.setAttribute('x', scene.rowHeaderGroup.attribute.width);\n scene.colHeaderGroup.setAttribute('x', scene.cornerHeaderGroup.attribute.width);\n // scene.updateContainerAttrWidthAndX();\n scene.updateContainer();\n scene.updateBorderSizeAndPosition();\n\n if (!scene.isPivot && !(scene.table as any).transpose) {\n scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1);\n scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);\n } else if (scene.table.options.frozenColCount) {\n scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1);\n } else if (scene.table.options.rightFrozenColCount) {\n scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);\n }\n scene.hasFrozen = true;\n}\n\nfunction moveColumnFromBodyToRowHeader(scene: Scenegraph) {\n // deal with bodyGroup\n const column = scene.bodyGroup.firstChild instanceof Group ? scene.bodyGroup.firstChild : null;\n if (column) {\n scene.rowHeaderGroup.appendChild(column);\n // update container width\n scene.rowHeaderGroup.setAttribute('width', scene.rowHeaderGroup.attribute.width + column.attribute.width);\n scene.bodyGroup.setAttribute('width', scene.bodyGroup.attribute.width - column.attribute.width);\n }\n}\n\nfunction moveColumnFromColHeaderToCornerHeader(scene: Scenegraph) {\n // deal width colHeaderGroup\n const headerColumn = scene.colHeaderGroup.firstChild instanceof Group ? scene.colHeaderGroup.firstChild : null;\n if (headerColumn) {\n scene.cornerHeaderGroup.appendChild(headerColumn);\n scene.cornerHeaderGroup.setAttribute(\n 'width',\n scene.cornerHeaderGroup.attribute.width + headerColumn.attribute.width\n );\n scene.colHeaderGroup.setAttribute('width', scene.colHeaderGroup.attribute.width - headerColumn.attribute.width);\n }\n}\n\nfunction moveColumnFromRowHeaderToBody(scene: Scenegraph) {\n const column =\n scene.rowHeaderGroup.lastChild instanceof Group\n ? scene.rowHeaderGroup.lastChild\n : (scene.rowHeaderGroup.lastChild?._prev as Group);\n if (column) {\n insertBefore(scene.bodyGroup, column, scene.bodyGroup.firstChild as Group);\n // 更新容器宽度\n scene.bodyGroup.setAttribute('width', scene.bodyGroup.attribute.width + column.attribute.width);\n scene.rowHeaderGroup.setAttribute('width', scene.rowHeaderGroup.attribute.width - column.attribute.width);\n }\n}\n\nfunction moveColumnFromCornerHeaderToColHeader(scene: Scenegraph) {\n // 处理列表头\n const headerColumn =\n scene.cornerHeaderGroup.lastChild instanceof Group\n ? scene.cornerHeaderGroup.lastChild\n : (scene.cornerHeaderGroup.lastChild?._prev as Group);\n if (headerColumn) {\n insertBefore(scene.colHeaderGroup, headerColumn, scene.colHeaderGroup.firstChild as Group);\n scene.colHeaderGroup.setAttribute('width', scene.colHeaderGroup.attribute.width + headerColumn.attribute.width);\n scene.cornerHeaderGroup.setAttribute(\n 'width',\n scene.cornerHeaderGroup.attribute.width - headerColumn.attribute.width\n );\n }\n}\n\nfunction moveColumnFromBottomToLeftBottomCorner(scene: Scenegraph) {\n // deal with bottomFrozenGroup\n const column = scene.bottomFrozenGroup.firstChild instanceof Group ? scene.bottomFrozenGroup.firstChild : null;\n if (column) {\n scene.leftBottomCornerGroup.appendChild(column);\n // update container width\n scene.leftBottomCornerGroup.setAttribute(\n 'width',\n scene.leftBottomCornerGroup.attribute.width + column.attribute.width\n );\n scene.bottomFrozenGroup.setAttribute('width', scene.bottomFrozenGroup.attribute.width - column.attribute.width);\n\n if (scene.table.isPivotChart()) {\n column.forEachChildren((child: Group) => {\n child.setAttributes({\n stroke: false,\n fill: false\n });\n });\n }\n }\n}\n\nfunction moveColumnFromLeftBottomCornerToBottom(scene: Scenegraph) {\n const column =\n scene.leftBottomCornerGroup.lastChild instanceof Group\n ? scene.leftBottomCornerGroup.lastChild\n : (scene.leftBottomCornerGroup.lastChild?._prev as Group);\n if (column) {\n insertBefore(scene.bottomFrozenGroup, column, scene.bottomFrozenGroup.firstChild as Group);\n // 更新容器宽度\n scene.bottomFrozenGroup.setAttribute('width', scene.bottomFrozenGroup.attribute.width + column.attribute.width);\n scene.leftBottomCornerGroup.setAttribute(\n 'width',\n scene.leftBottomCornerGroup.attribute.width - column.attribute.width\n );\n\n if (scene.table.isPivotChart()) {\n column.forEachChildren((child: Group) => {\n const cellStyle = scene.table._getCellStyle(child.col, child.row);\n const range = scene.table.getCellRange(child.col, child.row);\n const cellTheme = getStyleTheme(\n cellStyle,\n scene.table,\n range ? range.start.col : child.col,\n range ? range.start.row : child.row,\n getProp\n ).theme;\n\n child.setAttributes({\n fill: cellTheme?.group?.fill ?? undefined,\n stroke: cellTheme?.group?.stroke ?? undefined\n });\n });\n }\n }\n}\n\nexport function dealRightFrozen(distRightFrozenCol: number, scene: Scenegraph) {\n const {\n table,\n proxy,\n rightTopCornerGroup,\n rightFrozenGroup,\n rightBottomCornerGroup,\n bottomFrozenGroup,\n bodyGroup,\n colHeaderGroup\n } = scene;\n // const distRightFrozenCol = scene.table.rightFrozenColCount;\n const currentRightFrozenCol = scene.table.rightFrozenColCount;\n if (distRightFrozenCol > currentRightFrozenCol) {\n for (let col = table.colCount - currentRightFrozenCol - 1; col >= table.colCount - distRightFrozenCol; col--) {\n const colGroup = scene.getColGroup(col);\n insertBefore(rightFrozenGroup, colGroup, rightFrozenGroup.firstChild as Group);\n const headerColGroup = scene.getColGroup(col, true);\n insertBefore(rightTopCornerGroup, headerColGroup, rightTopCornerGroup.firstChild as Group);\n const bottomColGroup = scene.getColGroupInBottom(col);\n insertBefore(rightBottomCornerGroup, bottomColGroup, rightBottomCornerGroup.firstChild as Group);\n }\n // reset cell y\n let x = 0;\n rightFrozenGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n x = 0;\n rightTopCornerGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n x = 0;\n rightBottomCornerGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n } else if (distRightFrozenCol < currentRightFrozenCol) {\n for (let col = table.colCount - currentRightFrozenCol; col < table.colCount - distRightFrozenCol; col++) {\n const colGroup = scene.getColGroup(col);\n colGroup.setAttribute(\n 'x',\n (bodyGroup.lastChild as Group).attribute.x + table.getColWidth((bodyGroup.lastChild as Group).col)\n );\n bodyGroup.appendChild(colGroup);\n const headerColGroup = scene.getColGroupInRightTopCorner(col);\n headerColGroup.setAttribute(\n 'x',\n (colHeaderGroup.lastChild as Group).attribute.x + table.getColWidth((colHeaderGroup.lastChild as Group).col)\n );\n colHeaderGroup.appendChild(headerColGroup);\n const bottomColGroup = scene.getColGroupInRightBottomCorner(col);\n bottomColGroup.setAttribute(\n 'x',\n (bottomFrozenGroup.lastChild as Group).attribute.x +\n table.getColWidth((bottomFrozenGroup.lastChild as Group).col)\n );\n bottomFrozenGroup.appendChild(bottomColGroup);\n }\n // reset cell y\n let x = 0;\n rightFrozenGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n x = 0;\n rightTopCornerGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n x = 0;\n rightBottomCornerGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n }\n\n // reset right width\n rightFrozenGroup.setAttribute('width', table.getColsWidth(table.colCount - distRightFrozenCol, table.colCount - 1));\n rightTopCornerGroup.setAttribute(\n 'width',\n table.getColsWidth(table.colCount - distRightFrozenCol, table.colCount - 1)\n );\n rightBottomCornerGroup.setAttribute(\n 'width',\n table.getColsWidth(table.colCount - distRightFrozenCol, table.colCount - 1)\n );\n\n table.internalProps.rightFrozenColCount = distRightFrozenCol;\n scene.updateContainer();\n scene.component.updateScrollBar();\n scene.updateNextFrame();\n}\n\nexport function dealBottomFrozen(distBottomFrozenRow: number, scene: Scenegraph) {\n const { table, proxy, bottomFrozenGroup, leftBottomCornerGroup, rightBottomCornerGroup } = scene;\n if (!bottomFrozenGroup.childrenCount) {\n // init bottom\n if (!proxy.table.isPivotChart()) {\n // create left bottom frozen\n createColGroup(\n leftBottomCornerGroup,\n 0,\n 0,\n 0, // colStart\n table.frozenColCount - 1, // colEnd\n 0, // rowStart\n -1, // rowEnd\n 'rowHeader', // isHeader\n table\n );\n createColGroup(\n rightBottomCornerGroup,\n 0,\n 0,\n table.colCount - table.rightFrozenColCount, // colStart\n table.colCount - 1, // colEnd\n 0, // rowStart\n -1, // rowEnd\n 'body', // isHeader\n table\n );\n }\n // create bottomFrozenGroup\n createColGroup(\n bottomFrozenGroup,\n 0,\n 0,\n proxy.colStart, // colStart\n proxy.colEnd, // colEnd\n 0, // rowStart\n -1, // rowEnd\n 'body', // isHeader\n table\n );\n }\n const currentBottomFrozenRow = scene.table.bottomFrozenRowCount;\n if (distBottomFrozenRow > currentBottomFrozenRow) {\n // row header -> left bottom\n for (let col = 0; col < table.frozenColCount; col++) {\n const bottomFrozenColumnGroup = scene.getColGroupInLeftBottomCorner(col);\n // move cell\n for (let row = table.rowCount - currentBottomFrozenRow - 1; row >= table.rowCount - distBottomFrozenRow; row--) {\n const cellGroup = scene.getCell(col, row, true);\n // bottomFrozenColumnGroup.insertBefore(cellGroup, bottomFrozenColumnGroup.firstChild);\n insertBefore(bottomFrozenColumnGroup, cellGroup, bottomFrozenColumnGroup.firstChild as Group);\n }\n // reset cell y\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n // body -> bottom\n for (let col = proxy.colStart; col <= proxy.colEnd; col++) {\n const bottomFrozenColumnGroup = scene.getColGroupInBottom(col);\n // move cell\n for (let row = table.rowCount - currentBottomFrozenRow - 1; row >= table.rowCount - distBottomFrozenRow; row--) {\n const cellGroup = scene.getCell(col, row, true);\n // bottomFrozenColumnGroup.insertBefore(cellGroup, bottomFrozenColumnGroup.firstChild);\n insertBefore(bottomFrozenColumnGroup, cellGroup, bottomFrozenColumnGroup.firstChild as Group);\n }\n // reset cell y\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n if (table.rightFrozenColCount > 0) {\n // right -> right bottom\n for (let col = table.colCount - table.rightFrozenColCount; col < table.colCount; col++) {\n const bottomFrozenColumnGroup = scene.getColGroupInRightBottomCorner(col);\n // move cell\n for (\n let row = table.rowCount - currentBottomFrozenRow - 1;\n row >= table.rowCount - distBottomFrozenRow;\n row--\n ) {\n const cellGroup = scene.getCell(col, row, true);\n // bottomFrozenColumnGroup.insertBefore(cellGroup, bottomFrozenColumnGroup.firstChild);\n insertBefore(bottomFrozenColumnGroup, cellGroup, bottomFrozenColumnGroup.firstChild as Group);\n }\n // reset cell y\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n }\n } else if (distBottomFrozenRow < currentBottomFrozenRow) {\n // left bottom -> row header\n for (let col = 0; col < table.rowHeaderLevelCount; col++) {\n const columnGroup = scene.getColGroup(col);\n for (let row = table.rowCount - currentBottomFrozenRow; row < table.rowCount - distBottomFrozenRow; row++) {\n const cellGroup = scene.getCell(col, row, true);\n cellGroup.setAttribute(\n 'y',\n (columnGroup.lastChild as Group).attribute.y + table.getRowHeight((columnGroup.lastChild as Group).row)\n );\n columnGroup.appendChild(cellGroup);\n }\n // reset cell y\n const bottomFrozenColumnGroup = scene.getColGroupInLeftBottomCorner(col);\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n // bottom -> body\n for (let col = proxy.colStart; col <= proxy.colEnd; col++) {\n const columnGroup = scene.getColGroup(col);\n for (let row = table.rowCount - currentBottomFrozenRow; row < table.rowCount - distBottomFrozenRow; row++) {\n const cellGroup = scene.getCell(col, row, true);\n cellGroup.setAttribute(\n 'y',\n (columnGroup.lastChild as Group).attribute.y + table.getRowHeight((columnGroup.lastChild as Group).row)\n );\n columnGroup.appendChild(cellGroup);\n }\n // reset cell y\n const bottomFrozenColumnGroup = scene.getColGroupInBottom(col);\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n if (table.rightFrozenColCount > 0) {\n // right bottom -> right\n for (let col = table.colCount - table.rightFrozenColCount; col < table.colCount; col++) {\n const columnGroup = scene.getColGroup(col);\n for (let row = table.rowCount - currentBottomFrozenRow; row < table.rowCount - distBottomFrozenRow; row++) {\n const cellGroup = scene.getCell(col, row, true);\n cellGroup.setAttribute(\n 'y',\n (columnGroup.lastChild as Group).attribute.y + table.getRowHeight((columnGroup.lastChild as Group).row)\n );\n columnGroup.appendChild(cellGroup);\n }\n // reset cell y\n const bottomFrozenColumnGroup = scene.getColGroupInRightBottomCorner(col);\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n }\n }\n // reset bottom height\n bottomFrozenGroup.setAttribute(\n 'height',\n table.getRowsHeight(table.rowCount - distBottomFrozenRow, table.rowCount - 1)\n );\n leftBottomCornerGroup.setAttribute(\n 'height',\n table.getRowsHeight(table.rowCount - distBottomFrozenRow, table.rowCount - 1)\n );\n rightBottomCornerGroup.setAttribute(\n 'height',\n table.getRowsHeight(table.rowCount - distBottomFrozenRow, table.rowCount - 1)\n );\n\n table.internalProps.bottomFrozenRowCount = distBottomFrozenRow;\n scene.updateContainer();\n scene.component.updateScrollBar();\n scene.updateNextFrame();\n}\n\nfunction insertBefore(container: Group, newNode: Group, targetGroup: Group) {\n if (!newNode || !container) {\n return;\n }\n if (targetGroup) {\n container.insertBefore(newNode, targetGroup);\n } else {\n container.appendChild(newNode);\n }\n}\n"]}
|
package/cjs/themes/theme.js
CHANGED
|
@@ -358,6 +358,12 @@ class TableTheme {
|
|
|
358
358
|
get color() {
|
|
359
359
|
var _a;
|
|
360
360
|
return null !== (_a = tooltip.color) && void 0 !== _a ? _a : "#FFF";
|
|
361
|
+
},
|
|
362
|
+
get maxWidth() {
|
|
363
|
+
return tooltip.maxWidth;
|
|
364
|
+
},
|
|
365
|
+
get maxHeight() {
|
|
366
|
+
return tooltip.maxHeight;
|
|
361
367
|
}
|
|
362
368
|
};
|
|
363
369
|
}
|