@visactor/vtable 0.23.0-alpha.0 → 0.23.0

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 (203) hide show
  1. package/cjs/ListTable.d.ts +3 -3
  2. package/cjs/ListTable.js +45 -34
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotTable.d.ts +1 -1
  5. package/cjs/PivotTable.js +19 -17
  6. package/cjs/PivotTable.js.map +1 -1
  7. package/cjs/body-helper/style/Style.d.ts +3 -0
  8. package/cjs/body-helper/style/Style.js +22 -15
  9. package/cjs/body-helper/style/Style.js.map +1 -1
  10. package/cjs/components/legend/continue-legend/continue-legend.js +1 -1
  11. package/cjs/components/legend/continue-legend/continue-legend.js.map +1 -1
  12. package/cjs/components/legend/discrete-legend/discrete-legend.js +1 -1
  13. package/cjs/components/legend/discrete-legend/discrete-legend.js.map +1 -1
  14. package/cjs/core/BaseTable.d.ts +3 -1
  15. package/cjs/core/BaseTable.js +27 -17
  16. package/cjs/core/BaseTable.js.map +1 -1
  17. package/cjs/core/TABLE_EVENT_TYPE.d.ts +2 -0
  18. package/cjs/core/TABLE_EVENT_TYPE.js +2 -0
  19. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  20. package/cjs/core/tableHelper.js +1 -2
  21. package/cjs/core/tableHelper.js.map +1 -1
  22. package/cjs/data/CachedDataSource.d.ts +1 -0
  23. package/cjs/data/CachedDataSource.js +10 -6
  24. package/cjs/data/CachedDataSource.js.map +1 -1
  25. package/cjs/data/DataSource.d.ts +10 -3
  26. package/cjs/data/DataSource.js +159 -95
  27. package/cjs/data/DataSource.js.map +1 -1
  28. package/cjs/edit/edit-manager.js +10 -9
  29. package/cjs/edit/edit-manager.js.map +1 -1
  30. package/cjs/event/event.js +11 -5
  31. package/cjs/event/event.js.map +1 -1
  32. package/cjs/event/listener/table-group.js +2 -2
  33. package/cjs/event/listener/table-group.js.map +1 -1
  34. package/cjs/event/media-click.js +2 -1
  35. package/cjs/event/sparkline-event.js +1 -2
  36. package/cjs/header-helper/style/Style.d.ts +3 -0
  37. package/cjs/header-helper/style/Style.js +26 -19
  38. package/cjs/header-helper/style/Style.js.map +1 -1
  39. package/cjs/index.d.ts +1 -1
  40. package/cjs/index.js +1 -1
  41. package/cjs/index.js.map +1 -1
  42. package/cjs/layout/pivot-header-layout.js +4 -2
  43. package/cjs/layout/pivot-header-layout.js.map +1 -1
  44. package/cjs/layout/simple-header-layout.d.ts +3 -2
  45. package/cjs/layout/simple-header-layout.js +40 -25
  46. package/cjs/layout/simple-header-layout.js.map +1 -1
  47. package/cjs/scenegraph/component/table-component.js +13 -8
  48. package/cjs/scenegraph/component/table-component.js.map +1 -1
  49. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +10 -6
  50. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  51. package/cjs/scenegraph/group-creater/cell-helper.js +3 -1
  52. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  53. package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.d.ts +3 -2
  54. package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js +20 -6
  55. package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
  56. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +1 -1
  57. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  58. package/cjs/scenegraph/layout/compute-col-width.js +12 -8
  59. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  60. package/cjs/scenegraph/layout/compute-row-height.js +72 -71
  61. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  62. package/cjs/scenegraph/layout/frozen.js +2 -2
  63. package/cjs/scenegraph/layout/frozen.js.map +1 -1
  64. package/cjs/scenegraph/layout/update-height.js +18 -11
  65. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  66. package/cjs/scenegraph/layout/update-width.js +19 -13
  67. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  68. package/cjs/scenegraph/scenegraph.js +3 -3
  69. package/cjs/scenegraph/scenegraph.js.map +1 -1
  70. package/cjs/scenegraph/utils/cell-border-stroke-width.js +15 -10
  71. package/cjs/scenegraph/utils/cell-border-stroke-width.js.map +1 -1
  72. package/cjs/scenegraph/utils/text-icon-layout.js +4 -4
  73. package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
  74. package/cjs/scenegraph/utils/text-measure.js +6 -6
  75. package/cjs/scenegraph/utils/text-measure.js.map +1 -1
  76. package/cjs/state/cell-move/index.js +1 -1
  77. package/cjs/state/cell-move/index.js.map +1 -1
  78. package/cjs/state/resize/update-resize-column.js +1 -1
  79. package/cjs/state/resize/update-resize-column.js.map +1 -1
  80. package/cjs/state/select/update-position.js +39 -8
  81. package/cjs/state/select/update-position.js.map +1 -1
  82. package/cjs/state/state.d.ts +6 -0
  83. package/cjs/state/state.js +49 -17
  84. package/cjs/state/state.js.map +1 -1
  85. package/cjs/themes/theme.js +11 -3
  86. package/cjs/themes/theme.js.map +1 -1
  87. package/cjs/tools/util.d.ts +0 -1
  88. package/cjs/tools/util.js +3 -13
  89. package/cjs/tools/util.js.map +1 -1
  90. package/cjs/ts-types/base-table.d.ts +3 -0
  91. package/cjs/ts-types/base-table.js.map +1 -1
  92. package/cjs/ts-types/events.d.ts +18 -0
  93. package/cjs/ts-types/events.js.map +1 -1
  94. package/cjs/ts-types/list-table/define/progressbar-define.d.ts +2 -2
  95. package/cjs/ts-types/list-table/define/progressbar-define.js.map +1 -1
  96. package/cjs/ts-types/table-engine.d.ts +4 -4
  97. package/cjs/ts-types/table-engine.js.map +1 -1
  98. package/cjs/ts-types/theme.d.ts +1 -0
  99. package/cjs/ts-types/theme.js.map +1 -1
  100. package/cjs/vrender.js.map +1 -1
  101. package/dist/vtable.js +935 -466
  102. package/dist/vtable.min.js +2 -2
  103. package/es/ListTable.d.ts +3 -3
  104. package/es/ListTable.js +46 -35
  105. package/es/ListTable.js.map +1 -1
  106. package/es/PivotTable.d.ts +1 -1
  107. package/es/PivotTable.js +19 -17
  108. package/es/PivotTable.js.map +1 -1
  109. package/es/body-helper/style/Style.d.ts +3 -0
  110. package/es/body-helper/style/Style.js +22 -15
  111. package/es/body-helper/style/Style.js.map +1 -1
  112. package/es/components/legend/continue-legend/continue-legend.js +1 -1
  113. package/es/components/legend/continue-legend/continue-legend.js.map +1 -1
  114. package/es/components/legend/discrete-legend/discrete-legend.js +1 -1
  115. package/es/components/legend/discrete-legend/discrete-legend.js.map +1 -1
  116. package/es/core/BaseTable.d.ts +3 -1
  117. package/es/core/BaseTable.js +27 -17
  118. package/es/core/BaseTable.js.map +1 -1
  119. package/es/core/TABLE_EVENT_TYPE.d.ts +2 -0
  120. package/es/core/TABLE_EVENT_TYPE.js +2 -0
  121. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  122. package/es/core/tableHelper.js +1 -2
  123. package/es/core/tableHelper.js.map +1 -1
  124. package/es/data/CachedDataSource.d.ts +1 -0
  125. package/es/data/CachedDataSource.js +9 -7
  126. package/es/data/CachedDataSource.js.map +1 -1
  127. package/es/data/DataSource.d.ts +10 -3
  128. package/es/data/DataSource.js +159 -95
  129. package/es/data/DataSource.js.map +1 -1
  130. package/es/edit/edit-manager.js +10 -9
  131. package/es/edit/edit-manager.js.map +1 -1
  132. package/es/event/event.js +11 -5
  133. package/es/event/event.js.map +1 -1
  134. package/es/event/listener/table-group.js +2 -2
  135. package/es/event/listener/table-group.js.map +1 -1
  136. package/es/event/media-click.js +2 -1
  137. package/es/event/sparkline-event.js +1 -2
  138. package/es/header-helper/style/Style.d.ts +3 -0
  139. package/es/header-helper/style/Style.js +26 -19
  140. package/es/header-helper/style/Style.js.map +1 -1
  141. package/es/index.d.ts +1 -1
  142. package/es/index.js +1 -1
  143. package/es/index.js.map +1 -1
  144. package/es/layout/pivot-header-layout.js +4 -2
  145. package/es/layout/pivot-header-layout.js.map +1 -1
  146. package/es/layout/simple-header-layout.d.ts +3 -2
  147. package/es/layout/simple-header-layout.js +40 -25
  148. package/es/layout/simple-header-layout.js.map +1 -1
  149. package/es/scenegraph/component/table-component.js +13 -8
  150. package/es/scenegraph/component/table-component.js.map +1 -1
  151. package/es/scenegraph/graphic/contributions/group-contribution-render.js +10 -6
  152. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  153. package/es/scenegraph/group-creater/cell-helper.js +2 -1
  154. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  155. package/es/scenegraph/group-creater/cell-type/progress-bar-cell.d.ts +3 -2
  156. package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js +21 -5
  157. package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
  158. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +1 -1
  159. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  160. package/es/scenegraph/layout/compute-col-width.js +11 -8
  161. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  162. package/es/scenegraph/layout/compute-row-height.js +71 -70
  163. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  164. package/es/scenegraph/layout/frozen.js +2 -2
  165. package/es/scenegraph/layout/frozen.js.map +1 -1
  166. package/es/scenegraph/layout/update-height.js +16 -9
  167. package/es/scenegraph/layout/update-height.js.map +1 -1
  168. package/es/scenegraph/layout/update-width.js +19 -10
  169. package/es/scenegraph/layout/update-width.js.map +1 -1
  170. package/es/scenegraph/scenegraph.js +3 -3
  171. package/es/scenegraph/scenegraph.js.map +1 -1
  172. package/es/scenegraph/utils/cell-border-stroke-width.js +10 -7
  173. package/es/scenegraph/utils/cell-border-stroke-width.js.map +1 -1
  174. package/es/scenegraph/utils/text-icon-layout.js +4 -4
  175. package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
  176. package/es/scenegraph/utils/text-measure.js +6 -6
  177. package/es/scenegraph/utils/text-measure.js.map +1 -1
  178. package/es/state/cell-move/index.js +1 -1
  179. package/es/state/cell-move/index.js.map +1 -1
  180. package/es/state/resize/update-resize-column.js +1 -1
  181. package/es/state/resize/update-resize-column.js.map +1 -1
  182. package/es/state/select/update-position.js +39 -8
  183. package/es/state/select/update-position.js.map +1 -1
  184. package/es/state/state.d.ts +6 -0
  185. package/es/state/state.js +49 -17
  186. package/es/state/state.js.map +1 -1
  187. package/es/themes/theme.js +8 -2
  188. package/es/themes/theme.js.map +1 -1
  189. package/es/tools/util.d.ts +0 -1
  190. package/es/tools/util.js +0 -10
  191. package/es/tools/util.js.map +1 -1
  192. package/es/ts-types/base-table.d.ts +3 -0
  193. package/es/ts-types/base-table.js.map +1 -1
  194. package/es/ts-types/events.d.ts +18 -0
  195. package/es/ts-types/events.js.map +1 -1
  196. package/es/ts-types/list-table/define/progressbar-define.d.ts +2 -2
  197. package/es/ts-types/list-table/define/progressbar-define.js.map +1 -1
  198. package/es/ts-types/table-engine.d.ts +4 -4
  199. package/es/ts-types/table-engine.js.map +1 -1
  200. package/es/ts-types/theme.d.ts +1 -0
  201. package/es/ts-types/theme.js.map +1 -1
  202. package/es/vrender.js.map +1 -1
  203. package/package.json +5 -5
