@visactor/vtable 1.9.2-alpha.4 → 1.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/cjs/ListTable.d.ts +1 -0
  2. package/cjs/ListTable.js +7 -3
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/body-helper/style.js +2 -1
  5. package/cjs/components/menu/dom/logic/MenuElement.js +1 -1
  6. package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -1
  7. package/cjs/components/menu/dom/logic/MenuElementStyle.js +1 -1
  8. package/cjs/components/menu/dom/logic/MenuElementStyle.js.map +1 -1
  9. package/cjs/components/title/title.js +3 -3
  10. package/cjs/components/title/title.js.map +1 -1
  11. package/cjs/core/BaseTable.js +2 -3
  12. package/cjs/core/BaseTable.js.map +1 -1
  13. package/cjs/core/TABLE_EVENT_TYPE.d.ts +1 -0
  14. package/cjs/core/TABLE_EVENT_TYPE.js +1 -0
  15. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  16. package/cjs/event/listener/table-group.js +3 -3
  17. package/cjs/event/listener/table-group.js.map +1 -1
  18. package/cjs/index.d.ts +1 -3
  19. package/cjs/index.js +2 -20
  20. package/cjs/index.js.map +1 -1
  21. package/cjs/layout/pivot-header-layout.js +4 -3
  22. package/cjs/layout/pivot-header-layout.js.map +1 -1
  23. package/cjs/plugins/chartModules.js +1 -1
  24. package/cjs/scenegraph/component/menu.d.ts +41 -0
  25. package/cjs/scenegraph/component/util.js +1 -1
  26. package/cjs/scenegraph/component/util.js.map +1 -1
  27. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +5 -5
  28. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  29. package/cjs/scenegraph/graphic/group.js +1 -2
  30. package/cjs/scenegraph/graphic/group.js.map +1 -1
  31. package/cjs/scenegraph/group-creater/cell-helper.js +2 -3
  32. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  33. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +5 -4
  34. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  35. package/cjs/scenegraph/layout/compute-row-height.js +1 -1
  36. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  37. package/cjs/scenegraph/style/frame-border.js +9 -1
  38. package/cjs/scenegraph/style/frame-border.js.map +1 -1
  39. package/cjs/scenegraph/utils/cell-border-stroke-width.js +9 -4
  40. package/cjs/scenegraph/utils/cell-border-stroke-width.js.map +1 -1
  41. package/cjs/scenegraph/utils/text-measure.d.ts +33 -0
  42. package/cjs/state/state.js +18 -8
  43. package/cjs/state/state.js.map +1 -1
  44. package/cjs/tools/style.d.ts +2 -0
  45. package/cjs/tools/style.js +17 -4
  46. package/cjs/tools/style.js.map +1 -1
  47. package/cjs/ts-types/base-table.d.ts +2 -4
  48. package/cjs/ts-types/base-table.js.map +1 -1
  49. package/cjs/ts-types/events.d.ts +6 -0
  50. package/cjs/ts-types/events.js.map +1 -1
  51. package/cjs/vrender.js.map +1 -1
  52. package/dist/vtable.js +8229 -9964
  53. package/dist/vtable.min.js +2 -2
  54. package/es/ListTable.d.ts +1 -0
  55. package/es/ListTable.js +7 -3
  56. package/es/ListTable.js.map +1 -1
  57. package/es/body-helper/style.js +2 -1
  58. package/es/components/menu/dom/logic/MenuElement.js +1 -1
  59. package/es/components/menu/dom/logic/MenuElement.js.map +1 -1
  60. package/es/components/menu/dom/logic/MenuElementStyle.js +1 -1
  61. package/es/components/menu/dom/logic/MenuElementStyle.js.map +1 -1
  62. package/es/components/title/title.js +4 -4
  63. package/es/components/title/title.js.map +1 -1
  64. package/es/core/BaseTable.js +2 -3
  65. package/es/core/BaseTable.js.map +1 -1
  66. package/es/core/TABLE_EVENT_TYPE.d.ts +1 -0
  67. package/es/core/TABLE_EVENT_TYPE.js +1 -0
  68. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  69. package/es/event/listener/table-group.js +3 -3
  70. package/es/event/listener/table-group.js.map +1 -1
  71. package/es/index.d.ts +1 -3
  72. package/es/index.js +1 -5
  73. package/es/index.js.map +1 -1
  74. package/es/layout/pivot-header-layout.js +4 -3
  75. package/es/layout/pivot-header-layout.js.map +1 -1
  76. package/es/plugins/chartModules.js +1 -1
  77. package/es/scenegraph/component/menu.d.ts +41 -0
  78. package/es/scenegraph/component/util.js +1 -1
  79. package/es/scenegraph/component/util.js.map +1 -1
  80. package/es/scenegraph/graphic/contributions/group-contribution-render.js +5 -5
  81. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  82. package/es/scenegraph/graphic/group.js +1 -2
  83. package/es/scenegraph/graphic/group.js.map +1 -1
  84. package/es/scenegraph/group-creater/cell-helper.js +1 -4
  85. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  86. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +5 -4
  87. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  88. package/es/scenegraph/layout/compute-row-height.js +1 -1
  89. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  90. package/es/scenegraph/style/frame-border.js +9 -1
  91. package/es/scenegraph/style/frame-border.js.map +1 -1
  92. package/es/scenegraph/utils/cell-border-stroke-width.js +3 -1
  93. package/es/scenegraph/utils/cell-border-stroke-width.js.map +1 -1
  94. package/es/scenegraph/utils/text-measure.d.ts +33 -0
  95. package/es/state/state.js +18 -8
  96. package/es/state/state.js.map +1 -1
  97. package/es/tools/style.d.ts +2 -0
  98. package/es/tools/style.js +10 -0
  99. package/es/tools/style.js.map +1 -1
  100. package/es/ts-types/base-table.d.ts +2 -4
  101. package/es/ts-types/base-table.js.map +1 -1
  102. package/es/ts-types/events.d.ts +6 -0
  103. package/es/ts-types/events.js.map +1 -1
  104. package/es/vrender.js.map +1 -1
  105. package/package.json +6 -6
  106. package/cjs/plugins/carousel-animation.d.ts +0 -29
  107. package/cjs/plugins/carousel-animation.js +0 -60
  108. package/cjs/plugins/carousel-animation.js.map +0 -1
  109. package/cjs/plugins/invert-highlight.d.ts +0 -19
  110. package/cjs/plugins/invert-highlight.js +0 -72
  111. package/cjs/plugins/invert-highlight.js.map +0 -1
  112. package/cjs/tools/cell-range.d.ts +0 -2
  113. package/cjs/tools/cell-range.js +0 -10
  114. package/cjs/tools/cell-range.js.map +0 -1
  115. package/es/plugins/carousel-animation.d.ts +0 -29
  116. package/es/plugins/carousel-animation.js +0 -52
  117. package/es/plugins/carousel-animation.js.map +0 -1
  118. package/es/plugins/invert-highlight.d.ts +0 -19
  119. package/es/plugins/invert-highlight.js +0 -69
  120. package/es/plugins/invert-highlight.js.map +0 -1
  121. package/es/tools/cell-range.d.ts +0 -2
  122. package/es/tools/cell-range.js +0 -4
  123. package/es/tools/cell-range.js.map +0 -1