@@ -103,8 +103,8 @@ export class TableComponent {
103
103
  }
104
104
  addToGroup(componentGroup) {
105
105
  componentGroup.addChild(this.frozenShadowLine), componentGroup.addChild(this.columnResizeBgLine),
106
- componentGroup.addChild(this.columnResizeLine), componentGroup.addChild(this.columnResizeLabel),
107
- this.table.theme.scrollStyle.hoverOn ? (componentGroup.addChild(this.hScrollBar),
106
+ componentGroup.addChild(this.columnResizeLine), componentGroup.addChild(this.columnResizeLabel);
107
+ this.table.theme.scrollStyle.hoverOn && !this.table.theme.scrollStyle.barToSide ? (componentGroup.addChild(this.hScrollBar),
108
108
  componentGroup.addChild(this.vScrollBar)) : (componentGroup.stage.defaultLayer.addChild(this.hScrollBar),
109
109
  componentGroup.stage.defaultLayer.addChild(this.vScrollBar)), this.menu.bindTableComponent(componentGroup),
110
110
  this.drillIcon.appand(componentGroup), this.cellMover.appand(componentGroup);
@@ -148,10 +148,12 @@ export class TableComponent {
148
148
  var _a, _b;
149
149
  const oldHorizontalBarPos = this.table.stateManager.scroll.horizontalBarPos, oldVerticalBarPos = this.table.stateManager.scroll.verticalBarPos, theme = this.table.theme, width = null === (_a = theme.scrollStyle) || void 0 === _a ? void 0 : _a.width, visible = null === (_b = theme.scrollStyle) || void 0 === _b ? void 0 : _b.visible, tableWidth = Math.ceil(this.table.scenegraph.tableGroup.attribute.width), tableHeight = Math.ceil(this.table.scenegraph.tableGroup.attribute.height), totalHeight = this.table.getAllRowsHeight(), totalWidth = this.table.getAllColsWidth(), frozenRowsHeight = this.table.getFrozenRowsHeight(), frozenColsWidth = this.table.getFrozenColsWidth(), bottomFrozenRowsHeight = this.table.getBottomFrozenRowsHeight(), rightFrozenColsWidth = this.table.getRightFrozenColsWidth();
150
150
  if (totalWidth > tableWidth) {
151
- const y = Math.min(tableHeight, totalHeight), rangeEnd = Math.max(.05, (tableWidth - frozenColsWidth) / (totalWidth - frozenColsWidth));
151
+ const y = Math.min(tableHeight, totalHeight), rangeEnd = Math.max(.05, (tableWidth - frozenColsWidth) / (totalWidth - frozenColsWidth)), hoverOn = this.table.theme.scrollStyle.hoverOn;
152
+ let attrY = 0;
153
+ attrY = this.table.theme.scrollStyle.barToSide ? this.table.tableNoFrameHeight - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y) : y - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y),
152
154
  this.hScrollBar.setAttributes({
153
- x: frozenColsWidth + (this.table.theme.scrollStyle.hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x),
154
- y: y - (this.table.theme.scrollStyle.hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y),
155
+ x: frozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x),
156
+ y: attrY,
155
157
  width: tableWidth - frozenColsWidth - rightFrozenColsWidth,
156
158
  range: [ 0, rangeEnd ],
157
159
  visible: "always" === visible
@@ -169,9 +171,12 @@ export class TableComponent {
169
171
  });
170
172
  if (totalHeight > tableHeight) {
171
173
  const x = Math.min(tableWidth, totalWidth), rangeEnd = Math.max(.05, (tableHeight - frozenRowsHeight) / (totalHeight - frozenRowsHeight));
174
+ let attrX = 0;
175
+ const hoverOn = this.table.theme.scrollStyle.hoverOn;
176
+ attrX = this.table.theme.scrollStyle.barToSide ? this.table.tableNoFrameWidth - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.x) : x - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.x),
172
177
  this.vScrollBar.setAttributes({
173
- x: x - (this.table.theme.scrollStyle.hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.x),
174
- y: frozenRowsHeight + (this.table.theme.scrollStyle.hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.y),
178
+ x: attrX,
179
+ y: frozenRowsHeight + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.y),
175
180
  height: tableHeight - frozenRowsHeight - bottomFrozenRowsHeight,
176
181
  range: [ 0, rangeEnd ],
177
182
  visible: "always" === visible
@@ -263,7 +268,7 @@ export class TableComponent {
263
268
  this.frozenShadowLine.setAttributes({
264
269
  visible: !0,
265
270
  x: colX,
266
- height: this.table.getRowsHeight(0, this.table.rowCount - 1)
271
+ height: this.table.tableNoFrameHeight
267
272
  });
268
273
  }
269
274
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/component/table-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAgB,MAAM,iBAAiB,CAAC;AAChG,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,OAAO,EAA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ACJ,QAAQ,EAAE,QAAQ;gBAClB,EAAE,EAAE,CAAC;gBACL,EAAE,EAAE,CAAC;gBACL,EAAE,EAAE,CAAC;gBACL,EAAE,EAAE,CAAC;gBACL,KAAK,EAAE;oBACL,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,CAAC,EAAE;oBACtC,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,CAAC,EAAE;iBACrC;aACF;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;IAG/B,CAAC;CACF","file":"table-component.js","sourcesContent":["import type { ILine, IRect, IGroup, FederatedPointerEvent, Text, IText } from './../../vrender';\nimport { createRect, createLine, createText, createGroup, createSymbol } from './../../vrender';\nimport { ScrollBar } from '@visactor/vrender-components';\nimport type { Group } from '../graphic/group';\nimport { MenuHandler } from './menu';\nimport { DrillIcon } from './drill-icon';\nimport { CellMover } from './cell-mover';\nimport { getColX } from './util';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport type { SceneEvent } from '../../event/util';\nimport { getCellEventArgsSet } from '../../event/util';\nimport type { ListTableAPI } from '../../ts-types';\n\n/**\n * @description: 表格内容外组件\n * @return {*}\n */\nexport class TableComponent {\n table: BaseTableAPI;\n\n border: IRect; // 表格外边框\n // selectBorder: IRect; // 表格选择区域边框\n columnResizeLine: ILine; // 表格列宽调整基准线\n columnResizeBgLine: ILine; // 表格列宽调整基准线背景\n columnResizeLabel: IGroup; // 表格列宽调整标记\n menu: MenuHandler; // 表格菜单\n vScrollBar: ScrollBar; // 表格横向滚动条\n hScrollBar: ScrollBar; // 表格纵向滚动条\n frozenShadowLine: IRect; // 表格冻结列右侧阴影块\n drillIcon: DrillIcon; // drill icon\n cellMover: CellMover; // 表格列顺序调整标记\n\n constructor(table: BaseTableAPI) {\n this.table = table;\n const theme = this.table.theme;\n\n // 滚动条\n this.createScrollBar();\n\n // 列宽调整基准线\n const columnResizeColor = theme.columnResize?.lineColor;\n const columnResizeWidth = theme.columnResize?.lineWidth;\n const columnResizeBgColor = theme.columnResize?.bgColor;\n const columnResizeBgWidth = theme.columnResize?.width;\n const labelColor = theme.columnResize?.labelColor;\n const labelFontSize = theme.columnResize?.labelFontSize;\n const labelFontFamily = theme.columnResize?.labelFontFamily;\n const labelBackgroundFill = theme.columnResize?.labelBackgroundFill;\n const labelBackgroundCornerRadius = theme.columnResize?.labelBackgroundCornerRadius;\n\n this.columnResizeLine = createLine({\n visible: false,\n pickable: false,\n stroke: columnResizeColor as string,\n lineWidth: columnResizeWidth as number,\n x: 0,\n y: 0,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: 0 }\n ]\n });\n this.columnResizeBgLine = createLine({\n visible: false,\n pickable: false,\n stroke: columnResizeBgColor as string,\n lineWidth: columnResizeBgWidth as number,\n x: 0,\n y: 0,\n // dx: -(columnResizeBgWidth - columnResizeWidth) / 2,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: 0 }\n ]\n });\n\n // 列宽调整文字标签\n const columnResizeLabelText = createText({\n visible: false,\n pickable: false,\n x: 0,\n y: 0,\n fontSize: labelFontSize, // 10\n fill: labelColor,\n fontFamily: labelFontFamily,\n text: '',\n textBaseline: 'top',\n dx: 12 + 4,\n dy: -labelFontSize / 2\n });\n const columnResizeLabelBack = createRect({\n visible: false,\n pickable: false,\n fill: labelBackgroundFill,\n x: 0,\n y: 0,\n width: 5 * labelFontSize * 0.8,\n height: labelFontSize + 8,\n cornerRadius: labelBackgroundCornerRadius,\n dx: 12,\n dy: -labelFontSize / 2 - 4\n });\n this.columnResizeLabel = createGroup({\n visible: false,\n pickable: false,\n x: 0,\n y: 0\n });\n this.columnResizeLabel.appendChild(columnResizeLabelBack);\n this.columnResizeLabel.appendChild(columnResizeLabelText);\n\n // 列顺序调整基准线\n this.cellMover = new CellMover(this.table);\n\n // 冻结列阴影\n const shadowWidth = theme.frozenColumnLine?.shadow?.width;\n const shadowStartColor = theme.frozenColumnLine?.shadow?.startColor;\n const shadowEndColor = theme.frozenColumnLine?.shadow?.endColor;\n this.frozenShadowLine = createRect({\n visible: true,\n pickable: false,\n x: 0,\n y: 0,\n width: shadowWidth,\n height: 0,\n fill: {\n gradient: 'linear',\n x0: 0,\n y0: 0,\n x1: 1,\n y1: 0,\n stops: [\n { color: shadowStartColor, offset: 0 },\n { color: shadowEndColor, offset: 1 }\n ]\n }\n });\n\n // TO BE DONE 冻结列border(theme.frozenColumnLine?.border)\n\n // 弹出窗口\n // this.menu = createGroup({\n // visible: false,\n // pickable: false,\n // x: 0,\n // y: 0,\n // });\n this.menu = new MenuHandler(this.table);\n\n this.drillIcon = new DrillIcon();\n }\n\n /**\n * @description: 组件mark加入到容器Group中\n * @param {Group} componentGroup\n * @return {*}\n */\n addToGroup(componentGroup: Group) {\n componentGroup.addChild(this.frozenShadowLine);\n // componentGroup.addChild(this.selectBorder);\n componentGroup.addChild(this.columnResizeBgLine);\n componentGroup.addChild(this.columnResizeLine);\n componentGroup.addChild(this.columnResizeLabel);\n if (this.table.theme.scrollStyle.hoverOn) {\n componentGroup.addChild(this.hScrollBar);\n componentGroup.addChild(this.vScrollBar);\n } else {\n componentGroup.stage.defaultLayer.addChild(this.hScrollBar);\n componentGroup.stage.defaultLayer.addChild(this.vScrollBar);\n }\n this.menu.bindTableComponent(componentGroup);\n this.drillIcon.appand(componentGroup);\n this.cellMover.appand(componentGroup);\n }\n\n /**\n * @description: 创建滚动条组件\n * @return {*}\n */\n createScrollBar() {\n const theme = this.table.theme;\n const scrollRailColor = theme.scrollStyle?.scrollRailColor as string;\n const scrollSliderColor = theme.scrollStyle?.scrollSliderColor as string;\n const width = theme.scrollStyle?.width as number;\n // const visible = theme.scrollStyle?.visible as string;\n // const hoverOn = theme.scrollStyle?.hoverOn as boolean;\n\n this.hScrollBar = new ScrollBar({\n direction: 'horizontal',\n x: -this.table.tableNoFrameWidth * 2,\n y: -this.table.tableNoFrameHeight * 2,\n width: this.table.tableNoFrameWidth,\n height: width,\n padding: 0,\n railStyle: {\n fill: scrollRailColor\n },\n sliderStyle: {\n fill: scrollSliderColor\n },\n range: [0, 0.1],\n // scrollRange: [0.4, 0.8]\n visible: false\n });\n // hack方案实现初始化隐藏滚动条,也可以add到stage之后执行hideAll\n (this.hScrollBar as any).render();\n this.hScrollBar.hideAll();\n\n this.vScrollBar = new ScrollBar({\n direction: 'vertical',\n x: -this.table.tableNoFrameWidth * 2,\n y: -this.table.tableNoFrameHeight * 2,\n width,\n height: this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight(),\n padding: 0,\n railStyle: {\n fill: scrollRailColor\n },\n sliderStyle: {\n fill: scrollSliderColor\n },\n range: [0, 0.1],\n visible: false\n });\n (this.vScrollBar as any).render();\n this.vScrollBar.hideAll();\n }\n\n /**\n * @description: 更新滚动条尺寸\n * @return {*}\n */\n updateScrollBar() {\n const oldHorizontalBarPos = this.table.stateManager.scroll.horizontalBarPos;\n const oldVerticalBarPos = this.table.stateManager.scroll.verticalBarPos;\n\n const theme = this.table.theme;\n const width = theme.scrollStyle?.width as number;\n const visible = theme.scrollStyle?.visible as string;\n // const hoverOn = theme.scrollStyle?.hoverOn as boolean;\n const tableWidth = Math.ceil(this.table.scenegraph.tableGroup.attribute.width);\n const tableHeight = Math.ceil(this.table.scenegraph.tableGroup.attribute.height);\n\n const totalHeight = this.table.getAllRowsHeight();\n const totalWidth = this.table.getAllColsWidth();\n const frozenRowsHeight = this.table.getFrozenRowsHeight();\n const frozenColsWidth = this.table.getFrozenColsWidth();\n const bottomFrozenRowsHeight = this.table.getBottomFrozenRowsHeight();\n const rightFrozenColsWidth = this.table.getRightFrozenColsWidth();\n if (totalWidth > tableWidth) {\n const y = Math.min(tableHeight, totalHeight);\n const rangeEnd = Math.max(0.05, (tableWidth - frozenColsWidth) / (totalWidth - frozenColsWidth));\n this.hScrollBar.setAttributes({\n x: frozenColsWidth + (!this.table.theme.scrollStyle.hoverOn ? this.table.scenegraph.tableGroup.attribute.x : 0),\n y: y - (this.table.theme.scrollStyle.hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y),\n width: tableWidth - frozenColsWidth - rightFrozenColsWidth,\n range: [0, rangeEnd],\n visible: visible === 'always'\n });\n const bounds = this.hScrollBar.AABBBounds && this.hScrollBar.globalAABBBounds;\n (this.hScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n if (visible === 'always') {\n this.hScrollBar.showAll();\n }\n } else {\n this.hScrollBar.setAttributes({\n x: -this.table.tableNoFrameWidth * 2,\n y: -this.table.tableNoFrameHeight * 2,\n width: 0,\n visible: false\n });\n }\n\n if (totalHeight > tableHeight) {\n const x = Math.min(tableWidth, totalWidth);\n const rangeEnd = Math.max(0.05, (tableHeight - frozenRowsHeight) / (totalHeight - frozenRowsHeight));\n this.vScrollBar.setAttributes({\n x: x - (this.table.theme.scrollStyle.hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.x),\n y:\n frozenRowsHeight + (!this.table.theme.scrollStyle.hoverOn ? this.table.scenegraph.tableGroup.attribute.y : 0),\n height: tableHeight - frozenRowsHeight - bottomFrozenRowsHeight,\n range: [0, rangeEnd],\n visible: visible === 'always'\n });\n const bounds = this.vScrollBar.AABBBounds && this.vScrollBar.globalAABBBounds;\n (this.vScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n\n if (visible === 'always') {\n this.vScrollBar.showAll();\n }\n } else {\n this.vScrollBar.setAttributes({\n x: -this.table.tableNoFrameWidth * 2,\n y: -this.table.tableNoFrameHeight * 2,\n height: 0,\n visible: false\n });\n }\n\n this.table.stateManager.setScrollLeft(oldHorizontalBarPos);\n this.table.stateManager.setScrollTop(oldVerticalBarPos);\n }\n\n /**\n * @description: 隐藏列宽调整组件\n * @return {*}\n */\n hideResizeCol() {\n // this.columnResizeLine.attribute.visible = false;\n this.columnResizeLine.setAttribute('visible', false);\n this.columnResizeBgLine.setAttribute('visible', false);\n this.columnResizeLabel.setAttribute('visible', false);\n this.columnResizeLabel.hideAll();\n }\n\n /**\n * @description: 显示列宽调整组件\n * @param {number} col\n * @param {number} y\n * @return {*}\n */\n showResizeCol(col: number, y: number, isRightFrozen?: boolean) {\n // this.columnResizeLine.attribute.visible = false;\n // 基准线\n const colX = getColX(col, this.table, isRightFrozen);\n this.columnResizeLine.setAttributes({\n visible: true,\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) }\n ]\n });\n this.columnResizeBgLine.setAttributes({\n visible: true,\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) }\n ]\n });\n\n // 标签\n // this.columnResizeLabel.setAttribute('visible', true);\n this.columnResizeLabel.showAll();\n this.columnResizeLabel.setAttributes({\n visible: true,\n x: colX,\n y\n });\n (this.columnResizeLabel.lastChild as Text).setAttribute('text', `${this.table.getColWidth(col)}px`);\n }\n\n /**\n * @description: 更新列宽调整组件\n * @param {number} col\n * @param {number} y 标签显示的y坐标\n * @return {*}\n */\n updateResizeCol(col: number, y: number, isRightFrozen?: boolean) {\n // 基准线\n const colX = getColX(col, this.table, isRightFrozen);\n // this.columnResizeLine.setAttribute('x', x);\n this.columnResizeLine.setAttributes({\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) } // todo: 优化points赋值\n ]\n });\n this.columnResizeBgLine.setAttributes({\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) } // todo: 优化points赋值\n ]\n });\n\n // 标签\n this.columnResizeLabel.setAttributes({\n x: colX,\n y\n });\n (this.columnResizeLabel.lastChild as Text).setAttribute('text', `${Math.floor(this.table.getColWidth(col))}px`);\n }\n\n /**\n * @description: 隐藏列顺序调整组件\n * @return {*}\n */\n hideMoveCol() {\n this.cellMover.hide();\n }\n\n /**\n * @description: 显示列顺序调整组件\n * @param {number} col\n * @param {number} x\n * @return {*}\n */\n showMoveCol(col: number, row: number, delta: number) {\n this.cellMover.show(col, row, delta);\n }\n\n /**\n * @description: 更新列顺序调整组件\n * @param {number} backX\n * @param {number} lineX\n * @return {*}\n */\n updateMoveCol(backX: number, lineX: number, backY: number, lineY: number) {\n this.cellMover.update(backX, lineX, backY, lineY);\n }\n\n /**\n * @description: 显示冻结列shadow\n * @param {number} col\n * @return {*}\n */\n setFrozenColumnShadow(col: number, isRightFrozen?: boolean) {\n if (col < 0) {\n this.frozenShadowLine.setAttributes({\n visible: false\n });\n } else {\n // const colX = this.table.getColsWidth(0, col);\n const colX = getColX(col, this.table, isRightFrozen);\n this.frozenShadowLine.setAttributes({\n visible: true,\n x: colX,\n height: this.table.getRowsHeight(0, this.table.rowCount - 1)\n });\n }\n }\n\n hideVerticalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.vScrollBar.setAttribute('visible', false);\n this.vScrollBar.hideAll();\n this.table.scenegraph.updateNextFrame();\n }\n showVerticalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.vScrollBar.setAttribute('visible', true);\n this.vScrollBar.showAll();\n this.table.scenegraph.updateNextFrame();\n }\n hideHorizontalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.hScrollBar.setAttribute('visible', false);\n this.hScrollBar.hideAll();\n this.table.scenegraph.updateNextFrame();\n }\n showHorizontalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.hScrollBar.setAttribute('visible', true);\n this.hScrollBar.showAll();\n this.table.scenegraph.updateNextFrame();\n }\n updateVerticalScrollBarPos(topRatio: number) {\n const range = this.vScrollBar.attribute.range;\n const size = range[1] - range[0];\n const range0 = topRatio * (1 - size);\n this.vScrollBar.setAttribute('range', [range0, range0 + size]);\n const bounds = this.vScrollBar.AABBBounds && this.vScrollBar.globalAABBBounds;\n (this.vScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n }\n updateHorizontalScrollBarPos(leftRatio: number) {\n const range = this.hScrollBar.attribute.range;\n const size = range[1] - range[0];\n const range0 = leftRatio * (1 - size);\n this.hScrollBar.setAttribute('range', [range0, range0 + size]);\n const bounds = this.hScrollBar.AABBBounds && this.hScrollBar.globalAABBBounds;\n (this.hScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n }\n\n updateStyle() {\n const theme = this.table.theme;\n\n // scrollbar\n const scrollRailColor = theme.scrollStyle?.scrollRailColor as string;\n const scrollSliderColor = theme.scrollStyle?.scrollSliderColor as string;\n const width = theme.scrollStyle?.width as number;\n this.hScrollBar.setAttributes({\n height: width,\n railStyle: {\n fill: scrollRailColor\n },\n sliderStyle: {\n fill: scrollSliderColor\n }\n });\n\n this.vScrollBar.setAttributes({\n width,\n railStyle: {\n fill: scrollRailColor\n },\n sliderStyle: {\n fill: scrollSliderColor\n }\n });\n\n // columnResizeLine & columnResizeBgLine\n const columnResizeColor = theme.columnResize?.lineColor;\n const columnResizeWidth = theme.columnResize?.lineWidth;\n const columnResizeBgColor = theme.columnResize?.bgColor;\n const columnResizeBgWidth = theme.columnResize?.width;\n\n this.columnResizeLine.setAttributes({\n stroke: columnResizeColor as string,\n lineWidth: columnResizeWidth as number\n });\n this.columnResizeBgLine = createLine({\n stroke: columnResizeBgColor as string,\n lineWidth: columnResizeBgWidth as number\n });\n\n const labelColor = theme.columnResize?.labelColor;\n const labelFontSize = theme.columnResize?.labelFontSize;\n const labelFontFamily = theme.columnResize?.labelFontFamily;\n const labelBackgroundFill = theme.columnResize?.labelBackgroundFill;\n const labelBackgroundCornerRadius = theme.columnResize?.labelBackgroundCornerRadius;\n\n // columnResizeLabelBack\n (this.columnResizeLabel.lastChild as IText).setAttributes({\n fontSize: labelFontSize, // 10\n fill: labelColor,\n fontFamily: labelFontFamily,\n dy: -labelFontSize / 2\n });\n // columnResizeLabelText\n (this.columnResizeLabel.firstChild as IRect).setAttributes({\n fill: labelBackgroundFill,\n width: 5 * labelFontSize * 0.8,\n height: labelFontSize + 8,\n cornerRadius: labelBackgroundCornerRadius,\n dy: -labelFontSize / 2 - 4\n });\n\n // frozenShadowLine\n const shadowWidth = theme.frozenColumnLine?.shadow?.width;\n const shadowStartColor = theme.frozenColumnLine?.shadow?.startColor;\n const shadowEndColor = theme.frozenColumnLine?.shadow?.endColor;\n this.frozenShadowLine.setAttributes({\n width: shadowWidth,\n fill: {\n gradient: 'linear',\n x0: 0,\n y0: 0,\n x1: 1,\n y1: 0,\n stops: [\n { color: shadowStartColor, offset: 0 },\n { color: shadowEndColor, offset: 1 }\n ]\n }\n });\n\n this.cellMover.updateStyle();\n // this.menu.updateStyle();\n // this.drillIcon.updateStyle();\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/scenegraph/component/table-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAgB,MAAM,iBAAiB,CAAC;AAChG,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAUjC,MAAM,OAAO,cAAc;IAezB,YAAY,KAAmB;;QAC7B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;QAG/B,IAAI,CAAC,eAAe,EAAE,CAAC;QAGvB,MAAM,iBAAiB,GAAG,MAAA,KAAK,CAAC,YAAY,0CAAE,SAAS,CAAC;QACxD,MAAM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C,EAAE,EAAE,CAAC,aAAa,GAAG,CAAC,GAAG,CAAC;SAC3B,CAAC,CAAC;QAGH,MAAM,WAAW,GAAG,MAAA,MAAA,KAAK,CAAC,gBAAgB,0CAAE,MAAM,0CAAE,KAAK,CAAC;QAC1D,MAAM,gBAAgB,GAAG,MAAA,MAAA,KAAK,CAAC,gBAAgB,0CAAE,MAAM,0CAAE,UAAU,CAAC;QACpE,MAAM,cAAc,GAAG,MAAA,MAAA,KAAK,CAAC,gBAAgB,0CAAE,MAAM,0CAAE,QAAQ,CAAC;QAChE,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC;YAClC,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE;gBACJ,QAAQ,EAAE,QAAQ;gBAClB,EAAE,EAAE,CAAC;gBACL,EAAE,EAAE,CAAC;gBACL,EAAE,EAAE,CAAC;gBACL,EAAE,EAAE,CAAC;gBACL,KAAK,EAAE;oBACL,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,CAAC,EAAE;oBACtC,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,CAAC,EAAE;iBACrC;aACF;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;IAG/B,CAAC;CACF","file":"table-component.js","sourcesContent":["import type { ILine, IRect, IGroup, FederatedPointerEvent, Text, IText } from './../../vrender';\nimport { createRect, createLine, createText, createGroup, createSymbol } from './../../vrender';\nimport { ScrollBar } from '@visactor/vrender-components';\nimport type { Group } from '../graphic/group';\nimport { MenuHandler } from './menu';\nimport { DrillIcon } from './drill-icon';\nimport { CellMover } from './cell-mover';\nimport { getColX } from './util';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport type { SceneEvent } from '../../event/util';\nimport { getCellEventArgsSet } from '../../event/util';\nimport type { ListTableAPI } from '../../ts-types';\n\n/**\n * @description: 表格内容外组件\n * @return {*}\n */\nexport class TableComponent {\n table: BaseTableAPI;\n\n border: IRect; // 表格外边框\n // selectBorder: IRect; // 表格选择区域边框\n columnResizeLine: ILine; // 表格列宽调整基准线\n columnResizeBgLine: ILine; // 表格列宽调整基准线背景\n columnResizeLabel: IGroup; // 表格列宽调整标记\n menu: MenuHandler; // 表格菜单\n vScrollBar: ScrollBar; // 表格横向滚动条\n hScrollBar: ScrollBar; // 表格纵向滚动条\n frozenShadowLine: IRect; // 表格冻结列右侧阴影块\n drillIcon: DrillIcon; // drill icon\n cellMover: CellMover; // 表格列顺序调整标记\n\n constructor(table: BaseTableAPI) {\n this.table = table;\n const theme = this.table.theme;\n\n // 滚动条\n this.createScrollBar();\n\n // 列宽调整基准线\n const columnResizeColor = theme.columnResize?.lineColor;\n const columnResizeWidth = theme.columnResize?.lineWidth;\n const columnResizeBgColor = theme.columnResize?.bgColor;\n const columnResizeBgWidth = theme.columnResize?.width;\n const labelColor = theme.columnResize?.labelColor;\n const labelFontSize = theme.columnResize?.labelFontSize;\n const labelFontFamily = theme.columnResize?.labelFontFamily;\n const labelBackgroundFill = theme.columnResize?.labelBackgroundFill;\n const labelBackgroundCornerRadius = theme.columnResize?.labelBackgroundCornerRadius;\n\n this.columnResizeLine = createLine({\n visible: false,\n pickable: false,\n stroke: columnResizeColor as string,\n lineWidth: columnResizeWidth as number,\n x: 0,\n y: 0,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: 0 }\n ]\n });\n this.columnResizeBgLine = createLine({\n visible: false,\n pickable: false,\n stroke: columnResizeBgColor as string,\n lineWidth: columnResizeBgWidth as number,\n x: 0,\n y: 0,\n // dx: -(columnResizeBgWidth - columnResizeWidth) / 2,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: 0 }\n ]\n });\n\n // 列宽调整文字标签\n const columnResizeLabelText = createText({\n visible: false,\n pickable: false,\n x: 0,\n y: 0,\n fontSize: labelFontSize, // 10\n fill: labelColor,\n fontFamily: labelFontFamily,\n text: '',\n textBaseline: 'top',\n dx: 12 + 4,\n dy: -labelFontSize / 2\n });\n const columnResizeLabelBack = createRect({\n visible: false,\n pickable: false,\n fill: labelBackgroundFill,\n x: 0,\n y: 0,\n width: 5 * labelFontSize * 0.8,\n height: labelFontSize + 8,\n cornerRadius: labelBackgroundCornerRadius,\n dx: 12,\n dy: -labelFontSize / 2 - 4\n });\n this.columnResizeLabel = createGroup({\n visible: false,\n pickable: false,\n x: 0,\n y: 0\n });\n this.columnResizeLabel.appendChild(columnResizeLabelBack);\n this.columnResizeLabel.appendChild(columnResizeLabelText);\n\n // 列顺序调整基准线\n this.cellMover = new CellMover(this.table);\n\n // 冻结列阴影\n const shadowWidth = theme.frozenColumnLine?.shadow?.width;\n const shadowStartColor = theme.frozenColumnLine?.shadow?.startColor;\n const shadowEndColor = theme.frozenColumnLine?.shadow?.endColor;\n this.frozenShadowLine = createRect({\n visible: true,\n pickable: false,\n x: 0,\n y: 0,\n width: shadowWidth,\n height: 0,\n fill: {\n gradient: 'linear',\n x0: 0,\n y0: 0,\n x1: 1,\n y1: 0,\n stops: [\n { color: shadowStartColor, offset: 0 },\n { color: shadowEndColor, offset: 1 }\n ]\n }\n });\n\n // TO BE DONE 冻结列border(theme.frozenColumnLine?.border)\n\n // 弹出窗口\n // this.menu = createGroup({\n // visible: false,\n // pickable: false,\n // x: 0,\n // y: 0,\n // });\n this.menu = new MenuHandler(this.table);\n\n this.drillIcon = new DrillIcon();\n }\n\n /**\n * @description: 组件mark加入到容器Group中\n * @param {Group} componentGroup\n * @return {*}\n */\n addToGroup(componentGroup: Group) {\n componentGroup.addChild(this.frozenShadowLine);\n // componentGroup.addChild(this.selectBorder);\n componentGroup.addChild(this.columnResizeBgLine);\n componentGroup.addChild(this.columnResizeLine);\n componentGroup.addChild(this.columnResizeLabel);\n\n const hoverOn = this.table.theme.scrollStyle.hoverOn;\n if (hoverOn && !this.table.theme.scrollStyle.barToSide) {\n componentGroup.addChild(this.hScrollBar);\n componentGroup.addChild(this.vScrollBar);\n } else {\n componentGroup.stage.defaultLayer.addChild(this.hScrollBar);\n componentGroup.stage.defaultLayer.addChild(this.vScrollBar);\n }\n this.menu.bindTableComponent(componentGroup);\n this.drillIcon.appand(componentGroup);\n this.cellMover.appand(componentGroup);\n }\n\n /**\n * @description: 创建滚动条组件\n * @return {*}\n */\n createScrollBar() {\n const theme = this.table.theme;\n const scrollRailColor = theme.scrollStyle?.scrollRailColor as string;\n const scrollSliderColor = theme.scrollStyle?.scrollSliderColor as string;\n const width = theme.scrollStyle?.width as number;\n // const visible = theme.scrollStyle?.visible as string;\n // const hoverOn = theme.scrollStyle?.hoverOn as boolean;\n\n this.hScrollBar = new ScrollBar({\n direction: 'horizontal',\n x: -this.table.tableNoFrameWidth * 2,\n y: -this.table.tableNoFrameHeight * 2,\n width: this.table.tableNoFrameWidth,\n height: width,\n padding: 0,\n railStyle: {\n fill: scrollRailColor\n },\n sliderStyle: {\n fill: scrollSliderColor\n },\n range: [0, 0.1],\n // scrollRange: [0.4, 0.8]\n visible: false\n });\n // hack方案实现初始化隐藏滚动条,也可以add到stage之后执行hideAll\n (this.hScrollBar as any).render();\n this.hScrollBar.hideAll();\n\n this.vScrollBar = new ScrollBar({\n direction: 'vertical',\n x: -this.table.tableNoFrameWidth * 2,\n y: -this.table.tableNoFrameHeight * 2,\n width,\n height: this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight(),\n padding: 0,\n railStyle: {\n fill: scrollRailColor\n },\n sliderStyle: {\n fill: scrollSliderColor\n },\n range: [0, 0.1],\n visible: false\n });\n (this.vScrollBar as any).render();\n this.vScrollBar.hideAll();\n }\n\n /**\n * @description: 更新滚动条尺寸\n * @return {*}\n */\n updateScrollBar() {\n const oldHorizontalBarPos = this.table.stateManager.scroll.horizontalBarPos;\n const oldVerticalBarPos = this.table.stateManager.scroll.verticalBarPos;\n\n const theme = this.table.theme;\n const width = theme.scrollStyle?.width as number;\n const visible = theme.scrollStyle?.visible as string;\n // const hoverOn = theme.scrollStyle?.hoverOn as boolean;\n const tableWidth = Math.ceil(this.table.scenegraph.tableGroup.attribute.width);\n const tableHeight = Math.ceil(this.table.scenegraph.tableGroup.attribute.height);\n\n const totalHeight = this.table.getAllRowsHeight();\n const totalWidth = this.table.getAllColsWidth();\n const frozenRowsHeight = this.table.getFrozenRowsHeight();\n const frozenColsWidth = this.table.getFrozenColsWidth();\n const bottomFrozenRowsHeight = this.table.getBottomFrozenRowsHeight();\n const rightFrozenColsWidth = this.table.getRightFrozenColsWidth();\n if (totalWidth > tableWidth) {\n const y = Math.min(tableHeight, totalHeight);\n const rangeEnd = Math.max(0.05, (tableWidth - frozenColsWidth) / (totalWidth - frozenColsWidth));\n\n const hoverOn = this.table.theme.scrollStyle.hoverOn;\n\n let attrY = 0;\n if (this.table.theme.scrollStyle.barToSide) {\n attrY = this.table.tableNoFrameHeight - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y);\n } else {\n attrY = y - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y);\n }\n\n this.hScrollBar.setAttributes({\n x: frozenColsWidth + (!hoverOn ? this.table.scenegraph.tableGroup.attribute.x : 0),\n y: attrY,\n width: tableWidth - frozenColsWidth - rightFrozenColsWidth,\n range: [0, rangeEnd],\n visible: visible === 'always'\n });\n const bounds = this.hScrollBar.AABBBounds && this.hScrollBar.globalAABBBounds;\n (this.hScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n if (visible === 'always') {\n this.hScrollBar.showAll();\n }\n } else {\n this.hScrollBar.setAttributes({\n x: -this.table.tableNoFrameWidth * 2,\n y: -this.table.tableNoFrameHeight * 2,\n width: 0,\n visible: false\n });\n }\n\n if (totalHeight > tableHeight) {\n const x = Math.min(tableWidth, totalWidth);\n const rangeEnd = Math.max(0.05, (tableHeight - frozenRowsHeight) / (totalHeight - frozenRowsHeight));\n\n let attrX = 0;\n const hoverOn = this.table.theme.scrollStyle.hoverOn;\n\n if (this.table.theme.scrollStyle.barToSide) {\n attrX = this.table.tableNoFrameWidth - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.x);\n } else {\n attrX = x - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.x);\n }\n\n this.vScrollBar.setAttributes({\n x: attrX,\n y: frozenRowsHeight + (!hoverOn ? this.table.scenegraph.tableGroup.attribute.y : 0),\n height: tableHeight - frozenRowsHeight - bottomFrozenRowsHeight,\n range: [0, rangeEnd],\n visible: visible === 'always'\n });\n const bounds = this.vScrollBar.AABBBounds && this.vScrollBar.globalAABBBounds;\n (this.vScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n\n if (visible === 'always') {\n this.vScrollBar.showAll();\n }\n } else {\n this.vScrollBar.setAttributes({\n x: -this.table.tableNoFrameWidth * 2,\n y: -this.table.tableNoFrameHeight * 2,\n height: 0,\n visible: false\n });\n }\n\n this.table.stateManager.setScrollLeft(oldHorizontalBarPos);\n this.table.stateManager.setScrollTop(oldVerticalBarPos);\n }\n\n /**\n * @description: 隐藏列宽调整组件\n * @return {*}\n */\n hideResizeCol() {\n // this.columnResizeLine.attribute.visible = false;\n this.columnResizeLine.setAttribute('visible', false);\n this.columnResizeBgLine.setAttribute('visible', false);\n this.columnResizeLabel.setAttribute('visible', false);\n this.columnResizeLabel.hideAll();\n }\n\n /**\n * @description: 显示列宽调整组件\n * @param {number} col\n * @param {number} y\n * @return {*}\n */\n showResizeCol(col: number, y: number, isRightFrozen?: boolean) {\n // this.columnResizeLine.attribute.visible = false;\n // 基准线\n const colX = getColX(col, this.table, isRightFrozen);\n this.columnResizeLine.setAttributes({\n visible: true,\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) }\n ]\n });\n this.columnResizeBgLine.setAttributes({\n visible: true,\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) }\n ]\n });\n\n // 标签\n // this.columnResizeLabel.setAttribute('visible', true);\n this.columnResizeLabel.showAll();\n this.columnResizeLabel.setAttributes({\n visible: true,\n x: colX,\n y\n });\n (this.columnResizeLabel.lastChild as Text).setAttribute('text', `${this.table.getColWidth(col)}px`);\n }\n\n /**\n * @description: 更新列宽调整组件\n * @param {number} col\n * @param {number} y 标签显示的y坐标\n * @return {*}\n */\n updateResizeCol(col: number, y: number, isRightFrozen?: boolean) {\n // 基准线\n const colX = getColX(col, this.table, isRightFrozen);\n // this.columnResizeLine.setAttribute('x', x);\n this.columnResizeLine.setAttributes({\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) } // todo: 优化points赋值\n ]\n });\n this.columnResizeBgLine.setAttributes({\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) } // todo: 优化points赋值\n ]\n });\n\n // 标签\n this.columnResizeLabel.setAttributes({\n x: colX,\n y\n });\n (this.columnResizeLabel.lastChild as Text).setAttribute('text', `${Math.floor(this.table.getColWidth(col))}px`);\n }\n\n /**\n * @description: 隐藏列顺序调整组件\n * @return {*}\n */\n hideMoveCol() {\n this.cellMover.hide();\n }\n\n /**\n * @description: 显示列顺序调整组件\n * @param {number} col\n * @param {number} x\n * @return {*}\n */\n showMoveCol(col: number, row: number, delta: number) {\n this.cellMover.show(col, row, delta);\n }\n\n /**\n * @description: 更新列顺序调整组件\n * @param {number} backX\n * @param {number} lineX\n * @return {*}\n */\n updateMoveCol(backX: number, lineX: number, backY: number, lineY: number) {\n this.cellMover.update(backX, lineX, backY, lineY);\n }\n\n /**\n * @description: 显示冻结列shadow\n * @param {number} col\n * @return {*}\n */\n setFrozenColumnShadow(col: number, isRightFrozen?: boolean) {\n if (col < 0) {\n this.frozenShadowLine.setAttributes({\n visible: false\n });\n } else {\n // const colX = this.table.getColsWidth(0, col);\n const colX = getColX(col, this.table, isRightFrozen);\n this.frozenShadowLine.setAttributes({\n visible: true,\n x: colX,\n height: this.table.tableNoFrameHeight\n });\n }\n }\n\n hideVerticalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.vScrollBar.setAttribute('visible', false);\n this.vScrollBar.hideAll();\n this.table.scenegraph.updateNextFrame();\n }\n showVerticalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.vScrollBar.setAttribute('visible', true);\n this.vScrollBar.showAll();\n this.table.scenegraph.updateNextFrame();\n }\n hideHorizontalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.hScrollBar.setAttribute('visible', false);\n this.hScrollBar.hideAll();\n this.table.scenegraph.updateNextFrame();\n }\n showHorizontalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.hScrollBar.setAttribute('visible', true);\n this.hScrollBar.showAll();\n this.table.scenegraph.updateNextFrame();\n }\n updateVerticalScrollBarPos(topRatio: number) {\n const range = this.vScrollBar.attribute.range;\n const size = range[1] - range[0];\n const range0 = topRatio * (1 - size);\n this.vScrollBar.setAttribute('range', [range0, range0 + size]);\n const bounds = this.vScrollBar.AABBBounds && this.vScrollBar.globalAABBBounds;\n (this.vScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n }\n updateHorizontalScrollBarPos(leftRatio: number) {\n const range = this.hScrollBar.attribute.range;\n const size = range[1] - range[0];\n const range0 = leftRatio * (1 - size);\n this.hScrollBar.setAttribute('range', [range0, range0 + size]);\n const bounds = this.hScrollBar.AABBBounds && this.hScrollBar.globalAABBBounds;\n (this.hScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n }\n\n updateStyle() {\n const theme = this.table.theme;\n\n // scrollbar\n const scrollRailColor = theme.scrollStyle?.scrollRailColor as string;\n const scrollSliderColor = theme.scrollStyle?.scrollSliderColor as string;\n const width = theme.scrollStyle?.width as number;\n this.hScrollBar.setAttributes({\n height: width,\n railStyle: {\n fill: scrollRailColor\n },\n sliderStyle: {\n fill: scrollSliderColor\n }\n });\n\n this.vScrollBar.setAttributes({\n width,\n railStyle: {\n fill: scrollRailColor\n },\n sliderStyle: {\n fill: scrollSliderColor\n }\n });\n\n // columnResizeLine & columnResizeBgLine\n const columnResizeColor = theme.columnResize?.lineColor;\n const columnResizeWidth = theme.columnResize?.lineWidth;\n const columnResizeBgColor = theme.columnResize?.bgColor;\n const columnResizeBgWidth = theme.columnResize?.width;\n\n this.columnResizeLine.setAttributes({\n stroke: columnResizeColor as string,\n lineWidth: columnResizeWidth as number\n });\n this.columnResizeBgLine = createLine({\n stroke: columnResizeBgColor as string,\n lineWidth: columnResizeBgWidth as number\n });\n\n const labelColor = theme.columnResize?.labelColor;\n const labelFontSize = theme.columnResize?.labelFontSize;\n const labelFontFamily = theme.columnResize?.labelFontFamily;\n const labelBackgroundFill = theme.columnResize?.labelBackgroundFill;\n const labelBackgroundCornerRadius = theme.columnResize?.labelBackgroundCornerRadius;\n\n // columnResizeLabelBack\n (this.columnResizeLabel.lastChild as IText).setAttributes({\n fontSize: labelFontSize, // 10\n fill: labelColor,\n fontFamily: labelFontFamily,\n dy: -labelFontSize / 2\n });\n // columnResizeLabelText\n (this.columnResizeLabel.firstChild as IRect).setAttributes({\n fill: labelBackgroundFill,\n width: 5 * labelFontSize * 0.8,\n height: labelFontSize + 8,\n cornerRadius: labelBackgroundCornerRadius,\n dy: -labelFontSize / 2 - 4\n });\n\n // frozenShadowLine\n const shadowWidth = theme.frozenColumnLine?.shadow?.width;\n const shadowStartColor = theme.frozenColumnLine?.shadow?.startColor;\n const shadowEndColor = theme.frozenColumnLine?.shadow?.endColor;\n this.frozenShadowLine.setAttributes({\n width: shadowWidth,\n fill: {\n gradient: 'linear',\n x0: 0,\n y0: 0,\n x1: 1,\n y1: 0,\n stops: [\n { color: shadowStartColor, offset: 0 },\n { color: shadowEndColor, offset: 1 }\n ]\n }\n });\n\n this.cellMover.updateStyle();\n // this.menu.updateStyle();\n // this.drillIcon.updateStyle();\n }\n}\n"]}
@@ -37,8 +37,9 @@ let SplitGroupAfterRenderContribution = class {
37
37
  if (Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth)) {
38
38
  if ("number" == typeof lineWidth && 1 & lineWidth || Array.isArray(strokeArrayWidth) && strokeArrayWidth.some((width => 1 & width))) {
39
39
  const table = group.stage.table;
40
+ if (!table) return;
40
41
  let deltaWidth = 0, deltaHeight = 0;
41
- if ("bottom-right" === table.theme.cellBorderClipDirection) {
42
+ if ("bottom-right" === (null == table ? void 0 : table.theme.cellBorderClipDirection)) {
42
43
  if (x = Math.floor(x) - .5, y = Math.floor(y) - .5, "cell" === group.role) {
43
44
  const col = group.col, row = group.row;
44
45
  table && col === table.colCount - 1 && (deltaWidth = 1), table && row === table.rowCount - 1 && (deltaHeight = 1);
@@ -129,8 +130,9 @@ let DashGroupAfterRenderContribution = class {
129
130
  let widthForStroke, heightForStroke, {width: width = groupAttribute.width, height: height = groupAttribute.height} = group.attribute;
130
131
  if (width = Math.ceil(width), height = Math.ceil(height), 1 & lineWidth) {
131
132
  const table = group.stage.table;
133
+ if (!table) return;
132
134
  let deltaWidth = 0, deltaHeight = 0;
133
- if ("bottom-right" === table.theme.cellBorderClipDirection) {
135
+ if ("bottom-right" === (null == table ? void 0 : table.theme.cellBorderClipDirection)) {
134
136
  if (x = Math.floor(x) - .5, y = Math.floor(y) - .5, "cell" === group.role) {
135
137
  const col = group.col, row = group.row;
136
138
  table && col === table.colCount - 1 && (deltaWidth = 1), table && row === table.rowCount - 1 && (deltaHeight = 1);
@@ -178,8 +180,9 @@ let AdjustPosGroupAfterRenderContribution = class {
178
180
  const {width: widthFroDraw, height: heightFroDraw} = getCellSizeForDraw(group, Math.ceil(width), Math.ceil(height));
179
181
  context.beginPath();
180
182
  const table = group.stage.table;
183
+ if (!table) return;
181
184
  let deltaWidth = 0, deltaHeight = 0;
182
- if ("bottom-right" === table.theme.cellBorderClipDirection) {
185
+ if ("bottom-right" === (null == table ? void 0 : table.theme.cellBorderClipDirection)) {
183
186
  if (x = Math.floor(x) - .5, y = Math.floor(y) - .5, "cell" === group.role) {
184
187
  const col = group.col, row = group.row;
185
188
  table && col === table.colCount - 1 && (deltaWidth = 1), table && row === table.rowCount - 1 && (deltaHeight = 1);
@@ -202,7 +205,7 @@ let AdjustColorGroupBeforeRenderContribution = class {
202
205
  drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke) {
203
206
  if ("cell" === group.role) {
204
207
  const table = group.stage.table;
205
- if (table.stateManager.interactionState !== InteractionState.scrolling) {
208
+ if (table && table.stateManager.interactionState !== InteractionState.scrolling) {
206
209
  const hoverColor = getCellHoverColor(group, table);
207
210
  hoverColor && (group.attribute._vtableHoverFill = hoverColor);
208
211
  }
@@ -238,7 +241,7 @@ let ClipBodyGroupBeforeRenderContribution = class {
238
241
  drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke) {
239
242
  var _a, _b, _c, _d, _e, _f;
240
243
  const table = group.stage.table;
241
- if ("body" === group.role) {
244
+ if (table) if ("body" === group.role) {
242
245
  const x = -(null !== (_a = group.attribute.x) && void 0 !== _a ? _a : 0) + table.getFrozenColsWidth(), y = -(null !== (_b = group.attribute.y) && void 0 !== _b ? _b : 0) + table.getFrozenRowsHeight(), width = group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth(), height = group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();
243
246
  context.beginPath(), context.rect(x, y, width, height);
244
247
  } else if ("row-header" === group.role) {
@@ -293,7 +296,8 @@ function getCellSizeForDraw(group, width, height) {
293
296
  const mergeInfo = getCellMergeInfo(table, col, row);
294
297
  mergeInfo && (col = mergeInfo.end.col, row = mergeInfo.end.row), (table && col === table.colCount - 1 || table && col === table.frozenColCount - 1 && table.scrollLeft) && (width -= 1),
295
298
  (table && row === table.rowCount - 1 || table && row === table.frozenRowCount - 1 && table.scrollTop) && (height -= 1);
296
- } else "corner-frozen" === group.role && (table.scrollLeft && (width -= 1), table.scrollTop && (height -= 1));
299
+ } else "corner-frozen" === group.role && (table && table.scrollLeft && (width -= 1),
300
+ table && table.scrollTop && (height -= 1));
297
301
  return {
298
302
  width: width,
299
303
  height: height
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/graphic/contributions/group-contribution-render.ts"],"names":[],"mappings":";;;;;;AAWA,OAAO,EAAE,0BAA0B,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE5F,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAGvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAO9C,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;IAAxC;QACL,SAAI,GAA+B,0BAA0B,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,CA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AAC3B,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, createRectPath, injectable } from './../../../vrender';\nimport type { Group } from '../group';\nimport { getCellHoverColor } from '../../../state/hover/is-cell-hover';\nimport type { BaseTableAPI } from '../../../ts-types/base-table';\nimport { getQuadProps } from '../../utils/padding';\nimport { getCellMergeInfo } from '../../utils/get-cell-merge';\nimport { InteractionState } from '../../../ts-types';\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 // // 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\n // lineWidth === 0 不绘制\n if (!stroke || (!Array.isArray(strokeArrayWidth) && lineWidth === 0)) {\n return;\n }\n\n let widthForStroke;\n let heightForStroke;\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 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 (table && col === table.colCount - 1) {\n deltaWidth = 1;\n }\n if (table && row === table.rowCount - 1) {\n deltaHeight = 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 );\n widthForStroke = widthFroDraw;\n heightForStroke = heightFroDraw;\n } else {\n widthForStroke = Math.ceil(width);\n heightForStroke = Math.ceil(height);\n }\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 * @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 // context.lineCap = 'square';\n // }\n const lineDash = context.getLineDash();\n let isDash = false;\n if (lineDash.length) {\n isDash = true;\n }\n // 单独处理每条边界,目前不考虑圆角\n context.beginPath();\n context.moveTo(x, y);\n\n // top\n if ((isStrokeTrue || stroke[0]) && (isWidthNumber || strokeArrayWidth[0])) {\n // context.lineTo(x + width, y);\n if (isPart && Array.isArray(part[0])) {\n context.moveTo(x + width * part[0][0], y);\n context.lineTo(x + width * (part[0][1] - part[0][0]), y);\n context.moveTo(x + width, y);\n } else {\n context.moveTo(x, y);\n context.lineTo(x + width, 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 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 ((isStrokeTrue || stroke[1]) && (isWidthNumber || strokeArrayWidth[1])) {\n // context.lineTo(x + width, y + height);\n if (isPart && Array.isArray(part[1])) {\n context.moveTo(x + width, y + height * part[1][0]);\n context.lineTo(x + width, y + height * (part[1][1] - part[1][0]));\n context.moveTo(x + width, y + height);\n } else {\n context.moveTo(x + width, y);\n context.lineTo(x + width, y + height);\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 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 ((isStrokeTrue || stroke[2]) && (isWidthNumber || strokeArrayWidth[2])) {\n // context.lineTo(x, y + height);\n if (isPart && Array.isArray(part[2])) {\n context.moveTo(x + width * part[2][0], y + height);\n context.lineTo(x + width * (part[2][1] - part[2][0]), y + height);\n context.moveTo(x, y + height);\n } else {\n context.moveTo(x, y + height);\n context.lineTo(x + width, 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 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 ((isStrokeTrue || stroke[3]) && (isWidthNumber || strokeArrayWidth[3])) {\n // context.lineTo(x, y);\n if (isPart && Array.isArray(part[3])) {\n context.moveTo(x, y + height * part[3][0]);\n context.lineTo(x, y + height * (part[3][1] - part[3][0]));\n context.moveTo(x, y);\n } else {\n context.moveTo(x, y);\n context.lineTo(x, y + height);\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 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}\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 !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) ||\n Array.isArray(strokeArrayColor) ||\n Array.isArray(strokeArrayWidth)\n ) {\n return;\n }\n\n // const { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;\n let { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;\n width = Math.ceil(width);\n height = Math.ceil(height);\n\n let widthForStroke;\n let heightForStroke;\n if (lineWidth & 1) {\n const table = (group.stage as any).table as BaseTableAPI;\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 (table && col === table.colCount - 1) {\n deltaWidth = 1;\n }\n if (table && row === table.rowCount - 1) {\n deltaHeight = 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 );\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.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.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.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.stroke();\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 const { 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 const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(\n group,\n Math.ceil(width),\n Math.ceil(height)\n );\n context.beginPath();\n const table = (group.stage as any).table as BaseTableAPI;\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 (table && col === table.colCount - 1) {\n deltaWidth = 1;\n }\n if (table && row === table.rowCount - 1) {\n deltaHeight = 1;\n }\n }\n } else {\n x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\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.stateManager.interactionState !== InteractionState.scrolling) {\n const hoverColor = getCellHoverColor(group as Group, table);\n if (hoverColor) {\n (group.attribute as any)._vtableHoverFill = hoverColor;\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)._vtableHoverFill) {\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)._vtableHoverFill as any;\n context.setCommonStyle(group, group.attribute, x, y, groupAttribute);\n context.fill();\n group.attribute.fill = oldColor;\n (group.attribute as any)._vtableHoverFill = 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 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 table = (group.stage as any).table as BaseTableAPI;\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 context.beginPath();\n context.rect(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 context.beginPath();\n context.rect(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 context.beginPath();\n context.rect(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 context.beginPath();\n context.rect(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 context.beginPath();\n context.rect(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 context.beginPath();\n context.rect(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 context.beginPath();\n context.rect(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 context.beginPath();\n context.rect(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 context.beginPath();\n context.rect(x, y, width, height);\n }\n }\n}\n@injectable()\nexport 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) {\n const table = group.stage.table as BaseTableAPI;\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 (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 } else if (group.role === 'corner-frozen') {\n if (table.scrollLeft) {\n width -= 1;\n }\n if (table.scrollTop) {\n height -= 1;\n }\n }\n return { width, height };\n}\n"]}
1
+ {"version":3,"sources":["../src/scenegraph/graphic/contributions/group-contribution-render.ts"],"names":[],"mappings":";;;;;;AAWA,OAAO,EAAE,0BAA0B,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE5F,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAGvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAO9C,IAAM,kCAAkC,GAAxC,MA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AE,GAAG,EAAE,GAAG,CAAC,CAAC;QACpD,IAAI,SAAS,EAAE;YACb,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC;YACxB,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC;SACzB;QAED,IAAI,KAAK,IAAI,GAAG,KAAK,KAAK,CAAC,QAAQ,GAAG,CAAC,EAAE;YACvC,KAAK,IAAI,CAAC,CAAC;SACZ;aAAM,IAAI,KAAK,IAAI,GAAG,KAAK,KAAK,CAAC,cAAc,GAAG,CAAC,IAAI,KAAK,CAAC,UAAU,EAAE;YACxE,KAAK,IAAI,CAAC,CAAC;SACZ;QACD,IAAI,KAAK,IAAI,GAAG,KAAK,KAAK,CAAC,QAAQ,GAAG,CAAC,EAAE;YACvC,MAAM,IAAI,CAAC,CAAC;SACb;aAAM,IAAI,KAAK,IAAI,GAAG,KAAK,KAAK,CAAC,cAAc,GAAG,CAAC,IAAI,KAAK,CAAC,SAAS,EAAE;YACvE,MAAM,IAAI,CAAC,CAAC;SACb;KACF;SAAM,IAAI,KAAK,CAAC,IAAI,KAAK,eAAe,EAAE;QACzC,IAAI,KAAK,IAAI,KAAK,CAAC,UAAU,EAAE;YAC7B,KAAK,IAAI,CAAC,CAAC;SACZ;QACD,IAAI,KAAK,IAAI,KAAK,CAAC,SAAS,EAAE;YAC5B,MAAM,IAAI,CAAC,CAAC;SACb;KACF;IACD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAC3B,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, createRectPath, injectable } from './../../../vrender';\nimport type { Group } from '../group';\nimport { getCellHoverColor } from '../../../state/hover/is-cell-hover';\nimport type { BaseTableAPI } from '../../../ts-types/base-table';\nimport { getQuadProps } from '../../utils/padding';\nimport { getCellMergeInfo } from '../../utils/get-cell-merge';\nimport { InteractionState } from '../../../ts-types';\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 // // 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\n // lineWidth === 0 不绘制\n if (!stroke || (!Array.isArray(strokeArrayWidth) && lineWidth === 0)) {\n return;\n }\n\n let widthForStroke;\n let heightForStroke;\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 (table && col === table.colCount - 1) {\n deltaWidth = 1;\n }\n if (table && row === table.rowCount - 1) {\n deltaHeight = 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 );\n widthForStroke = widthFroDraw;\n heightForStroke = heightFroDraw;\n } else {\n widthForStroke = Math.ceil(width);\n heightForStroke = Math.ceil(height);\n }\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 * @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 // context.lineCap = 'square';\n // }\n const lineDash = context.getLineDash();\n let isDash = false;\n if (lineDash.length) {\n isDash = true;\n }\n // 单独处理每条边界,目前不考虑圆角\n context.beginPath();\n context.moveTo(x, y);\n\n // top\n if ((isStrokeTrue || stroke[0]) && (isWidthNumber || strokeArrayWidth[0])) {\n // context.lineTo(x + width, y);\n if (isPart && Array.isArray(part[0])) {\n context.moveTo(x + width * part[0][0], y);\n context.lineTo(x + width * (part[0][1] - part[0][0]), y);\n context.moveTo(x + width, y);\n } else {\n context.moveTo(x, y);\n context.lineTo(x + width, 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 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 ((isStrokeTrue || stroke[1]) && (isWidthNumber || strokeArrayWidth[1])) {\n // context.lineTo(x + width, y + height);\n if (isPart && Array.isArray(part[1])) {\n context.moveTo(x + width, y + height * part[1][0]);\n context.lineTo(x + width, y + height * (part[1][1] - part[1][0]));\n context.moveTo(x + width, y + height);\n } else {\n context.moveTo(x + width, y);\n context.lineTo(x + width, y + height);\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 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 ((isStrokeTrue || stroke[2]) && (isWidthNumber || strokeArrayWidth[2])) {\n // context.lineTo(x, y + height);\n if (isPart && Array.isArray(part[2])) {\n context.moveTo(x + width * part[2][0], y + height);\n context.lineTo(x + width * (part[2][1] - part[2][0]), y + height);\n context.moveTo(x, y + height);\n } else {\n context.moveTo(x, y + height);\n context.lineTo(x + width, 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 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 ((isStrokeTrue || stroke[3]) && (isWidthNumber || strokeArrayWidth[3])) {\n // context.lineTo(x, y);\n if (isPart && Array.isArray(part[3])) {\n context.moveTo(x, y + height * part[3][0]);\n context.lineTo(x, y + height * (part[3][1] - part[3][0]));\n context.moveTo(x, y);\n } else {\n context.moveTo(x, y);\n context.lineTo(x, y + height);\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 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}\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 !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) ||\n Array.isArray(strokeArrayColor) ||\n Array.isArray(strokeArrayWidth)\n ) {\n return;\n }\n\n // const { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;\n let { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;\n width = Math.ceil(width);\n height = Math.ceil(height);\n\n let widthForStroke;\n let heightForStroke;\n if (lineWidth & 1) {\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 (table && col === table.colCount - 1) {\n deltaWidth = 1;\n }\n if (table && row === table.rowCount - 1) {\n deltaHeight = 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 );\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.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.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.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.stroke();\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 const { 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 const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(\n group,\n Math.ceil(width),\n Math.ceil(height)\n );\n context.beginPath();\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 (table && col === table.colCount - 1) {\n deltaWidth = 1;\n }\n if (table && row === table.rowCount - 1) {\n deltaHeight = 1;\n }\n }\n } else {\n x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\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 && table.stateManager.interactionState !== InteractionState.scrolling) {\n const hoverColor = getCellHoverColor(group as Group, table);\n if (hoverColor) {\n (group.attribute as any)._vtableHoverFill = hoverColor;\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)._vtableHoverFill) {\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)._vtableHoverFill as any;\n context.setCommonStyle(group, group.attribute, x, y, groupAttribute);\n context.fill();\n group.attribute.fill = oldColor;\n (group.attribute as any)._vtableHoverFill = 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 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 table = (group.stage as any).table as BaseTableAPI;\n if (!table) {\n return;\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 context.beginPath();\n context.rect(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 context.beginPath();\n context.rect(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 context.beginPath();\n context.rect(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 context.beginPath();\n context.rect(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 context.beginPath();\n context.rect(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 context.beginPath();\n context.rect(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 context.beginPath();\n context.rect(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 context.beginPath();\n context.rect(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 context.beginPath();\n context.rect(x, y, width, height);\n }\n }\n}\n@injectable()\nexport 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) {\n const table = group.stage.table as BaseTableAPI;\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 (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 } else if (group.role === 'corner-frozen') {\n if (table && table.scrollLeft) {\n width -= 1;\n }\n if (table && table.scrollTop) {\n height -= 1;\n }\n }\n return { width, height };\n}\n"]}
@@ -191,6 +191,7 @@ export function dealWithMergeCellSize(range, cellWidth, cellHeight, padding, tex
191
191
  }
192
192
 
193
193
  export function resizeCellGroup(cellGroup, rangeWidth, rangeHeight, range, table) {
194
+ var _a;
194
195
  const {col: col, row: row} = cellGroup, dx = -table.getColsWidth(range.start.col, col - 1), dy = -table.getRowsHeight(range.start.row, row - 1);
195
196
  cellGroup.forEachChildren((child => {
196
197
  var _a, _b, _c, _d, _e, _f;
@@ -206,7 +207,7 @@ export function resizeCellGroup(cellGroup, rangeWidth, rangeHeight, range, table
206
207
  dy: (null !== (_f = child.attribute.dy) && void 0 !== _f ? _f : 0) + dy
207
208
  }));
208
209
  }));
209
- const lineWidth = cellGroup.attribute.lineWidth, isLineWidthArray = isArray(lineWidth), newLineWidth = [ 0, 0, 0, 0 ];
210
+ const lineWidth = null !== (_a = cellGroup.attribute.strokeArrayWidth) && void 0 !== _a ? _a : cellGroup.attribute.lineWidth, isLineWidthArray = isArray(lineWidth), newLineWidth = [ 0, 0, 0, 0 ];
210
211
  col === range.start.col && (newLineWidth[3] = isLineWidthArray ? lineWidth[3] : lineWidth),
211
212
  row === range.start.row && (newLineWidth[0] = isLineWidthArray ? lineWidth[0] : lineWidth),
212
213
  col === range.end.col && (newLineWidth[1] = isLineWidthArray ? lineWidth[1] : lineWidth),