@@ -3,4 +3,4 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.chartTypes = void 0, exports.chartTypes = {};
6
- //# sourceMappingURL=chartModules.js.map
6
+ //# sourceMappingURL=chartModules.js.map
@@ -0,0 +1,41 @@
1
+ import type { IGroup } from './../../vrender';
2
+ import type { MenuListItem } from '../../ts-types';
3
+ import { Group } from '../graphic/group';
4
+ import type { BaseTableAPI } from '../../ts-types/base-table';
5
+ export declare enum MenuType {
6
+ 'dropDown' = "dropDown",
7
+ 'contextmenu' = "contextmenu",
8
+ 'custom' = "custom"
9
+ }
10
+ type MenuInfo = MenuListItem[];
11
+ export declare class MenuHandler {
12
+ private _table;
13
+ private _menuInstance;
14
+ private _menuInfo;
15
+ constructor(table: BaseTableAPI);
16
+ bindTableComponent(componentGroup: Group): void;
17
+ release(): void;
18
+ attach(x: number, y: number, col: number, row: number, type: MenuType, menuInfo?: MenuInfo): void;
19
+ updateMenuInfo(col: number, row: number, type: MenuType, menuInfo: MenuListItem[], highlightIndex: number): void;
20
+ checkDropDownMenuChange(col: number, row: number): boolean;
21
+ checkContextMenuChange(x: number, y: number): boolean;
22
+ updateMenuInstance(menuInfo: MenuInfo, highlightIndex: number): void;
23
+ updatePosition(x: number, y: number): void;
24
+ addToScene(): void;
25
+ detach(): void;
26
+ getMenuInfo(col: number, row: number, type: MenuType): {
27
+ menuInfo: MenuListItem[];
28
+ highlightIndex: number;
29
+ };
30
+ bindEvent(): void;
31
+ getEventInfo(target: IGroup): {
32
+ col: number;
33
+ row: number;
34
+ menuKey: string;
35
+ dropDownIndex: number;
36
+ text: string;
37
+ highlight: boolean;
38
+ };
39
+ get bounds(): import("@visactor/vutils").IBounds;
40
+ }
41
+ export {};
@@ -9,7 +9,7 @@ function getColX(col, table, isRightFrozen) {
9
9
  function getRowY(row, table, isBottomFrozen) {
10
10
  if (isBottomFrozen) return Math.min(table.tableNoFrameWidth, table.getAllRowsHeight()) - table.getRowsHeight(row, table.rowCount - 1);
11
11
  let rowY = table.getRowsHeight(0, row);
12
- return row >= table.frozenRowCount && (rowY -= table.scrollLeft), rowY;
12
+ return row >= table.frozenRowCount && (rowY -= table.scrollTop), rowY;
13
13
  }
14
14
 
15
15
  Object.defineProperty(exports, "__esModule", {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/component/util.ts"],"names":[],"mappings":";;;AAEA,SAAgB,OAAO,CAAC,GAAW,EAAE,KAAmB,EAAE,aAAuB;IAC/E,IAAI,aAAa,EAAE;QACjB,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAK,CAAC,eAAe,EAAE,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;KACjH;IACD,IAAI,IAAI,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACtC,IAAI,GAAG,IAAI,KAAK,CAAC,cAAc,EAAE;QAC/B,IAAI,IAAI,KAAK,CAAC,UAAU,CAAC;KAC1B;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AATD,0BASC;AAED,SAAgB,OAAO,CAAC,GAAW,EAAE,KAAmB,EAAE,cAAwB;IAChF,IAAI,cAAc,EAAE;QAClB,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAK,CAAC,gBAAgB,EAAE,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;KACnH;IACD,IAAI,IAAI,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACvC,IAAI,GAAG,IAAI,KAAK,CAAC,cAAc,EAAE;QAC/B,IAAI,IAAI,KAAK,CAAC,UAAU,CAAC;KAC1B;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AATD,0BASC","file":"util.js","sourcesContent":["import type { BaseTableAPI } from '../../ts-types/base-table';\n\nexport function getColX(col: number, table: BaseTableAPI, isRightFrozen?: boolean) {\n if (isRightFrozen) {\n return Math.min(table.tableNoFrameWidth, table.getAllColsWidth()) - table.getColsWidth(col, table.colCount - 1);\n }\n let colX = table.getColsWidth(0, col);\n if (col >= table.frozenColCount) {\n colX -= table.scrollLeft;\n }\n return colX;\n}\n\nexport function getRowY(row: number, table: BaseTableAPI, isBottomFrozen?: boolean) {\n if (isBottomFrozen) {\n return Math.min(table.tableNoFrameWidth, table.getAllRowsHeight()) - table.getRowsHeight(row, table.rowCount - 1);\n }\n let rowY = table.getRowsHeight(0, row);\n if (row >= table.frozenRowCount) {\n rowY -= table.scrollLeft;\n }\n return rowY;\n}\n"]}
1
+ {"version":3,"sources":["../src/scenegraph/component/util.ts"],"names":[],"mappings":";;;AAEA,SAAgB,OAAO,CAAC,GAAW,EAAE,KAAmB,EAAE,aAAuB;IAC/E,IAAI,aAAa,EAAE;QACjB,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAK,CAAC,eAAe,EAAE,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;KACjH;IACD,IAAI,IAAI,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACtC,IAAI,GAAG,IAAI,KAAK,CAAC,cAAc,EAAE;QAC/B,IAAI,IAAI,KAAK,CAAC,UAAU,CAAC;KAC1B;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AATD,0BASC;AAED,SAAgB,OAAO,CAAC,GAAW,EAAE,KAAmB,EAAE,cAAwB;IAChF,IAAI,cAAc,EAAE;QAClB,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAK,CAAC,gBAAgB,EAAE,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;KACnH;IACD,IAAI,IAAI,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACvC,IAAI,GAAG,IAAI,KAAK,CAAC,cAAc,EAAE;QAC/B,IAAI,IAAI,KAAK,CAAC,SAAS,CAAC;KACzB;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AATD,0BASC","file":"util.js","sourcesContent":["import type { BaseTableAPI } from '../../ts-types/base-table';\n\nexport function getColX(col: number, table: BaseTableAPI, isRightFrozen?: boolean) {\n if (isRightFrozen) {\n return Math.min(table.tableNoFrameWidth, table.getAllColsWidth()) - table.getColsWidth(col, table.colCount - 1);\n }\n let colX = table.getColsWidth(0, col);\n if (col >= table.frozenColCount) {\n colX -= table.scrollLeft;\n }\n return colX;\n}\n\nexport function getRowY(row: number, table: BaseTableAPI, isBottomFrozen?: boolean) {\n if (isBottomFrozen) {\n return Math.min(table.tableNoFrameWidth, table.getAllRowsHeight()) - table.getRowsHeight(row, table.rowCount - 1);\n }\n let rowY = table.getRowsHeight(0, row);\n if (row >= table.frozenRowCount) {\n rowY -= table.scrollTop;\n }\n return rowY;\n}\n"]}
@@ -32,21 +32,21 @@ let SplitGroupAfterRenderContribution = class {
32
32
  this.order = 0;
33
33
  }
34
34
  drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb) {
35
- var _a;
35
+ var _a, _b;
36
36
  const {stroke: stroke = groupAttribute.stroke, strokeArrayColor: strokeArrayColor = groupAttribute.strokeArrayColor, strokeArrayWidth: strokeArrayWidth = groupAttribute.strokeArrayWidth, lineWidth: lineWidth = groupAttribute.lineWidth, strokeColor: strokeColor = groupAttribute.stroke, cornerRadius: cornerRadius = groupAttribute.cornerRadius} = group.attribute;
37
37
  let widthForStroke, heightForStroke, {width: width = groupAttribute.width, height: height = groupAttribute.height} = group.attribute;
38
38
  if (stroke && (Array.isArray(strokeArrayWidth) || 0 !== lineWidth) && (Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth))) {
39
39
  if ("number" == typeof lineWidth && 1 & lineWidth || Array.isArray(strokeArrayWidth) && strokeArrayWidth.some((width => 1 & width))) {
40
40
  const table = group.stage.table;
41
41
  if (!table) return;
42
- const bottomRight = "bottom-right" === (null == table ? void 0 : table.theme.cellBorderClipDirection);
42
+ const bottomRight = "bottom-right" === (null === (_a = null == table ? void 0 : table.theme) || void 0 === _a ? void 0 : _a.cellBorderClipDirection);
43
43
  if (bottomRight) {
44
44
  if (x = Math.floor(x) - .5, y = Math.floor(y) - .5, "cell" === group.role) {
45
45
  const col = group.col, row = group.row;
46
46
  0 === col && (x += 1), 0 === row && (y += 1);
47
47
  }
48
48
  } else x = Math.floor(x) + .5, y = Math.floor(y) + .5;
49
- (null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) && (width = Math.round(width),
49
+ (null === (_b = table.options.customConfig) || void 0 === _b ? void 0 : _b._disableColumnAndRowSizeRound) && (width = Math.round(width),
50
50
  height = Math.round(height));
51
51
  const {width: widthFroDraw, height: heightFroDraw} = getCellSizeForDraw(group, Math.ceil(width), Math.ceil(height), bottomRight);
52
52
  widthForStroke = widthFroDraw, heightForStroke = heightFroDraw;
@@ -212,7 +212,7 @@ let AdjustPosGroupAfterRenderContribution = class {
212
212
  this.order = 0;
213
213
  }
214
214
  drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb) {
215
- var _a;
215
+ var _a, _b;
216
216
  const {lineWidth: lineWidth = groupAttribute.lineWidth, stroke: stroke = groupAttribute.stroke, lineDash: lineDash = groupAttribute.lineDash, strokeArrayWidth: strokeArrayWidth = groupAttribute.strokeArrayWidth, strokeArrayColor: strokeArrayColor = groupAttribute.strokeArrayColor, notAdjustPos: notAdjustPos, cornerRadius: cornerRadius = groupAttribute.cornerRadius} = group.attribute;
217
217
  let {width: width = groupAttribute.width, height: height = groupAttribute.height} = group.attribute;
218
218
  if (!0 !== notAdjustPos && stroke && Array.isArray(lineDash) && !lineDash.length && !Array.isArray(strokeArrayColor) && !Array.isArray(strokeArrayWidth) && 1 & lineWidth) {
@@ -220,7 +220,7 @@ let AdjustPosGroupAfterRenderContribution = class {
220
220
  if (!table) return;
221
221
  (null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) && (width = Math.round(width),
222
222
  height = Math.round(height)), context.beginPath();
223
- const bottomRight = "bottom-right" === (null == table ? void 0 : table.theme.cellBorderClipDirection), deltaWidth = 0, deltaHeight = 0;
223
+ const bottomRight = "bottom-right" === (null === (_b = null == table ? void 0 : table.theme) || void 0 === _b ? void 0 : _b.cellBorderClipDirection), deltaWidth = 0, deltaHeight = 0;
224
224
  if (bottomRight) {
225
225
  if (x = Math.floor(x) - .5, y = Math.floor(y) - .5, "cell" === group.role) {
226
226
  0 === group.col && (x += 1), 0 === group.row && (y += 1);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/graphic/contributions/group-contribution-render.ts"],"names":[],"mappings":";;;;;;;;;AAWA,gDAA4F;AAE5F,sEAAuE;AAEvE,+D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AAE;QAChC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;KAC7D;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC","file":"group-contribution-render.js","sourcesContent":["import type {\n IGroup,\n IContext2d,\n IGroupGraphicAttribute,\n IMarkAttribute,\n IGraphicAttribute,\n IThemeAttribute,\n IGroupRenderContribution,\n IDrawContext,\n IRectGraphicAttribute\n} from './../../../vrender';\nimport { BaseRenderContributionTime, injectable, createRectPath } from './../../../vrender';\nimport type { Group } from '../group';\nimport { getCellHoverColor } from '../../../state/hover/is-cell-hover';\nimport type { BaseTableAPI } from '../../../ts-types/base-table';\nimport { getCellMergeInfo } from '../../utils/get-cell-merge';\nimport { InteractionState } from '../../../ts-types';\nimport { isArray } from '@visactor/vutils';\nimport { getCellSelectColor } from '../../../state/select/is-cell-select-highlight';\nimport { renderStrokeWithCornerRadius } from './rect-contribution-render';\n\n// const highlightDash: number[] = [];\n\n// SplitGroupContribution处理分段渲染stroke\n// stroke/strokeArrayWidth/strokeArrayColor 为数组时调用\n@injectable()\nexport class SplitGroupBeforeRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n doFillOrStroke?: { doFill: boolean; doStroke: boolean }\n ) {\n const {\n stroke = groupAttribute.stroke,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor\n // highlightStroke = (groupAttribute as any).highlightStroke,\n // highlightStrokeArrayWidth = (groupAttribute as any).highlightStrokeArrayWidth,\n // width = groupAttribute.width,\n // height = groupAttribute.height,\n } = group.attribute as any;\n\n if (stroke && (Array.isArray(strokeArrayWidth) || Array.isArray(strokeArrayColor))) {\n doFillOrStroke.doStroke = false;\n }\n\n // if (highlightStroke) {\n // // 依据highlightStroke信息调整clip范围,以实现在单个单元格显示highlight border\n // let xDist = x;\n // let yDist = y;\n // let widthDist = width;\n // let heightDist = height;\n // if (highlightStroke[0] && highlightStrokeArrayWidth[0]) {\n // // top\n // yDist -= highlightStrokeArrayWidth[0] / 2;\n // heightDist += highlightStrokeArrayWidth[0] / 2;\n // }\n // if (highlightStroke[1] && highlightStrokeArrayWidth[1]) {\n // // right\n // widthDist += highlightStrokeArrayWidth[1] / 2;\n // }\n // if (highlightStroke[2] && highlightStrokeArrayWidth[2]) {\n // // bottom\n // heightDist += highlightStrokeArrayWidth[2] / 2;\n // }\n // if (highlightStroke[3] && highlightStrokeArrayWidth[3]) {\n // // left\n // xDist -= highlightStrokeArrayWidth[3] / 2;\n // widthDist += highlightStrokeArrayWidth[3] / 2;\n // }\n\n // context.beginPath();\n // context.rect(xDist, yDist, widthDist, heightDist);\n // }\n }\n}\n@injectable()\nexport class SplitGroupAfterRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n const {\n // width = groupAttribute.width,\n // height = groupAttribute.height,\n // 基础border\n stroke = groupAttribute.stroke,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth,\n\n lineWidth = groupAttribute.lineWidth,\n strokeColor = groupAttribute.stroke,\n\n cornerRadius = groupAttribute.cornerRadius\n // // select & hover border\n // highlightStroke = (groupAttribute as any).highlightStroke,\n // highlightStrokeArrayColor = (groupAttribute as any).highlightStrokeArrayColor,\n // highlightStrokeArrayWidth = (groupAttribute as any).highlightStrokeArrayWidth,\n // highlightStrokeArrayPart = (groupAttribute as any).highlightStrokeArrayPart,\n } = group.attribute as any;\n let { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;\n\n // lineWidth === 0 不绘制\n if (!stroke || (!Array.isArray(strokeArrayWidth) && lineWidth === 0)) {\n return;\n }\n\n let widthForStroke: number;\n let heightForStroke: number;\n if (Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth)) {\n if (\n (typeof lineWidth === 'number' && lineWidth & 1) ||\n (Array.isArray(strokeArrayWidth) && strokeArrayWidth.some(width => width & 1))\n ) {\n const table = (group.stage as any).table as BaseTableAPI;\n if (!table) {\n return;\n }\n const bottomRight = table?.theme.cellBorderClipDirection === 'bottom-right';\n // let deltaWidth = 0;\n // let deltaHeight = 0;\n if (bottomRight) {\n x = Math.floor(x) - 0.5;\n y = Math.floor(y) - 0.5;\n if (group.role === 'cell') {\n const col = (group as any).col as number;\n const row = (group as any).row as number;\n if (col === 0) {\n x += 1;\n }\n if (row === 0) {\n y += 1;\n }\n }\n } else {\n x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\n }\n\n if (table.options.customConfig?._disableColumnAndRowSizeRound) {\n width = Math.round(width);\n height = Math.round(height);\n }\n const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(\n group,\n Math.ceil(width),\n Math.ceil(height),\n bottomRight\n );\n widthForStroke = widthFroDraw;\n heightForStroke = heightFroDraw;\n } else {\n widthForStroke = Math.ceil(width);\n heightForStroke = Math.ceil(height);\n }\n\n // 带不同stroke边框\n if (!(cornerRadius === 0 || (isArray(cornerRadius) && (<number[]>cornerRadius).every(num => num === 0)))) {\n // let lastStrokeI = 0;\n // let lastStroke: any;\n context.beginPath();\n // debugger;\n createRectPath(\n context,\n x,\n y,\n widthForStroke,\n heightForStroke,\n cornerRadius,\n new Array(4).fill(0).map((_, i) => (x1: number, y1: number, x2: number, y2: number) => {\n renderStrokeWithCornerRadius(\n i,\n x1,\n y1,\n x2,\n y2,\n group,\n context,\n x,\n y,\n groupAttribute as any,\n stroke,\n strokeArrayWidth || lineWidth,\n strokeArrayColor || strokeColor,\n widthForStroke,\n heightForStroke\n );\n })\n );\n\n context.stroke();\n } else {\n renderStroke(\n group,\n context,\n x,\n y,\n groupAttribute,\n stroke,\n strokeArrayWidth || lineWidth,\n strokeArrayColor || strokeColor,\n // Math.ceil(width),\n // Math.ceil(height)\n widthForStroke,\n heightForStroke\n );\n }\n }\n }\n}\n\n/**\n * @description: 判断线宽是否需要分别渲染(线宽不同)\n * @param {number} widthArray\n * @return {*}\n */\nexport function getWidthInfo(widthArray: number[] | number) {\n if (!Array.isArray(widthArray)) {\n return {\n isSplitDraw: false,\n width: widthArray\n };\n }\n\n let temp;\n for (let i = 0; i < widthArray.length; i++) {\n const width = widthArray[i];\n if (width) {\n if (!temp) {\n temp = width;\n } else if (width !== temp) {\n return {\n isSplitDraw: true\n };\n }\n }\n }\n\n return {\n isSplitDraw: false,\n width: temp\n };\n}\n\nexport function renderStroke(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n groupAttribute: Required<IGroupGraphicAttribute> | Required<IRectGraphicAttribute>,\n stroke: boolean | [boolean, boolean, boolean, boolean],\n strokeArrayWidth: [number, number, number, number] | undefined,\n strokeArrayColor: [string, string, string, string] | undefined,\n width: number,\n height: number,\n isHighlight?: boolean,\n part?: ([number, number] | undefined)[]\n) {\n const widthInfo = getWidthInfo(strokeArrayWidth);\n const isWidthNumber = !Array.isArray(strokeArrayWidth);\n const isStrokeTrue = !Array.isArray(stroke);\n // 渲染部分线段,part: [[0, 0.5], undifined, undifined, undifined]\n // 同样上右下左,范围0-1,[0, 0.5]即只渲染前一半\n const isPart = Array.isArray(part);\n const isSplitDraw = Array.isArray(strokeArrayColor) || widthInfo.isSplitDraw;\n\n context.setStrokeStyle(group, group.attribute, x, y, groupAttribute);\n // if (isHighlight) {\n // context.setLineDash(highlightDash);\n // }\n // const oldLineCap = context.lineCap;\n // context.lineCap = 'square';\n\n const { lineDash = groupAttribute.lineDash } = group.attribute as any;\n // const lineDash = context.getLineDash();\n let isDash = false;\n if (lineDash.length && lineDash.some((dash: number[] | null) => Array.isArray(dash))) {\n isDash = true;\n }\n // 单独处理每条边界,目前不考虑圆角\n context.beginPath();\n context.moveTo(x, y);\n\n const strokeTop = (isStrokeTrue || stroke[0]) && (isWidthNumber || strokeArrayWidth[0]);\n const strokeRight = (isStrokeTrue || stroke[1]) && (isWidthNumber || strokeArrayWidth[1]);\n const strokeBottom = (isStrokeTrue || stroke[2]) && (isWidthNumber || strokeArrayWidth[2]);\n const strokeLeft = (isStrokeTrue || stroke[3]) && (isWidthNumber || strokeArrayWidth[3]);\n\n // top\n if (strokeTop) {\n // context.lineTo(x + width, y);\n const deltaLeft = (isWidthNumber ? widthInfo.width : strokeArrayWidth[0]) / 2;\n const deltaRight = (isWidthNumber ? widthInfo.width : strokeArrayWidth[0]) / 2;\n if (isPart && Array.isArray(part[0])) {\n context.moveTo(x - deltaLeft + (width + deltaLeft + deltaRight) * part[0][0], y);\n context.lineTo(x - deltaLeft + (width + deltaLeft + deltaRight) * (part[0][1] - part[0][0]), y);\n context.moveTo(x + width + deltaRight, y);\n } else {\n context.moveTo(x - deltaLeft, y);\n context.lineTo(x + width + deltaRight, y);\n }\n if (isSplitDraw || isDash) {\n if (strokeArrayColor && strokeArrayColor[0]) {\n context.strokeStyle = strokeArrayColor[0];\n } else {\n context.strokeStyle = 'transparent';\n }\n if (!isWidthNumber) {\n context.lineWidth = strokeArrayWidth[0];\n }\n context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;\n if (isDash) {\n context.setLineDash(lineDash[0] ?? []);\n }\n context.stroke();\n context.beginPath();\n context.moveTo(x + width, y);\n }\n } else {\n context.moveTo(x + width, y);\n }\n // right\n if (strokeRight) {\n // context.lineTo(x + width, y + height);\n const deltaTop = (isWidthNumber ? widthInfo.width : strokeArrayWidth[1]) / 2;\n const deltaBottom = (isWidthNumber ? widthInfo.width : strokeArrayWidth[1]) / 2;\n if (isPart && Array.isArray(part[1])) {\n context.moveTo(x + width, y - deltaTop + height * part[1][0]);\n context.lineTo(x + width, y - deltaTop + (height + deltaTop + deltaBottom) * (part[1][1] - part[1][0]));\n context.moveTo(x + width, y + height + deltaBottom);\n } else {\n context.moveTo(x + width, y - deltaTop);\n context.lineTo(x + width, y + height + deltaBottom);\n }\n if (isSplitDraw || isDash) {\n if (strokeArrayColor && strokeArrayColor[1]) {\n context.strokeStyle = strokeArrayColor[1];\n } else {\n context.strokeStyle = 'transparent';\n }\n if (!isWidthNumber) {\n context.lineWidth = strokeArrayWidth[1];\n }\n context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;\n if (isDash) {\n context.setLineDash(lineDash[1] ?? []);\n }\n context.stroke();\n context.beginPath();\n context.moveTo(x + width, y + height);\n }\n } else {\n context.moveTo(x + width, y + height);\n }\n // bottom\n if (strokeBottom) {\n // context.lineTo(x, y + height);\n const deltaLeft = (isWidthNumber ? widthInfo.width : strokeArrayWidth[2]) / 2;\n const deltaRight = (isWidthNumber ? widthInfo.width : strokeArrayWidth[2]) / 2;\n if (isPart && Array.isArray(part[2])) {\n context.moveTo(x - deltaLeft + (width + deltaLeft + deltaRight) * part[2][0], y + height);\n context.lineTo(x - deltaLeft + (width + deltaLeft + deltaRight) * (part[2][1] - part[2][0]), y + height);\n context.moveTo(x - deltaLeft, y + height);\n } else {\n context.moveTo(x - deltaLeft, y + height);\n context.lineTo(x + width + deltaRight, y + height);\n }\n if (isSplitDraw || isDash) {\n if (strokeArrayColor && strokeArrayColor[2]) {\n context.strokeStyle = strokeArrayColor[2];\n } else {\n context.strokeStyle = 'transparent';\n }\n if (!isWidthNumber) {\n context.lineWidth = strokeArrayWidth[2];\n }\n context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;\n if (isDash) {\n context.setLineDash(lineDash[2] ?? []);\n }\n context.stroke();\n context.beginPath();\n context.moveTo(x, y + height);\n }\n } else {\n context.moveTo(x, y + height);\n }\n // left\n if (strokeLeft) {\n // context.lineTo(x, y);\n const deltaTop = (isWidthNumber ? widthInfo.width : strokeArrayWidth[3]) / 2;\n const deltaBottom = (isWidthNumber ? widthInfo.width : strokeArrayWidth[3]) / 2;\n if (isPart && Array.isArray(part[3])) {\n context.moveTo(x, y - deltaTop + (height + deltaTop + deltaBottom) * part[3][0]);\n context.lineTo(x, y - deltaTop + (height + deltaTop + deltaBottom) * (part[3][1] - part[3][0]));\n context.moveTo(x, y - deltaTop);\n } else {\n context.moveTo(x, y - deltaTop);\n context.lineTo(x, y + height + deltaBottom);\n }\n if (isSplitDraw || isDash) {\n if (strokeArrayColor && strokeArrayColor[3]) {\n context.strokeStyle = strokeArrayColor[3];\n } else {\n context.strokeStyle = 'transparent';\n }\n if (!isWidthNumber) {\n context.lineWidth = strokeArrayWidth[3];\n }\n context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;\n if (isDash) {\n context.setLineDash(lineDash[3] ?? []);\n }\n context.stroke();\n context.beginPath();\n context.moveTo(x, y);\n }\n } else {\n context.moveTo(x, y);\n }\n\n if (!isSplitDraw && !isDash) {\n // context.strokeStyle = strokeArrayColor;\n if (!isWidthNumber && widthInfo.width) {\n context.lineWidth = widthInfo.width;\n }\n context.stroke();\n }\n context.lineDashOffset = 0;\n // context.lineCap = oldLineCap;\n context.setLineDash([]);\n}\n\n// DashGroupContribution处理虚线边框对齐\n// lineDash 为非空数组时调用\n@injectable()\nexport class DashGroupBeforeRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n doFillOrStroke?: { doFill: boolean; doStroke: boolean }\n ) {\n const {\n lineDash = groupAttribute.lineDash,\n stroke = groupAttribute.stroke,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth\n } = group.attribute as any;\n\n if (\n stroke &&\n Array.isArray(lineDash) &&\n lineDash.length &&\n lineDash[0]?.length &&\n !Array.isArray(strokeArrayColor) &&\n !Array.isArray(strokeArrayWidth)\n ) {\n doFillOrStroke.doStroke = false;\n }\n }\n}\n@injectable()\nexport class DashGroupAfterRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n const {\n lineDash = groupAttribute.lineDash,\n stroke = groupAttribute.stroke,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth,\n lineWidth = groupAttribute.lineWidth\n } = group.attribute as any;\n\n if (\n !stroke ||\n !(Array.isArray(lineDash) && lineDash.length && lineDash[0]?.length) ||\n Array.isArray(strokeArrayColor) ||\n Array.isArray(strokeArrayWidth)\n ) {\n return;\n }\n\n const table = (group.stage as any).table as BaseTableAPI;\n if (!table) {\n return;\n }\n\n // convert lineDash to number[][]\n const splitLineDash = isArray(lineDash[0]) ? getQuadLineDash(lineDash) : [lineDash, lineDash, lineDash, lineDash];\n\n // const { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;\n let { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;\n if (table.options.customConfig?._disableColumnAndRowSizeRound) {\n width = Math.round(width);\n height = Math.round(height);\n } else {\n width = Math.ceil(width);\n height = Math.ceil(height);\n }\n\n let widthForStroke;\n let heightForStroke;\n if (lineWidth & 1) {\n const bottomRight = table.theme.cellBorderClipDirection === 'bottom-right';\n const deltaWidth = 0;\n const deltaHeight = 0;\n if (bottomRight) {\n x = Math.floor(x) - 0.5;\n y = Math.floor(y) - 0.5;\n if (group.role === 'cell') {\n const col = (group as any).col as number;\n const row = (group as any).row as number;\n if (col === 0) {\n x += 1;\n }\n if (row === 0) {\n y += 1;\n }\n }\n } else {\n x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\n }\n\n const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(\n group,\n Math.ceil(width + deltaWidth),\n Math.ceil(height + deltaHeight),\n bottomRight\n );\n widthForStroke = widthFroDraw;\n heightForStroke = heightFroDraw;\n } else {\n widthForStroke = Math.ceil(width);\n heightForStroke = Math.ceil(height);\n }\n context.setStrokeStyle(group, group.attribute, x, y, groupAttribute);\n // 分段设置lineDashOffset,实现虚线边框对齐\n // top\n context.beginPath();\n context.moveTo(x, y);\n context.lineTo(x + widthForStroke, y);\n context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;\n context.setLineDash(splitLineDash[0] ?? []);\n context.stroke();\n\n // right\n context.beginPath();\n context.moveTo(x + widthForStroke, y);\n context.lineTo(x + widthForStroke, y + heightForStroke);\n context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;\n context.setLineDash(splitLineDash[1] ?? []);\n context.stroke();\n\n // bottom\n context.beginPath();\n context.moveTo(x, y + heightForStroke);\n context.lineTo(x + widthForStroke, y + heightForStroke);\n context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;\n context.setLineDash(splitLineDash[2] ?? []);\n context.stroke();\n\n // left\n context.beginPath();\n context.moveTo(x, y);\n context.lineTo(x, y + heightForStroke);\n context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;\n context.setLineDash(splitLineDash[3] ?? []);\n context.stroke();\n\n context.lineDashOffset = 0;\n context.setLineDash([]);\n }\n}\n\n// AdjustPosGroupContribution处理线宽为奇数时stroke位置偏移0.5px\n// lineWidth 为奇数时调用\n@injectable()\nexport class AdjustPosGroupBeforeRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n doFillOrStroke?: { doFill: boolean; doStroke: boolean }\n ) {\n const {\n lineWidth = groupAttribute.lineWidth,\n stroke = groupAttribute.stroke,\n lineDash = groupAttribute.lineDash,\n // width = groupAttribute.width,\n // height = groupAttribute.height,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor,\n notAdjustPos\n } = group.attribute as any;\n\n if (\n notAdjustPos !== true && // 不需要调整位置\n stroke &&\n Array.isArray(lineDash) &&\n !lineDash.length && // 非虚线\n !Array.isArray(strokeArrayColor) &&\n !Array.isArray(strokeArrayWidth) &&\n lineWidth & 1 // 奇数线宽\n ) {\n doFillOrStroke.doStroke = false;\n }\n }\n}\n\n@injectable()\nexport class AdjustPosGroupAfterRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n const {\n lineWidth = groupAttribute.lineWidth,\n stroke = groupAttribute.stroke,\n lineDash = groupAttribute.lineDash,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor,\n notAdjustPos,\n cornerRadius = groupAttribute.cornerRadius\n } = group.attribute as any;\n\n let { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;\n // width = Math.ceil(width);\n // height = Math.ceil(height);\n\n if (\n notAdjustPos !== true && // 不需要调整位置\n stroke &&\n Array.isArray(lineDash) &&\n !lineDash.length && // 非虚线\n !Array.isArray(strokeArrayColor) &&\n !Array.isArray(strokeArrayWidth) &&\n lineWidth & 1 // 奇数线宽\n ) {\n // if (group.role === 'cell') {\n // const table = (group.stage as any).table as BaseTableAPI;\n // let col = (group as any).col as number;\n // let row = (group as any).row as number;\n // const mergeInfo = getCellMergeInfo(table, col, row);\n // if (mergeInfo) {\n // col = mergeInfo.end.col;\n // row = mergeInfo.end.row;\n // }\n\n // if (table && col === table.colCount - 1) {\n // width -= 1;\n // } else if (table && col === table.frozenColCount - 1 && table.scrollLeft) {\n // width -= 1;\n // }\n // if (table && row === table.rowCount - 1) {\n // height -= 1;\n // } else if (table && row === table.frozenRowCount - 1 && table.scrollTop) {\n // height -= 1;\n // }\n // }\n\n const table = (group.stage as any).table as BaseTableAPI;\n if (!table) {\n return;\n }\n if (table.options.customConfig?._disableColumnAndRowSizeRound) {\n width = Math.round(width);\n height = Math.round(height);\n }\n\n context.beginPath();\n\n const bottomRight = table?.theme.cellBorderClipDirection === 'bottom-right';\n const deltaWidth = 0;\n const deltaHeight = 0;\n if (bottomRight) {\n x = Math.floor(x) - 0.5;\n y = Math.floor(y) - 0.5;\n if (group.role === 'cell') {\n const col = (group as any).col as number;\n const row = (group as any).row as number;\n if (col === 0) {\n x += 1;\n }\n if (row === 0) {\n y += 1;\n }\n }\n } else {\n x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\n }\n\n const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(\n group,\n Math.ceil(width),\n Math.ceil(height),\n bottomRight\n );\n\n if (cornerRadius) {\n // 测试后,cache对于重绘性能提升不大,但是在首屏有一定性能损耗,因此rect不再使用cache\n createRectPath(context, x, y, widthFroDraw + deltaWidth, heightFroDraw + deltaHeight, cornerRadius);\n } else {\n context.rect(x, y, widthFroDraw, heightFroDraw);\n }\n context.setStrokeStyle(group, group.attribute, x, y, groupAttribute);\n context.stroke();\n }\n }\n}\n\n@injectable()\nexport class AdjustColorGroupBeforeRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n doFillOrStroke?: { doFill: boolean; doStroke: boolean }\n ) {\n // 处理hover颜色\n if ((group as Group).role === 'cell') {\n const table = (group.stage as any).table as BaseTableAPI;\n if (table) {\n const selectColor = getCellSelectColor(group as Group, table);\n if (selectColor) {\n // show select highlight when scrolling\n (group.attribute as any)._vtableHightLightFill = selectColor;\n } else if (table.stateManager.interactionState !== InteractionState.scrolling) {\n const hoverColor = getCellHoverColor(group as Group, table);\n if (hoverColor) {\n (group.attribute as any)._vtableHightLightFill = hoverColor;\n }\n }\n }\n }\n }\n}\n\n@injectable()\nexport class AdjustColorGroupAfterRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n // 处理hover颜色\n if ((group.attribute as any)._vtableHightLightFill) {\n if (fillCb) {\n // do nothing\n // fillCb(context, group.attribute, groupAttribute);\n } else if (fVisible) {\n const oldColor = group.attribute.fill;\n // draw hover fill\n group.attribute.fill = (group.attribute as any)._vtableHightLightFill as any;\n context.setCommonStyle(group, group.attribute, x, y, groupAttribute);\n context.fill();\n group.attribute.fill = oldColor;\n (group.attribute as any)._vtableHightLightFill = undefined;\n }\n }\n }\n}\n\n@injectable()\nexport class ClipBodyGroupBeforeRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n xOrigin: number,\n yOrigin: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n doFillOrStroke?: { doFill: boolean; doStroke: boolean }\n ) {\n const table = (group.stage as any).table as BaseTableAPI;\n if (!table) {\n return;\n }\n\n if ((group as Group).role === 'body') {\n const x = -(group.attribute.x ?? 0) + table.getFrozenColsWidth();\n const y = -(group.attribute.y ?? 0) + table.getFrozenRowsHeight();\n const width = group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth();\n const height = group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();\n drawClipRect(context, x, y, width, height);\n } else if ((group as Group).role === 'row-header') {\n const x = 0;\n const y = -(group.attribute.y ?? 0) + table.getFrozenRowsHeight();\n const width = table.getFrozenColsWidth();\n const height = group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();\n drawClipRect(context, x, y, width, height);\n } else if ((group as Group).role === 'col-header') {\n const x = -(group.attribute.x ?? 0) + table.getFrozenColsWidth();\n const y = 0;\n const width = group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth();\n const height = table.getFrozenRowsHeight();\n drawClipRect(context, x, y, width, height);\n } else if ((group as Group).role === 'right-frozen') {\n const x = 0;\n const y = -(group.attribute.y ?? 0) + table.getFrozenRowsHeight();\n const width = table.getRightFrozenColsWidth();\n const height = group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();\n drawClipRect(context, x, y, width, height);\n } else if ((group as Group).role === 'bottom-frozen') {\n const x = -(group.attribute.x ?? 0) + table.getFrozenColsWidth();\n const y = 0;\n const width = group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth();\n const height = table.getBottomFrozenRowsHeight();\n drawClipRect(context, x, y, width, height);\n } else if ((group as Group).role === 'corner-header') {\n const x = 0;\n const y = 0;\n const width = table.getFrozenColsWidth();\n const height = table.getFrozenRowsHeight();\n drawClipRect(context, x, y, width, height);\n } else if ((group as Group).role === 'corner-right-top-header') {\n const x = 0;\n const y = 0;\n const width = table.getRightFrozenColsWidth();\n const height = table.getFrozenRowsHeight();\n drawClipRect(context, x, y, width, height);\n } else if ((group as Group).role === 'corner-right-bottom-header') {\n const x = 0;\n const y = 0;\n const width = table.getRightFrozenColsWidth();\n const height = table.getBottomFrozenRowsHeight();\n drawClipRect(context, x, y, width, height);\n } else if ((group as Group).role === 'corner-left-bottom-header') {\n const x = 0;\n const y = 0;\n const width = table.getFrozenColsWidth();\n const height = table.getBottomFrozenRowsHeight();\n drawClipRect(context, x, y, width, height);\n }\n }\n}\n\nconst precision = Math.pow(2, 24);\n\nfunction drawClipRect(context: IContext2d, x: number, y: number, width: number, height: number) {\n context.beginPath();\n\n const matrix = context.applyedMatrix;\n if (Math.abs(matrix.f) > precision || Math.abs(matrix.g) > precision) {\n // hack for precision problem in CanvasRenderingContext2D\n // if position is too big, disable clip\n context.rect(x - precision, y - precision, width + precision * 2, height + precision * 2);\n } else {\n context.rect(x, y, width, height);\n }\n}\n\n// @injectable()\n// export class ClipBodyGroupAfterRenderContribution implements IGroupRenderContribution {\n// time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n// useStyle = true;\n// order = 0;\n// drawShape(\n// group: IGroup,\n// context: IContext2d,\n// x: number,\n// y: number,\n// doFill: boolean,\n// doStroke: boolean,\n// fVisible: boolean,\n// sVisible: boolean,\n// groupAttribute: Required<IGroupGraphicAttribute>,\n// drawContext: IDrawContext,\n// fillCb?: (\n// ctx: IContext2d,\n// markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n// themeAttribute: IThemeAttribute\n// ) => boolean,\n// strokeCb?: (\n// ctx: IContext2d,\n// markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n// themeAttribute: IThemeAttribute\n// ) => boolean\n// ) {\n// // 处理hover颜色\n// if ((group as Group).role === 'body') {\n// }\n// }\n// }\n\nfunction getCellSizeForDraw(group: any, width: number, height: number, bottomRight: boolean) {\n const table = group.stage.table as BaseTableAPI;\n if (!table) {\n return { width, height };\n }\n if (group.role === 'cell') {\n let col = group.col as number;\n let row = group.row as number;\n const mergeInfo = getCellMergeInfo(table, col, row);\n if (mergeInfo) {\n col = mergeInfo.end.col;\n row = mergeInfo.end.row;\n }\n\n if (col === table.colCount - 1 && !bottomRight) {\n width -= 1;\n } else if (col === table.frozenColCount - 1 && table.scrollLeft && !bottomRight) {\n width -= 1;\n } else if (col === 0 && bottomRight) {\n width -= 1;\n }\n if (row === table.rowCount - 1 && !bottomRight) {\n height -= 1;\n } else if (row === table.frozenRowCount - 1 && table.scrollTop && !bottomRight) {\n height -= 1;\n } else if (row === 0 && bottomRight) {\n height -= 1;\n }\n } else if (group.role === 'corner-frozen') {\n if (table.scrollLeft && !bottomRight) {\n width -= 1;\n }\n if (table.scrollTop && !bottomRight) {\n height -= 1;\n }\n }\n\n return { width, height };\n}\n\nfunction getQuadLineDash(lineDash: number[][]) {\n if (lineDash.length === 1) {\n return [lineDash[0], lineDash[0], lineDash[0], lineDash[0]];\n } else if (lineDash.length === 2) {\n return [lineDash[0], lineDash[1], lineDash[0], lineDash[1]];\n }\n // 不考虑三个数的情况,三个数是用户传错了\n return lineDash;\n}\n"]}
1
+ {"version":3,"sources":["../src/scenegraph/graphic/contributions/group-contribution-render.ts"],"names":[],"mappings":";;;;;;;;;AAWA,gDAA4F;AAE5F,sEAAuE;AAEvE,+DAA8D;AAC9D,gDAAqD;AACrD,6CAA2C;AAC3C,6FAAoF;AACpF,yEAA0E;AAOnE,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;IAAxC;QACL,SAAI,GAA+B,oCAA0B,CAAC,gBAAgB,CAAC;QAC/E,aAAQ,GAAG,IAAI,CAAC;QAChB,UAAK,GAAG,CAAC,CAAC;IAmEZ,CAAC;IAlEC,SAAS,CACP,KAAa,EACb,OAAmB,EACnB,CAAS,EACT,CAAS,EACT,MAAe,EACf,QAAiB,EACjB,QAAiB,EACjB,QAAiB,EACjB,cAAgD,EAChD,WAAyB,EACzB,MAIY,EACZ,QAIY,EACZ,cAAuD;QAEvD,MAAM,EACJ,MAAM,GAAG,cAAc,CAAC,MAAM,EAC9B,gBAAgB,GAAI,cAAsB,CAAC,gBAAgB,EAC3D,gBAAgB,GAAI,cAAsB,CAAC,gBAAgB,EAK5D,GAAG,KAAK,CAAC,SAAgB,CAAC;QAE3B,IAAI,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,EAAE;YAClF,cAAc,CAAC,QAAQ,GAAG,KAAK,CAAC;SACjC;IA8BH,CAAC;CACF,CAAA;AAtEY,kCAAkC;IAD9C,IAAA,oBAAU,GAAE;GACA,kCAAkC,CAsE9C;AAtEY,gFAAkC;AAwExC,IAAM,iCAAiC,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,CAAC;SACb;KACF;IAED,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAC3B,CAAC;AAED,SAAS,eAAe,CAAC,QAAoB;IAC3C,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;QACzB,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;KAC7D;SAAM,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;QAChC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;KAC7D;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC","file":"group-contribution-render.js","sourcesContent":["import type {\n IGroup,\n IContext2d,\n IGroupGraphicAttribute,\n IMarkAttribute,\n IGraphicAttribute,\n IThemeAttribute,\n IGroupRenderContribution,\n IDrawContext,\n IRectGraphicAttribute\n} from './../../../vrender';\nimport { BaseRenderContributionTime, injectable, createRectPath } from './../../../vrender';\nimport type { Group } from '../group';\nimport { getCellHoverColor } from '../../../state/hover/is-cell-hover';\nimport type { BaseTableAPI } from '../../../ts-types/base-table';\nimport { getCellMergeInfo } from '../../utils/get-cell-merge';\nimport { InteractionState } from '../../../ts-types';\nimport { isArray } from '@visactor/vutils';\nimport { getCellSelectColor } from '../../../state/select/is-cell-select-highlight';\nimport { renderStrokeWithCornerRadius } from './rect-contribution-render';\n\n// const highlightDash: number[] = [];\n\n// SplitGroupContribution处理分段渲染stroke\n// stroke/strokeArrayWidth/strokeArrayColor 为数组时调用\n@injectable()\nexport class SplitGroupBeforeRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n doFillOrStroke?: { doFill: boolean; doStroke: boolean }\n ) {\n const {\n stroke = groupAttribute.stroke,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor\n // highlightStroke = (groupAttribute as any).highlightStroke,\n // highlightStrokeArrayWidth = (groupAttribute as any).highlightStrokeArrayWidth,\n // width = groupAttribute.width,\n // height = groupAttribute.height,\n } = group.attribute as any;\n\n if (stroke && (Array.isArray(strokeArrayWidth) || Array.isArray(strokeArrayColor))) {\n doFillOrStroke.doStroke = false;\n }\n\n // if (highlightStroke) {\n // // 依据highlightStroke信息调整clip范围,以实现在单个单元格显示highlight border\n // let xDist = x;\n // let yDist = y;\n // let widthDist = width;\n // let heightDist = height;\n // if (highlightStroke[0] && highlightStrokeArrayWidth[0]) {\n // // top\n // yDist -= highlightStrokeArrayWidth[0] / 2;\n // heightDist += highlightStrokeArrayWidth[0] / 2;\n // }\n // if (highlightStroke[1] && highlightStrokeArrayWidth[1]) {\n // // right\n // widthDist += highlightStrokeArrayWidth[1] / 2;\n // }\n // if (highlightStroke[2] && highlightStrokeArrayWidth[2]) {\n // // bottom\n // heightDist += highlightStrokeArrayWidth[2] / 2;\n // }\n // if (highlightStroke[3] && highlightStrokeArrayWidth[3]) {\n // // left\n // xDist -= highlightStrokeArrayWidth[3] / 2;\n // widthDist += highlightStrokeArrayWidth[3] / 2;\n // }\n\n // context.beginPath();\n // context.rect(xDist, yDist, widthDist, heightDist);\n // }\n }\n}\n@injectable()\nexport class SplitGroupAfterRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n const {\n // width = groupAttribute.width,\n // height = groupAttribute.height,\n // 基础border\n stroke = groupAttribute.stroke,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth,\n\n lineWidth = groupAttribute.lineWidth,\n strokeColor = groupAttribute.stroke,\n\n cornerRadius = groupAttribute.cornerRadius\n // // select & hover border\n // highlightStroke = (groupAttribute as any).highlightStroke,\n // highlightStrokeArrayColor = (groupAttribute as any).highlightStrokeArrayColor,\n // highlightStrokeArrayWidth = (groupAttribute as any).highlightStrokeArrayWidth,\n // highlightStrokeArrayPart = (groupAttribute as any).highlightStrokeArrayPart,\n } = group.attribute as any;\n let { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;\n\n // lineWidth === 0 不绘制\n if (!stroke || (!Array.isArray(strokeArrayWidth) && lineWidth === 0)) {\n return;\n }\n\n let widthForStroke: number;\n let heightForStroke: number;\n if (Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth)) {\n if (\n (typeof lineWidth === 'number' && lineWidth & 1) ||\n (Array.isArray(strokeArrayWidth) && strokeArrayWidth.some(width => width & 1))\n ) {\n const table = (group.stage as any).table as BaseTableAPI;\n if (!table) {\n return;\n }\n const bottomRight = table?.theme?.cellBorderClipDirection === 'bottom-right';\n // let deltaWidth = 0;\n // let deltaHeight = 0;\n if (bottomRight) {\n x = Math.floor(x) - 0.5;\n y = Math.floor(y) - 0.5;\n if (group.role === 'cell') {\n const col = (group as any).col as number;\n const row = (group as any).row as number;\n if (col === 0) {\n x += 1;\n }\n if (row === 0) {\n y += 1;\n }\n }\n } else {\n x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\n }\n\n if (table.options.customConfig?._disableColumnAndRowSizeRound) {\n width = Math.round(width);\n height = Math.round(height);\n }\n const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(\n group,\n Math.ceil(width),\n Math.ceil(height),\n bottomRight\n );\n widthForStroke = widthFroDraw;\n heightForStroke = heightFroDraw;\n } else {\n widthForStroke = Math.ceil(width);\n heightForStroke = Math.ceil(height);\n }\n\n // 带不同stroke边框\n if (!(cornerRadius === 0 || (isArray(cornerRadius) && (<number[]>cornerRadius).every(num => num === 0)))) {\n // let lastStrokeI = 0;\n // let lastStroke: any;\n context.beginPath();\n // debugger;\n createRectPath(\n context,\n x,\n y,\n widthForStroke,\n heightForStroke,\n cornerRadius,\n new Array(4).fill(0).map((_, i) => (x1: number, y1: number, x2: number, y2: number) => {\n renderStrokeWithCornerRadius(\n i,\n x1,\n y1,\n x2,\n y2,\n group,\n context,\n x,\n y,\n groupAttribute as any,\n stroke,\n strokeArrayWidth || lineWidth,\n strokeArrayColor || strokeColor,\n widthForStroke,\n heightForStroke\n );\n })\n );\n\n context.stroke();\n } else {\n renderStroke(\n group,\n context,\n x,\n y,\n groupAttribute,\n stroke,\n strokeArrayWidth || lineWidth,\n strokeArrayColor || strokeColor,\n // Math.ceil(width),\n // Math.ceil(height)\n widthForStroke,\n heightForStroke\n );\n }\n }\n }\n}\n\n/**\n * @description: 判断线宽是否需要分别渲染(线宽不同)\n * @param {number} widthArray\n * @return {*}\n */\nexport function getWidthInfo(widthArray: number[] | number) {\n if (!Array.isArray(widthArray)) {\n return {\n isSplitDraw: false,\n width: widthArray\n };\n }\n\n let temp;\n for (let i = 0; i < widthArray.length; i++) {\n const width = widthArray[i];\n if (width) {\n if (!temp) {\n temp = width;\n } else if (width !== temp) {\n return {\n isSplitDraw: true\n };\n }\n }\n }\n\n return {\n isSplitDraw: false,\n width: temp\n };\n}\n\nexport function renderStroke(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n groupAttribute: Required<IGroupGraphicAttribute> | Required<IRectGraphicAttribute>,\n stroke: boolean | [boolean, boolean, boolean, boolean],\n strokeArrayWidth: [number, number, number, number] | undefined,\n strokeArrayColor: [string, string, string, string] | undefined,\n width: number,\n height: number,\n isHighlight?: boolean,\n part?: ([number, number] | undefined)[]\n) {\n const widthInfo = getWidthInfo(strokeArrayWidth);\n const isWidthNumber = !Array.isArray(strokeArrayWidth);\n const isStrokeTrue = !Array.isArray(stroke);\n // 渲染部分线段,part: [[0, 0.5], undifined, undifined, undifined]\n // 同样上右下左,范围0-1,[0, 0.5]即只渲染前一半\n const isPart = Array.isArray(part);\n const isSplitDraw = Array.isArray(strokeArrayColor) || widthInfo.isSplitDraw;\n\n context.setStrokeStyle(group, group.attribute, x, y, groupAttribute);\n // if (isHighlight) {\n // context.setLineDash(highlightDash);\n // }\n // const oldLineCap = context.lineCap;\n // context.lineCap = 'square';\n\n const { lineDash = groupAttribute.lineDash } = group.attribute as any;\n // const lineDash = context.getLineDash();\n let isDash = false;\n if (lineDash.length && lineDash.some((dash: number[] | null) => Array.isArray(dash))) {\n isDash = true;\n }\n // 单独处理每条边界,目前不考虑圆角\n context.beginPath();\n context.moveTo(x, y);\n\n const strokeTop = (isStrokeTrue || stroke[0]) && (isWidthNumber || strokeArrayWidth[0]);\n const strokeRight = (isStrokeTrue || stroke[1]) && (isWidthNumber || strokeArrayWidth[1]);\n const strokeBottom = (isStrokeTrue || stroke[2]) && (isWidthNumber || strokeArrayWidth[2]);\n const strokeLeft = (isStrokeTrue || stroke[3]) && (isWidthNumber || strokeArrayWidth[3]);\n\n // top\n if (strokeTop) {\n // context.lineTo(x + width, y);\n const deltaLeft = (isWidthNumber ? widthInfo.width : strokeArrayWidth[0]) / 2;\n const deltaRight = (isWidthNumber ? widthInfo.width : strokeArrayWidth[0]) / 2;\n if (isPart && Array.isArray(part[0])) {\n context.moveTo(x - deltaLeft + (width + deltaLeft + deltaRight) * part[0][0], y);\n context.lineTo(x - deltaLeft + (width + deltaLeft + deltaRight) * (part[0][1] - part[0][0]), y);\n context.moveTo(x + width + deltaRight, y);\n } else {\n context.moveTo(x - deltaLeft, y);\n context.lineTo(x + width + deltaRight, y);\n }\n if (isSplitDraw || isDash) {\n if (strokeArrayColor && strokeArrayColor[0]) {\n context.strokeStyle = strokeArrayColor[0];\n } else {\n context.strokeStyle = 'transparent';\n }\n if (!isWidthNumber) {\n context.lineWidth = strokeArrayWidth[0];\n }\n context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;\n if (isDash) {\n context.setLineDash(lineDash[0] ?? []);\n }\n context.stroke();\n context.beginPath();\n context.moveTo(x + width, y);\n }\n } else {\n context.moveTo(x + width, y);\n }\n // right\n if (strokeRight) {\n // context.lineTo(x + width, y + height);\n const deltaTop = (isWidthNumber ? widthInfo.width : strokeArrayWidth[1]) / 2;\n const deltaBottom = (isWidthNumber ? widthInfo.width : strokeArrayWidth[1]) / 2;\n if (isPart && Array.isArray(part[1])) {\n context.moveTo(x + width, y - deltaTop + height * part[1][0]);\n context.lineTo(x + width, y - deltaTop + (height + deltaTop + deltaBottom) * (part[1][1] - part[1][0]));\n context.moveTo(x + width, y + height + deltaBottom);\n } else {\n context.moveTo(x + width, y - deltaTop);\n context.lineTo(x + width, y + height + deltaBottom);\n }\n if (isSplitDraw || isDash) {\n if (strokeArrayColor && strokeArrayColor[1]) {\n context.strokeStyle = strokeArrayColor[1];\n } else {\n context.strokeStyle = 'transparent';\n }\n if (!isWidthNumber) {\n context.lineWidth = strokeArrayWidth[1];\n }\n context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;\n if (isDash) {\n context.setLineDash(lineDash[1] ?? []);\n }\n context.stroke();\n context.beginPath();\n context.moveTo(x + width, y + height);\n }\n } else {\n context.moveTo(x + width, y + height);\n }\n // bottom\n if (strokeBottom) {\n // context.lineTo(x, y + height);\n const deltaLeft = (isWidthNumber ? widthInfo.width : strokeArrayWidth[2]) / 2;\n const deltaRight = (isWidthNumber ? widthInfo.width : strokeArrayWidth[2]) / 2;\n if (isPart && Array.isArray(part[2])) {\n context.moveTo(x - deltaLeft + (width + deltaLeft + deltaRight) * part[2][0], y + height);\n context.lineTo(x - deltaLeft + (width + deltaLeft + deltaRight) * (part[2][1] - part[2][0]), y + height);\n context.moveTo(x - deltaLeft, y + height);\n } else {\n context.moveTo(x - deltaLeft, y + height);\n context.lineTo(x + width + deltaRight, y + height);\n }\n if (isSplitDraw || isDash) {\n if (strokeArrayColor && strokeArrayColor[2]) {\n context.strokeStyle = strokeArrayColor[2];\n } else {\n context.strokeStyle = 'transparent';\n }\n if (!isWidthNumber) {\n context.lineWidth = strokeArrayWidth[2];\n }\n context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;\n if (isDash) {\n context.setLineDash(lineDash[2] ?? []);\n }\n context.stroke();\n context.beginPath();\n context.moveTo(x, y + height);\n }\n } else {\n context.moveTo(x, y + height);\n }\n // left\n if (strokeLeft) {\n // context.lineTo(x, y);\n const deltaTop = (isWidthNumber ? widthInfo.width : strokeArrayWidth[3]) / 2;\n const deltaBottom = (isWidthNumber ? widthInfo.width : strokeArrayWidth[3]) / 2;\n if (isPart && Array.isArray(part[3])) {\n context.moveTo(x, y - deltaTop + (height + deltaTop + deltaBottom) * part[3][0]);\n context.lineTo(x, y - deltaTop + (height + deltaTop + deltaBottom) * (part[3][1] - part[3][0]));\n context.moveTo(x, y - deltaTop);\n } else {\n context.moveTo(x, y - deltaTop);\n context.lineTo(x, y + height + deltaBottom);\n }\n if (isSplitDraw || isDash) {\n if (strokeArrayColor && strokeArrayColor[3]) {\n context.strokeStyle = strokeArrayColor[3];\n } else {\n context.strokeStyle = 'transparent';\n }\n if (!isWidthNumber) {\n context.lineWidth = strokeArrayWidth[3];\n }\n context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;\n if (isDash) {\n context.setLineDash(lineDash[3] ?? []);\n }\n context.stroke();\n context.beginPath();\n context.moveTo(x, y);\n }\n } else {\n context.moveTo(x, y);\n }\n\n if (!isSplitDraw && !isDash) {\n // context.strokeStyle = strokeArrayColor;\n if (!isWidthNumber && widthInfo.width) {\n context.lineWidth = widthInfo.width;\n }\n context.stroke();\n }\n context.lineDashOffset = 0;\n // context.lineCap = oldLineCap;\n context.setLineDash([]);\n}\n\n// DashGroupContribution处理虚线边框对齐\n// lineDash 为非空数组时调用\n@injectable()\nexport class DashGroupBeforeRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n doFillOrStroke?: { doFill: boolean; doStroke: boolean }\n ) {\n const {\n lineDash = groupAttribute.lineDash,\n stroke = groupAttribute.stroke,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth\n } = group.attribute as any;\n\n if (\n stroke &&\n Array.isArray(lineDash) &&\n lineDash.length &&\n lineDash[0]?.length &&\n !Array.isArray(strokeArrayColor) &&\n !Array.isArray(strokeArrayWidth)\n ) {\n doFillOrStroke.doStroke = false;\n }\n }\n}\n@injectable()\nexport class DashGroupAfterRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n const {\n lineDash = groupAttribute.lineDash,\n stroke = groupAttribute.stroke,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth,\n lineWidth = groupAttribute.lineWidth\n } = group.attribute as any;\n\n if (\n !stroke ||\n !(Array.isArray(lineDash) && lineDash.length && lineDash[0]?.length) ||\n Array.isArray(strokeArrayColor) ||\n Array.isArray(strokeArrayWidth)\n ) {\n return;\n }\n\n const table = (group.stage as any).table as BaseTableAPI;\n if (!table) {\n return;\n }\n\n // convert lineDash to number[][]\n const splitLineDash = isArray(lineDash[0]) ? getQuadLineDash(lineDash) : [lineDash, lineDash, lineDash, lineDash];\n\n // const { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;\n let { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;\n if (table.options.customConfig?._disableColumnAndRowSizeRound) {\n width = Math.round(width);\n height = Math.round(height);\n } else {\n width = Math.ceil(width);\n height = Math.ceil(height);\n }\n\n let widthForStroke;\n let heightForStroke;\n if (lineWidth & 1) {\n const bottomRight = table.theme.cellBorderClipDirection === 'bottom-right';\n const deltaWidth = 0;\n const deltaHeight = 0;\n if (bottomRight) {\n x = Math.floor(x) - 0.5;\n y = Math.floor(y) - 0.5;\n if (group.role === 'cell') {\n const col = (group as any).col as number;\n const row = (group as any).row as number;\n if (col === 0) {\n x += 1;\n }\n if (row === 0) {\n y += 1;\n }\n }\n } else {\n x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\n }\n\n const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(\n group,\n Math.ceil(width + deltaWidth),\n Math.ceil(height + deltaHeight),\n bottomRight\n );\n widthForStroke = widthFroDraw;\n heightForStroke = heightFroDraw;\n } else {\n widthForStroke = Math.ceil(width);\n heightForStroke = Math.ceil(height);\n }\n context.setStrokeStyle(group, group.attribute, x, y, groupAttribute);\n // 分段设置lineDashOffset,实现虚线边框对齐\n // top\n context.beginPath();\n context.moveTo(x, y);\n context.lineTo(x + widthForStroke, y);\n context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;\n context.setLineDash(splitLineDash[0] ?? []);\n context.stroke();\n\n // right\n context.beginPath();\n context.moveTo(x + widthForStroke, y);\n context.lineTo(x + widthForStroke, y + heightForStroke);\n context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;\n context.setLineDash(splitLineDash[1] ?? []);\n context.stroke();\n\n // bottom\n context.beginPath();\n context.moveTo(x, y + heightForStroke);\n context.lineTo(x + widthForStroke, y + heightForStroke);\n context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;\n context.setLineDash(splitLineDash[2] ?? []);\n context.stroke();\n\n // left\n context.beginPath();\n context.moveTo(x, y);\n context.lineTo(x, y + heightForStroke);\n context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;\n context.setLineDash(splitLineDash[3] ?? []);\n context.stroke();\n\n context.lineDashOffset = 0;\n context.setLineDash([]);\n }\n}\n\n// AdjustPosGroupContribution处理线宽为奇数时stroke位置偏移0.5px\n// lineWidth 为奇数时调用\n@injectable()\nexport class AdjustPosGroupBeforeRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n doFillOrStroke?: { doFill: boolean; doStroke: boolean }\n ) {\n const {\n lineWidth = groupAttribute.lineWidth,\n stroke = groupAttribute.stroke,\n lineDash = groupAttribute.lineDash,\n // width = groupAttribute.width,\n // height = groupAttribute.height,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor,\n notAdjustPos\n } = group.attribute as any;\n\n if (\n notAdjustPos !== true && // 不需要调整位置\n stroke &&\n Array.isArray(lineDash) &&\n !lineDash.length && // 非虚线\n !Array.isArray(strokeArrayColor) &&\n !Array.isArray(strokeArrayWidth) &&\n lineWidth & 1 // 奇数线宽\n ) {\n doFillOrStroke.doStroke = false;\n }\n }\n}\n\n@injectable()\nexport class AdjustPosGroupAfterRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n const {\n lineWidth = groupAttribute.lineWidth,\n stroke = groupAttribute.stroke,\n lineDash = groupAttribute.lineDash,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor,\n notAdjustPos,\n cornerRadius = groupAttribute.cornerRadius\n } = group.attribute as any;\n\n let { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;\n // width = Math.ceil(width);\n // height = Math.ceil(height);\n\n if (\n notAdjustPos !== true && // 不需要调整位置\n stroke &&\n Array.isArray(lineDash) &&\n !lineDash.length && // 非虚线\n !Array.isArray(strokeArrayColor) &&\n !Array.isArray(strokeArrayWidth) &&\n lineWidth & 1 // 奇数线宽\n ) {\n // if (group.role === 'cell') {\n // const table = (group.stage as any).table as BaseTableAPI;\n // let col = (group as any).col as number;\n // let row = (group as any).row as number;\n // const mergeInfo = getCellMergeInfo(table, col, row);\n // if (mergeInfo) {\n // col = mergeInfo.end.col;\n // row = mergeInfo.end.row;\n // }\n\n // if (table && col === table.colCount - 1) {\n // width -= 1;\n // } else if (table && col === table.frozenColCount - 1 && table.scrollLeft) {\n // width -= 1;\n // }\n // if (table && row === table.rowCount - 1) {\n // height -= 1;\n // } else if (table && row === table.frozenRowCount - 1 && table.scrollTop) {\n // height -= 1;\n // }\n // }\n\n const table = (group.stage as any).table as BaseTableAPI;\n if (!table) {\n return;\n }\n if (table.options.customConfig?._disableColumnAndRowSizeRound) {\n width = Math.round(width);\n height = Math.round(height);\n }\n\n context.beginPath();\n\n const bottomRight = table?.theme?.cellBorderClipDirection === 'bottom-right';\n const deltaWidth = 0;\n const deltaHeight = 0;\n if (bottomRight) {\n x = Math.floor(x) - 0.5;\n y = Math.floor(y) - 0.5;\n if (group.role === 'cell') {\n const col = (group as any).col as number;\n const row = (group as any).row as number;\n if (col === 0) {\n x += 1;\n }\n if (row === 0) {\n y += 1;\n }\n }\n } else {\n x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\n }\n\n const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(\n group,\n Math.ceil(width),\n Math.ceil(height),\n bottomRight\n );\n\n if (cornerRadius) {\n // 测试后,cache对于重绘性能提升不大,但是在首屏有一定性能损耗,因此rect不再使用cache\n createRectPath(context, x, y, widthFroDraw + deltaWidth, heightFroDraw + deltaHeight, cornerRadius);\n } else {\n context.rect(x, y, widthFroDraw, heightFroDraw);\n }\n context.setStrokeStyle(group, group.attribute, x, y, groupAttribute);\n context.stroke();\n }\n }\n}\n\n@injectable()\nexport class AdjustColorGroupBeforeRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n doFillOrStroke?: { doFill: boolean; doStroke: boolean }\n ) {\n // 处理hover颜色\n if ((group as Group).role === 'cell') {\n const table = (group.stage as any).table as BaseTableAPI;\n if (table) {\n const selectColor = getCellSelectColor(group as Group, table);\n if (selectColor) {\n // show select highlight when scrolling\n (group.attribute as any)._vtableHightLightFill = selectColor;\n } else if (table.stateManager.interactionState !== InteractionState.scrolling) {\n const hoverColor = getCellHoverColor(group as Group, table);\n if (hoverColor) {\n (group.attribute as any)._vtableHightLightFill = hoverColor;\n }\n }\n }\n }\n }\n}\n\n@injectable()\nexport class AdjustColorGroupAfterRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n // 处理hover颜色\n if ((group.attribute as any)._vtableHightLightFill) {\n if (fillCb) {\n // do nothing\n // fillCb(context, group.attribute, groupAttribute);\n } else if (fVisible) {\n const oldColor = group.attribute.fill;\n // draw hover fill\n group.attribute.fill = (group.attribute as any)._vtableHightLightFill as any;\n context.setCommonStyle(group, group.attribute, x, y, groupAttribute);\n context.fill();\n group.attribute.fill = oldColor;\n (group.attribute as any)._vtableHightLightFill = undefined;\n }\n }\n }\n}\n\n@injectable()\nexport class ClipBodyGroupBeforeRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n xOrigin: number,\n yOrigin: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n doFillOrStroke?: { doFill: boolean; doStroke: boolean }\n ) {\n const table = (group.stage as any).table as BaseTableAPI;\n if (!table) {\n return;\n }\n\n if ((group as Group).role === 'body') {\n const x = -(group.attribute.x ?? 0) + table.getFrozenColsWidth();\n const y = -(group.attribute.y ?? 0) + table.getFrozenRowsHeight();\n const width = group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth();\n const height = group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();\n drawClipRect(context, x, y, width, height);\n } else if ((group as Group).role === 'row-header') {\n const x = 0;\n const y = -(group.attribute.y ?? 0) + table.getFrozenRowsHeight();\n const width = table.getFrozenColsWidth();\n const height = group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();\n drawClipRect(context, x, y, width, height);\n } else if ((group as Group).role === 'col-header') {\n const x = -(group.attribute.x ?? 0) + table.getFrozenColsWidth();\n const y = 0;\n const width = group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth();\n const height = table.getFrozenRowsHeight();\n drawClipRect(context, x, y, width, height);\n } else if ((group as Group).role === 'right-frozen') {\n const x = 0;\n const y = -(group.attribute.y ?? 0) + table.getFrozenRowsHeight();\n const width = table.getRightFrozenColsWidth();\n const height = group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();\n drawClipRect(context, x, y, width, height);\n } else if ((group as Group).role === 'bottom-frozen') {\n const x = -(group.attribute.x ?? 0) + table.getFrozenColsWidth();\n const y = 0;\n const width = group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth();\n const height = table.getBottomFrozenRowsHeight();\n drawClipRect(context, x, y, width, height);\n } else if ((group as Group).role === 'corner-header') {\n const x = 0;\n const y = 0;\n const width = table.getFrozenColsWidth();\n const height = table.getFrozenRowsHeight();\n drawClipRect(context, x, y, width, height);\n } else if ((group as Group).role === 'corner-right-top-header') {\n const x = 0;\n const y = 0;\n const width = table.getRightFrozenColsWidth();\n const height = table.getFrozenRowsHeight();\n drawClipRect(context, x, y, width, height);\n } else if ((group as Group).role === 'corner-right-bottom-header') {\n const x = 0;\n const y = 0;\n const width = table.getRightFrozenColsWidth();\n const height = table.getBottomFrozenRowsHeight();\n drawClipRect(context, x, y, width, height);\n } else if ((group as Group).role === 'corner-left-bottom-header') {\n const x = 0;\n const y = 0;\n const width = table.getFrozenColsWidth();\n const height = table.getBottomFrozenRowsHeight();\n drawClipRect(context, x, y, width, height);\n }\n }\n}\n\nconst precision = Math.pow(2, 24);\n\nfunction drawClipRect(context: IContext2d, x: number, y: number, width: number, height: number) {\n context.beginPath();\n\n const matrix = context.applyedMatrix;\n if (Math.abs(matrix.f) > precision || Math.abs(matrix.g) > precision) {\n // hack for precision problem in CanvasRenderingContext2D\n // if position is too big, disable clip\n context.rect(x - precision, y - precision, width + precision * 2, height + precision * 2);\n } else {\n context.rect(x, y, width, height);\n }\n}\n\n// @injectable()\n// export class ClipBodyGroupAfterRenderContribution implements IGroupRenderContribution {\n// time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n// useStyle = true;\n// order = 0;\n// drawShape(\n// group: IGroup,\n// context: IContext2d,\n// x: number,\n// y: number,\n// doFill: boolean,\n// doStroke: boolean,\n// fVisible: boolean,\n// sVisible: boolean,\n// groupAttribute: Required<IGroupGraphicAttribute>,\n// drawContext: IDrawContext,\n// fillCb?: (\n// ctx: IContext2d,\n// markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n// themeAttribute: IThemeAttribute\n// ) => boolean,\n// strokeCb?: (\n// ctx: IContext2d,\n// markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n// themeAttribute: IThemeAttribute\n// ) => boolean\n// ) {\n// // 处理hover颜色\n// if ((group as Group).role === 'body') {\n// }\n// }\n// }\n\nfunction getCellSizeForDraw(group: any, width: number, height: number, bottomRight: boolean) {\n const table = group.stage.table as BaseTableAPI;\n if (!table) {\n return { width, height };\n }\n if (group.role === 'cell') {\n let col = group.col as number;\n let row = group.row as number;\n const mergeInfo = getCellMergeInfo(table, col, row);\n if (mergeInfo) {\n col = mergeInfo.end.col;\n row = mergeInfo.end.row;\n }\n\n if (col === table.colCount - 1 && !bottomRight) {\n width -= 1;\n } else if (col === table.frozenColCount - 1 && table.scrollLeft && !bottomRight) {\n width -= 1;\n } else if (col === 0 && bottomRight) {\n width -= 1;\n }\n if (row === table.rowCount - 1 && !bottomRight) {\n height -= 1;\n } else if (row === table.frozenRowCount - 1 && table.scrollTop && !bottomRight) {\n height -= 1;\n } else if (row === 0 && bottomRight) {\n height -= 1;\n }\n } else if (group.role === 'corner-frozen') {\n if (table.scrollLeft && !bottomRight) {\n width -= 1;\n }\n if (table.scrollTop && !bottomRight) {\n height -= 1;\n }\n }\n\n return { width, height };\n}\n\nfunction getQuadLineDash(lineDash: number[][]) {\n if (lineDash.length === 1) {\n return [lineDash[0], lineDash[0], lineDash[0], lineDash[0]];\n } else if (lineDash.length === 2) {\n return [lineDash[0], lineDash[1], lineDash[0], lineDash[1]];\n }\n // 不考虑三个数的情况,三个数是用户传错了\n return lineDash;\n}\n"]}
@@ -112,8 +112,7 @@ class Group extends vrender_1.Group {
112
112
  if ("cell" === this.role) {
113
113
  const attribute = this.attribute, {x: x, y: y, width: width, height: height} = attribute;
114
114
  return this._AABBBounds.setValue(x, y, x + width, y + height), this.parent && this.parent.addChildUpdateBoundTag(),
115
- this.clearUpdateBoundTag(), this.shadowRoot && this.shadowRoot.tryUpdateAABBBounds(),
116
- this._AABBBounds;
115
+ this.clearUpdateBoundTag(), this._AABBBounds;
117
116
  }
118
117
  return "body" === this.role || "row-header" === this.role || "col-header" === this.role || "right-frozen" === this.role || "bottom-frozen" === this.role || "corner-header" === this.role || "corner-right-top-header" === this.role || "corner-right-bottom-header" === this.role || "corner-left-bottom-header" === this.role ? (this._AABBBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0),
119
118
  this.parent && this.parent.addChildUpdateBoundTag(), this.clearUpdateBoundTag(),
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/graphic/group.ts"],"names":[],"mappings":";;;AACA,6CAAwD;AAKxD,MAAa,K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,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC;SAC7B;aAAM;YACL,IAAI,CAAC,SAAS,IAAI,UAAU,CAAC;SAC9B;IACH,CAAC;CAWF;AA3XD,sBA2XC;AAED,SAAS,KAAK,CAAC,KAAY,EAAE,UAAmB;IAC9C,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE;QACxE,OAAO;KACR;IAED,IAAI,KAAK,CAAC,WAAW,IAAI,CAAC,UAAU,EAAE;QACpC,OAAO;KACR;IACD,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;AAC5C,CAAC","file":"group.js","sourcesContent":["import type { IGraphic, IColor, IRect, INode, IGroupGraphicAttribute, ISetAttributeContext } from './../../vrender';\nimport { Group as VRenderGroup } from './../../vrender';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport { InteractionState } from '../../ts-types';\nimport { isNumber, type AABBBounds } from '@visactor/vutils';\n\nexport class Group extends VRenderGroup {\n role?: string;\n col?: number;\n row?: number;\n mergeStartCol?: number;\n mergeStartRow?: number;\n mergeEndCol?: number;\n mergeEndRow?: number;\n contentWidth?: number;\n contentHeight?: number;\n rowNumber?: number; // row number of the column group\n colHeight?: number; // current height of the column group\n border?: IRect; // table/header/body的border mark,挂载在这里方便更新\n needUpdate?: boolean;\n\n needUpdateWidth?: boolean;\n needUpdateHeight?: boolean;\n\n // changes for size align for fs\n // constructor(attribute?: IGroupGraphicAttribute) {\n // dealWidthSize(attribute, attribute);\n // super(attribute);\n // }\n\n // setAttribute(key: string, value: any, forceUpdateTag?: boolean, context?: ISetAttributeContext): void {\n // if (key === 'x' || key === 'y' || key === 'width' || key === 'height') {\n // this.attribute[`old${key}`];\n // }\n // const values = {\n // [key]: value\n // };\n // this.setAttributes(values, forceUpdateTag, context);\n // }\n\n // setAttributes(\n // params: Partial<IGroupGraphicAttribute>,\n // forceUpdateTag?: boolean,\n // context?: ISetAttributeContext\n // ): void {\n // dealWidthSize(params, this.attribute);\n // super.setAttributes(params, forceUpdateTag, context);\n // }\n\n /**\n * @description: 清空Group下全部子元素\n * @return {*}\n */\n clear() {\n this.removeAllChild();\n }\n\n getChildByName(name: string, deep?: boolean): any {\n // for (let i = 0, j = this.children.length; i < j; i++) {\n // if (this.children[i].name === name) {\n // return this.children[i] as unknown as T;\n // }\n // }\n let result = null;\n this.forEachChildren((child: IGraphic) => {\n if (child.name === name) {\n result = child;\n return true; // 提前退出循环\n }\n return false;\n });\n\n if (deep) {\n // for (let i = 0, j = this.children.length; i < j; i++) {\n // const child = this.children[i] as Group;\n\n // if (!child.getChildByName) {\n // continue;\n // }\n\n // const target = child.getChildByName(name, true);\n\n // if (target) {\n // return target;\n // }\n // }\n this.forEachChildren((child: IGraphic) => {\n if ((child as Group).getChildByName) {\n const target = (child as Group).getChildByName(name, true);\n if (target) {\n result = target;\n return true;\n }\n }\n return false;\n });\n }\n\n return result;\n }\n\n get width() {\n let width = this.AABBBounds.width();\n if (width === Infinity || width === -Infinity) {\n width = 0;\n }\n return Math.max(width, this.attribute.width ?? 0);\n }\n\n get height() {\n let height = this.AABBBounds.height();\n if (height === Infinity || height === -Infinity) {\n height = 0;\n }\n return Math.max(height, this.attribute.height ?? 0);\n }\n\n setDeltaWidth(deltaX: number) {\n if (deltaX === 0) {\n return;\n }\n this.setAttribute('width', (this.attribute.width ?? 0) + deltaX);\n if (this.border) {\n this.border.setAttribute('width', this.border.attribute.width + deltaX);\n\n if (this.border.type === 'group') {\n (this.border.firstChild as IRect).setAttribute(\n 'width',\n (this.border.firstChild as IRect).attribute.width + deltaX\n );\n }\n }\n }\n\n setDeltaHeight(deltaY: number) {\n if (deltaY === 0) {\n return;\n }\n this.setAttribute('height', (this.attribute.height ?? 0) + deltaY);\n if (this.border) {\n this.border.setAttribute('height', this.border.attribute.height + deltaY);\n if (this.border.type === 'group') {\n (this.border.firstChild as IRect).setAttribute(\n 'width',\n (this.border.firstChild as IRect).attribute.height + deltaY\n );\n }\n }\n }\n\n setDeltaX(deltaX: number) {\n if (deltaX === 0) {\n return;\n }\n this.setAttribute('x', this.attribute.x + deltaX);\n }\n\n setDeltaY(deltaY: number) {\n if (deltaY === 0) {\n return;\n }\n this.setAttribute('y', this.attribute.y + deltaY);\n }\n\n /**\n * @description: 遍历所有子节点,跳过部分节点,默认跳过group的border\n * @return {*}\n */\n forEachChildrenSkipChild<T extends INode = INode>(\n cb: (item: T, index: number) => void | boolean,\n skipChildName = 'border-rect',\n reverse = false\n ) {\n if (reverse) {\n let child = this._lastChild;\n let i = 0;\n while (child) {\n if (child.name !== skipChildName) {\n const breakTag = cb(child as T, i++);\n if (breakTag) {\n return;\n }\n }\n child = child._prev;\n }\n } else {\n let child = this._firstChild;\n let i = 0;\n while (child) {\n if (child.name !== skipChildName) {\n const breakTag = cb(child as T, i++);\n if (breakTag) {\n return;\n }\n }\n child = child._next;\n }\n }\n }\n\n getColGroup(col: number) {\n let c = this._firstChild as Group;\n if (!c) {\n return null;\n }\n for (let i = 0; i < this.childrenCount; i++) {\n if (c.col === col) {\n return c;\n }\n c = c._next as Group;\n }\n return null;\n }\n\n getRowGroup(row: number) {\n let c = this._firstChild as Group;\n if (!c) {\n return null;\n }\n for (let i = 0; i < this.childrenCount; i++) {\n if (c.row === row) {\n return c;\n }\n c = c._next as Group;\n }\n return null;\n }\n\n addCellGroup(cellGroup: Group) {\n if (this.childrenCount === 0 || (this.lastChild as Group).row === cellGroup.row - 1) {\n this.addChild(cellGroup);\n } else {\n // for promise cell row order in column\n let c = this._firstChild as Group;\n for (let i = 0; i < this.childrenCount; i++) {\n if (c.row === cellGroup.row - 1) {\n this.insertAfter(cellGroup, c);\n return;\n }\n c = c._next as Group;\n }\n this.addChild(cellGroup);\n }\n }\n\n getChildAt(index: number) {\n const child = super.getChildAt(index);\n if (child && child.name === 'border-rect') {\n return child._next;\n }\n return child;\n }\n\n protected tryUpdateAABBBounds(): AABBBounds {\n if (this.role === 'cell') {\n if (!this.shouldUpdateAABBBounds()) {\n return this._AABBBounds as AABBBounds;\n }\n // application.graphicService.beforeUpdateAABBBounds(this, this.stage, true, this._AABBBounds);\n const selfChange = this.shouldSelfChangeUpdateAABBBounds();\n // const selfChange = true;\n const bounds = this.doUpdateAABBBounds();\n this.addUpdateLayoutTag();\n // application.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, selfChange);\n after(this, selfChange);\n\n return bounds;\n }\n return super.tryUpdateAABBBounds() as AABBBounds;\n }\n\n // 目前优化方案会导致合并单元格无法正常更新列宽(因为合并单元格更新bounds不会触发父节点bounds更新),暂时关闭优化方案\n // shouldUpdateAABBBoundsForRowMerge(): boolean {\n\n // }\n\n // shouldUpdateAABBBounds(): boolean {\n // return this.shouldSelfChangeUpdateAABBBounds();\n // // // 检索自己是否需要更新\n // // if (super.shouldUpdateAABBBounds()) {\n // // return true;\n // // }\n // // // 检索叶子节点是否有更新(如果children是叶子节点的话)\n // // if (this._childUpdateTag & UpdateTag.UPDATE_BOUNDS) {\n // // return true;\n // // }\n // // // 检索是否子group需要更新\n // // let needUpdate = false;\n // // this.forEachChildren((node: IGraphic) => {\n // // // 只查找group层级\n // // if (node.isContainer && (node as Group).shouldUpdateAABBBounds()) {\n // // needUpdate = true;\n // // return true;\n // // }\n // // return false;\n // // });\n // // return needUpdate;\n // }\n\n protected doUpdateAABBBounds(): any {\n // const groupTheme = getTheme(this).group;\n // debugger;\n if (this.role === 'cell') {\n const attribute = this.attribute;\n const { x, y, width, height } = attribute;\n this._AABBBounds.setValue(x, y, x + width, y + height);\n // 更新bounds之后需要设置父节点,否则tag丢失\n this.parent && this.parent.addChildUpdateBoundTag();\n this.clearUpdateBoundTag();\n if (this.shadowRoot) {\n // this.shadowRoot.clearUpdateBoundTag();\n this.shadowRoot.tryUpdateAABBBounds();\n }\n return this._AABBBounds;\n } else if (\n this.role === 'body' ||\n this.role === 'row-header' ||\n this.role === 'col-header' ||\n this.role === 'right-frozen' ||\n this.role === 'bottom-frozen' ||\n this.role === 'corner-header' ||\n this.role === 'corner-right-top-header' ||\n this.role === 'corner-right-bottom-header' ||\n this.role === 'corner-left-bottom-header'\n ) {\n // Infinity bounds for manual clip group\n this._AABBBounds.setValue(-Infinity, -Infinity, Infinity, Infinity);\n // 更新bounds之后需要设置父节点,否则tag丢失\n this.parent && this.parent.addChildUpdateBoundTag();\n this.clearUpdateBoundTag();\n\n if (this.shadowRoot) {\n // this.shadowRoot.clearUpdateBoundTag();\n this.shadowRoot.tryUpdateAABBBounds();\n }\n return this._AABBBounds;\n }\n return super.doUpdateAABBBounds();\n // _AABBBounds\n // const bounds = graphicService.updateGroupAABBBounds(\n // attribute,\n // getTheme(this).group,\n // this._AABBBounds,\n // this\n // ) as AABBBounds;\n\n // const { boundsPadding = groupTheme.boundsPadding } = attribute;\n // const paddingArray = parsePadding(boundsPadding);\n // if (paddingArray) {\n // bounds.expand(paddingArray);\n // }\n // // 更新bounds之后需要设置父节点,否则tag丢失\n // this.parent && this.parent.addChildUpdateBoundTag();\n // this.clearUpdateBoundTag();\n\n // this.emit('AAABBBoundsChange');\n }\n\n // update column group row number\n updateColumnRowNumber(row: number) {\n if (!this.rowNumber) {\n this.rowNumber = row;\n } else {\n this.rowNumber = Math.max(this.rowNumber, row);\n }\n }\n\n // update column height\n updateColumnHeight(cellHeight: number) {\n if (!this.colHeight) {\n this.colHeight = cellHeight;\n } else {\n this.colHeight += cellHeight;\n }\n }\n\n // doUpdateLocalMatrix() {\n // const oldX = this.attribute.x;\n // const oldY = this.attribute.y;\n // this.attribute.x = Math.floor(this.attribute.x);\n // this.attribute.y = Math.floor(this.attribute.y);\n // super.doUpdateLocalMatrix();\n // this.attribute.x = oldX;\n // this.attribute.y = oldY;\n // }\n}\n\nfunction after(group: Group, selfChange: boolean) {\n if (!group.stage || !group.stage.dirtyBounds || !group.stage.renderCount) {\n return;\n }\n // group的子元素导致的bounds更新不用做dirtyBounds\n if (group.isContainer && !selfChange) {\n return;\n }\n group.stage.dirty(group.globalAABBBounds);\n}\n\n// function dealWidthSize(values: any, attributes: any) {\n// const x = values.x ?? attributes.oldx ?? attributes.x ?? 0 + values.dx ?? attributes.dx ?? 0;\n// const y = values.y ?? attributes.oldy ?? attributes.y ?? 0 + values.dy ?? attributes.dy ?? 0;\n// const width = values.width ?? attributes.oldwidth ?? attributes.width ?? 0;\n// const height = values.height ?? attributes.oldheight ?? attributes.height ?? 0;\n// isNumber(values.width) && (values.oldwidth = values.width);\n// isNumber(values.height) && (values.oldheight = values.height);\n// isNumber(values.x) && (values.oldx = values.x);\n// isNumber(values.y) && (values.oldy = values.y);\n\n// if (Math.floor(x + width) > Math.floor(width) + Math.floor(x)) {\n// values.width = Math.ceil(width);\n// } else {\n// values.width = Math.floor(width);\n// }\n\n// if (Math.floor(y + height) > Math.floor(height) + Math.floor(y)) {\n// values.height = Math.ceil(height);\n// } else {\n// values.height = Math.floor(height);\n// }\n// isNumber(values.x) && (values.x = Math.floor(values.x));\n// isNumber(values.y) && (values.y = Math.floor(values.y));\n// }\n"]}
1
+ {"version":3,"sources":["../src/scenegraph/graphic/group.ts"],"names":[],"mappings":";;;AACA,6CAAwD;AAKxD,MAAa,KAAM,SAAQ,eAAY;IA+CrC,KAAK;QACH,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAED,cAAc,CAAC,IAAY,EAAE,IAAc;QAMzC,IAAI,MAAM,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,eAAe,CAAC,CAAC,KAAe,EAAE,EAAE;YACvC,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,EAAE;gBACvB,MAAM,GAAG,KAAK,CAAC;gBACf,OAAO,IAAI,CAAC;aACb;YACD,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;QAEH,IAAI,IAAI,EAAE;YAcR,IAAI,CAAC,eAAe,CAAC,CA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esContent":["import type { IGraphic, IColor, IRect, INode, IGroupGraphicAttribute, ISetAttributeContext } from './../../vrender';\nimport { Group as VRenderGroup } from './../../vrender';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport { InteractionState } from '../../ts-types';\nimport { isNumber, type AABBBounds } from '@visactor/vutils';\n\nexport class Group extends VRenderGroup {\n role?: string;\n col?: number;\n row?: number;\n mergeStartCol?: number;\n mergeStartRow?: number;\n mergeEndCol?: number;\n mergeEndRow?: number;\n contentWidth?: number;\n contentHeight?: number;\n rowNumber?: number; // row number of the column group\n colHeight?: number; // current height of the column group\n border?: IRect; // table/header/body的border mark,挂载在这里方便更新\n needUpdate?: boolean;\n\n needUpdateWidth?: boolean;\n needUpdateHeight?: boolean;\n\n // changes for size align for fs\n // constructor(attribute?: IGroupGraphicAttribute) {\n // dealWidthSize(attribute, attribute);\n // super(attribute);\n // }\n\n // setAttribute(key: string, value: any, forceUpdateTag?: boolean, context?: ISetAttributeContext): void {\n // if (key === 'x' || key === 'y' || key === 'width' || key === 'height') {\n // this.attribute[`old${key}`];\n // }\n // const values = {\n // [key]: value\n // };\n // this.setAttributes(values, forceUpdateTag, context);\n // }\n\n // setAttributes(\n // params: Partial<IGroupGraphicAttribute>,\n // forceUpdateTag?: boolean,\n // context?: ISetAttributeContext\n // ): void {\n // dealWidthSize(params, this.attribute);\n // super.setAttributes(params, forceUpdateTag, context);\n // }\n\n /**\n * @description: 清空Group下全部子元素\n * @return {*}\n */\n clear() {\n this.removeAllChild();\n }\n\n getChildByName(name: string, deep?: boolean): any {\n // for (let i = 0, j = this.children.length; i < j; i++) {\n // if (this.children[i].name === name) {\n // return this.children[i] as unknown as T;\n // }\n // }\n let result = null;\n this.forEachChildren((child: IGraphic) => {\n if (child.name === name) {\n result = child;\n return true; // 提前退出循环\n }\n return false;\n });\n\n if (deep) {\n // for (let i = 0, j = this.children.length; i < j; i++) {\n // const child = this.children[i] as Group;\n\n // if (!child.getChildByName) {\n // continue;\n // }\n\n // const target = child.getChildByName(name, true);\n\n // if (target) {\n // return target;\n // }\n // }\n this.forEachChildren((child: IGraphic) => {\n if ((child as Group).getChildByName) {\n const target = (child as Group).getChildByName(name, true);\n if (target) {\n result = target;\n return true;\n }\n }\n return false;\n });\n }\n\n return result;\n }\n\n get width() {\n let width = this.AABBBounds.width();\n if (width === Infinity || width === -Infinity) {\n width = 0;\n }\n return Math.max(width, this.attribute.width ?? 0);\n }\n\n get height() {\n let height = this.AABBBounds.height();\n if (height === Infinity || height === -Infinity) {\n height = 0;\n }\n return Math.max(height, this.attribute.height ?? 0);\n }\n\n setDeltaWidth(deltaX: number) {\n if (deltaX === 0) {\n return;\n }\n this.setAttribute('width', (this.attribute.width ?? 0) + deltaX);\n if (this.border) {\n this.border.setAttribute('width', this.border.attribute.width + deltaX);\n\n if (this.border.type === 'group') {\n (this.border.firstChild as IRect).setAttribute(\n 'width',\n (this.border.firstChild as IRect).attribute.width + deltaX\n );\n }\n }\n }\n\n setDeltaHeight(deltaY: number) {\n if (deltaY === 0) {\n return;\n }\n this.setAttribute('height', (this.attribute.height ?? 0) + deltaY);\n if (this.border) {\n this.border.setAttribute('height', this.border.attribute.height + deltaY);\n if (this.border.type === 'group') {\n (this.border.firstChild as IRect).setAttribute(\n 'width',\n (this.border.firstChild as IRect).attribute.height + deltaY\n );\n }\n }\n }\n\n setDeltaX(deltaX: number) {\n if (deltaX === 0) {\n return;\n }\n this.setAttribute('x', this.attribute.x + deltaX);\n }\n\n setDeltaY(deltaY: number) {\n if (deltaY === 0) {\n return;\n }\n this.setAttribute('y', this.attribute.y + deltaY);\n }\n\n /**\n * @description: 遍历所有子节点,跳过部分节点,默认跳过group的border\n * @return {*}\n */\n forEachChildrenSkipChild<T extends INode = INode>(\n cb: (item: T, index: number) => void | boolean,\n skipChildName = 'border-rect',\n reverse = false\n ) {\n if (reverse) {\n let child = this._lastChild;\n let i = 0;\n while (child) {\n if (child.name !== skipChildName) {\n const breakTag = cb(child as T, i++);\n if (breakTag) {\n return;\n }\n }\n child = child._prev;\n }\n } else {\n let child = this._firstChild;\n let i = 0;\n while (child) {\n if (child.name !== skipChildName) {\n const breakTag = cb(child as T, i++);\n if (breakTag) {\n return;\n }\n }\n child = child._next;\n }\n }\n }\n\n getColGroup(col: number) {\n let c = this._firstChild as Group;\n if (!c) {\n return null;\n }\n for (let i = 0; i < this.childrenCount; i++) {\n if (c.col === col) {\n return c;\n }\n c = c._next as Group;\n }\n return null;\n }\n\n getRowGroup(row: number) {\n let c = this._firstChild as Group;\n if (!c) {\n return null;\n }\n for (let i = 0; i < this.childrenCount; i++) {\n if (c.row === row) {\n return c;\n }\n c = c._next as Group;\n }\n return null;\n }\n\n addCellGroup(cellGroup: Group) {\n if (this.childrenCount === 0 || (this.lastChild as Group).row === cellGroup.row - 1) {\n this.addChild(cellGroup);\n } else {\n // for promise cell row order in column\n let c = this._firstChild as Group;\n for (let i = 0; i < this.childrenCount; i++) {\n if (c.row === cellGroup.row - 1) {\n this.insertAfter(cellGroup, c);\n return;\n }\n c = c._next as Group;\n }\n this.addChild(cellGroup);\n }\n }\n\n getChildAt(index: number) {\n const child = super.getChildAt(index);\n if (child && child.name === 'border-rect') {\n return child._next;\n }\n return child;\n }\n\n protected tryUpdateAABBBounds(): AABBBounds {\n if (this.role === 'cell') {\n if (!this.shouldUpdateAABBBounds()) {\n return this._AABBBounds as AABBBounds;\n }\n // application.graphicService.beforeUpdateAABBBounds(this, this.stage, true, this._AABBBounds);\n const selfChange = this.shouldSelfChangeUpdateAABBBounds();\n // const selfChange = true;\n const bounds = this.doUpdateAABBBounds();\n this.addUpdateLayoutTag();\n // application.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, selfChange);\n after(this, selfChange);\n\n return bounds;\n }\n return super.tryUpdateAABBBounds() as AABBBounds;\n }\n\n // 目前优化方案会导致合并单元格无法正常更新列宽(因为合并单元格更新bounds不会触发父节点bounds更新),暂时关闭优化方案\n // shouldUpdateAABBBoundsForRowMerge(): boolean {\n\n // }\n\n // shouldUpdateAABBBounds(): boolean {\n // return this.shouldSelfChangeUpdateAABBBounds();\n // // // 检索自己是否需要更新\n // // if (super.shouldUpdateAABBBounds()) {\n // // return true;\n // // }\n // // // 检索叶子节点是否有更新(如果children是叶子节点的话)\n // // if (this._childUpdateTag & UpdateTag.UPDATE_BOUNDS) {\n // // return true;\n // // }\n // // // 检索是否子group需要更新\n // // let needUpdate = false;\n // // this.forEachChildren((node: IGraphic) => {\n // // // 只查找group层级\n // // if (node.isContainer && (node as Group).shouldUpdateAABBBounds()) {\n // // needUpdate = true;\n // // return true;\n // // }\n // // return false;\n // // });\n // // return needUpdate;\n // }\n\n protected doUpdateAABBBounds(): any {\n // const groupTheme = getTheme(this).group;\n // debugger;\n if (this.role === 'cell') {\n const attribute = this.attribute;\n const { x, y, width, height } = attribute;\n this._AABBBounds.setValue(x, y, x + width, y + height);\n // 更新bounds之后需要设置父节点,否则tag丢失\n this.parent && this.parent.addChildUpdateBoundTag();\n this.clearUpdateBoundTag();\n return this._AABBBounds;\n } else if (\n this.role === 'body' ||\n this.role === 'row-header' ||\n this.role === 'col-header' ||\n this.role === 'right-frozen' ||\n this.role === 'bottom-frozen' ||\n this.role === 'corner-header' ||\n this.role === 'corner-right-top-header' ||\n this.role === 'corner-right-bottom-header' ||\n this.role === 'corner-left-bottom-header'\n ) {\n // Infinity bounds for manual clip group\n this._AABBBounds.setValue(-Infinity, -Infinity, Infinity, Infinity);\n // 更新bounds之后需要设置父节点,否则tag丢失\n this.parent && this.parent.addChildUpdateBoundTag();\n this.clearUpdateBoundTag();\n\n if (this.shadowRoot) {\n // this.shadowRoot.clearUpdateBoundTag();\n this.shadowRoot.tryUpdateAABBBounds();\n }\n return this._AABBBounds;\n }\n return super.doUpdateAABBBounds();\n // _AABBBounds\n // const bounds = graphicService.updateGroupAABBBounds(\n // attribute,\n // getTheme(this).group,\n // this._AABBBounds,\n // this\n // ) as AABBBounds;\n\n // const { boundsPadding = groupTheme.boundsPadding } = attribute;\n // const paddingArray = parsePadding(boundsPadding);\n // if (paddingArray) {\n // bounds.expand(paddingArray);\n // }\n // // 更新bounds之后需要设置父节点,否则tag丢失\n // this.parent && this.parent.addChildUpdateBoundTag();\n // this.clearUpdateBoundTag();\n\n // this.emit('AAABBBoundsChange');\n }\n\n // update column group row number\n updateColumnRowNumber(row: number) {\n if (!this.rowNumber) {\n this.rowNumber = row;\n } else {\n this.rowNumber = Math.max(this.rowNumber, row);\n }\n }\n\n // update column height\n updateColumnHeight(cellHeight: number) {\n if (!this.colHeight) {\n this.colHeight = cellHeight;\n } else {\n this.colHeight += cellHeight;\n }\n }\n\n // doUpdateLocalMatrix() {\n // const oldX = this.attribute.x;\n // const oldY = this.attribute.y;\n // this.attribute.x = Math.floor(this.attribute.x);\n // this.attribute.y = Math.floor(this.attribute.y);\n // super.doUpdateLocalMatrix();\n // this.attribute.x = oldX;\n // this.attribute.y = oldY;\n // }\n}\n\nfunction after(group: Group, selfChange: boolean) {\n if (!group.stage || !group.stage.dirtyBounds || !group.stage.renderCount) {\n return;\n }\n // group的子元素导致的bounds更新不用做dirtyBounds\n if (group.isContainer && !selfChange) {\n return;\n }\n group.stage.dirty(group.globalAABBBounds);\n}\n\n// function dealWidthSize(values: any, attributes: any) {\n// const x = values.x ?? attributes.oldx ?? attributes.x ?? 0 + values.dx ?? attributes.dx ?? 0;\n// const y = values.y ?? attributes.oldy ?? attributes.y ?? 0 + values.dy ?? attributes.dy ?? 0;\n// const width = values.width ?? attributes.oldwidth ?? attributes.width ?? 0;\n// const height = values.height ?? attributes.oldheight ?? attributes.height ?? 0;\n// isNumber(values.width) && (values.oldwidth = values.width);\n// isNumber(values.height) && (values.oldheight = values.height);\n// isNumber(values.x) && (values.oldx = values.x);\n// isNumber(values.y) && (values.oldy = values.y);\n\n// if (Math.floor(x + width) > Math.floor(width) + Math.floor(x)) {\n// values.width = Math.ceil(width);\n// } else {\n// values.width = Math.floor(width);\n// }\n\n// if (Math.floor(y + height) > Math.floor(height) + Math.floor(y)) {\n// values.height = Math.ceil(height);\n// } else {\n// values.height = Math.floor(height);\n// }\n// isNumber(values.x) && (values.x = Math.floor(values.x));\n// isNumber(values.y) && (values.y = Math.floor(values.y));\n// }\n"]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.getCustomCellMergeCustom = exports.resizeCellGroup = exports.dealWithMergeCellSizeForShadow = exports.dealWithMergeCellSize = exports.updateCell = exports.createCell = void 0;
6
6
 
7
- const global_1 = require("../../tools/global"), custom_1 = require("../component/custom"), get_prop_1 = require("../utils/get-prop"), tableHelper_1 = require("../../core/tableHelper"), helper_1 = require("../../tools/helper"), deal_promise_data_1 = require("../utils/deal-promise-data"), factory_1 = require("../../core/factory"), get_hierarchy_offset_1 = require("../utils/get-hierarchy-offset"), padding_1 = require("../utils/padding"), text_icon_layout_1 = require("../utils/text-icon-layout"), vutils_1 = require("@visactor/vutils"), break_string_1 = require("../utils/break-string"), invert_highlight_1 = require("../../plugins/invert-highlight");
7
+ const global_1 = require("../../tools/global"), custom_1 = require("../component/custom"), get_prop_1 = require("../utils/get-prop"), tableHelper_1 = require("../../core/tableHelper"), helper_1 = require("../../tools/helper"), deal_promise_data_1 = require("../utils/deal-promise-data"), factory_1 = require("../../core/factory"), get_hierarchy_offset_1 = require("../utils/get-hierarchy-offset"), padding_1 = require("../utils/padding"), text_icon_layout_1 = require("../utils/text-icon-layout"), vutils_1 = require("@visactor/vutils"), break_string_1 = require("../utils/break-string");
8
8
 
9
9
  function createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult) {
10
10
  var _a, _b;
@@ -64,8 +64,7 @@ function createCell(type, value, define, table, col, row, colWidth, cellWidth, c
64
64
  } else if ("radio" === type) {
65
65
  cellGroup = factory_1.Factory.getFunction("createRadioCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define);
66
66
  }
67
- return cellGroup.onBeforeAttributeUpdate = invert_highlight_1.onBeforeAttributeUpdateForInvertHighlight,
68
- cellGroup;
67
+ return cellGroup;
69
68
  }
70
69
 
71
70
  function updateCell(col, row, table, addNew, isShadow) {