@visactor/vtable 0.9.2 → 0.9.3-alpha.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 (647) hide show
  1. package/cjs/ListTable.d.ts +2 -1
  2. package/cjs/ListTable.js +17 -13
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotChart.d.ts +69 -0
  5. package/cjs/PivotChart.js +435 -0
  6. package/cjs/PivotChart.js.map +1 -0
  7. package/cjs/PivotTable.d.ts +2 -1
  8. package/cjs/PivotTable.js +18 -13
  9. package/cjs/PivotTable.js.map +1 -1
  10. package/cjs/body-helper/style/MultilineTextStyle.js +2 -2
  11. package/cjs/body-helper/style/MultilineTextStyle.js.map +1 -1
  12. package/cjs/body-helper/style/ProgressBarStyle.js +15 -15
  13. package/cjs/body-helper/style/ProgressBarStyle.js.map +1 -1
  14. package/cjs/body-helper/style/Style.d.ts +0 -1
  15. package/cjs/body-helper/style/Style.js +25 -28
  16. package/cjs/body-helper/style/Style.js.map +1 -1
  17. package/cjs/chartModule.js +14 -0
  18. package/cjs/chartModule.js.map +1 -0
  19. package/cjs/components/axis/axis.d.ts +45 -0
  20. package/cjs/components/axis/axis.js +146 -0
  21. package/cjs/components/axis/axis.js.map +1 -0
  22. package/cjs/components/axis/band-scale.d.ts +18 -0
  23. package/cjs/components/axis/band-scale.js +54 -0
  24. package/cjs/components/axis/band-scale.js.map +1 -0
  25. package/cjs/components/axis/get-axis-attributes.d.ts +136 -0
  26. package/cjs/components/axis/get-axis-attributes.js +169 -0
  27. package/cjs/components/axis/get-axis-attributes.js.map +1 -0
  28. package/cjs/components/axis/label-overlap.d.ts +3 -0
  29. package/cjs/components/axis/label-overlap.js +46 -0
  30. package/cjs/components/axis/label-overlap.js.map +1 -0
  31. package/cjs/components/axis/linear-scale.d.ts +45 -0
  32. package/cjs/components/axis/linear-scale.js +120 -0
  33. package/cjs/components/axis/linear-scale.js.map +1 -0
  34. package/cjs/components/legend/get-legend-attributes.d.ts +5 -0
  35. package/cjs/components/legend/get-legend-attributes.js +90 -0
  36. package/cjs/components/legend/get-legend-attributes.js.map +1 -0
  37. package/cjs/components/legend/legend.d.ts +23 -0
  38. package/cjs/components/legend/legend.js +94 -0
  39. package/cjs/components/legend/legend.js.map +1 -0
  40. package/{es → cjs/components}/menu/dom/BaseMenu.d.ts +2 -2
  41. package/cjs/components/menu/dom/BaseMenu.js.map +1 -0
  42. package/cjs/components/menu/dom/Menu.js.map +1 -0
  43. package/cjs/{menu → components/menu}/dom/MenuHandler.d.ts +2 -2
  44. package/cjs/{menu → components/menu}/dom/MenuHandler.js +1 -1
  45. package/cjs/components/menu/dom/MenuHandler.js.map +1 -0
  46. package/cjs/{menu → components/menu}/dom/logic/MenuContainer.d.ts +2 -2
  47. package/cjs/{menu → components/menu}/dom/logic/MenuContainer.js +2 -2
  48. package/cjs/components/menu/dom/logic/MenuContainer.js.map +1 -0
  49. package/cjs/{menu → components/menu}/dom/logic/MenuElement.d.ts +2 -2
  50. package/cjs/{menu → components/menu}/dom/logic/MenuElement.js +4 -4
  51. package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -0
  52. package/cjs/components/menu/dom/logic/MenuElementStyle.js.map +1 -0
  53. package/cjs/components/title/title.d.ts +12 -0
  54. package/cjs/components/title/title.js +66 -0
  55. package/cjs/components/title/title.js.map +1 -0
  56. package/{es → cjs/components}/tooltip/BaseTooltip.d.ts +3 -3
  57. package/cjs/components/tooltip/BaseTooltip.js.map +1 -0
  58. package/cjs/components/tooltip/Tooltip.js.map +1 -0
  59. package/cjs/{tooltip → components/tooltip}/TooltipHandler.d.ts +4 -4
  60. package/cjs/{tooltip → components/tooltip}/TooltipHandler.js +1 -1
  61. package/cjs/components/tooltip/TooltipHandler.js.map +1 -0
  62. package/{es → cjs/components}/tooltip/logic/BubbleTooltipElement.d.ts +4 -4
  63. package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElement.js +1 -1
  64. package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +1 -0
  65. package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -0
  66. package/cjs/components/util/orient.d.ts +3 -0
  67. package/cjs/components/util/orient.js +14 -0
  68. package/cjs/components/util/orient.js.map +1 -0
  69. package/cjs/components/util/register.d.ts +3 -0
  70. package/cjs/components/util/register.js +15 -0
  71. package/cjs/components/util/register.js.map +1 -0
  72. package/cjs/components/util/tick-data/config.d.ts +1 -0
  73. package/cjs/components/util/tick-data/config.js +6 -0
  74. package/cjs/components/util/tick-data/config.js.map +1 -0
  75. package/cjs/components/util/tick-data/continuous.d.ts +2 -0
  76. package/cjs/components/util/tick-data/continuous.js +39 -0
  77. package/cjs/components/util/tick-data/continuous.js.map +1 -0
  78. package/cjs/components/util/tick-data/discrete/linear.d.ts +2 -0
  79. package/cjs/components/util/tick-data/discrete/linear.js +66 -0
  80. package/cjs/components/util/tick-data/discrete/linear.js.map +1 -0
  81. package/cjs/components/util/tick-data/discrete/polar-angle.d.ts +2 -0
  82. package/cjs/components/util/tick-data/discrete/polar-angle.js +46 -0
  83. package/cjs/components/util/tick-data/discrete/polar-angle.js.map +1 -0
  84. package/cjs/components/util/tick-data/index.d.ts +2 -0
  85. package/cjs/components/util/tick-data/index.js +17 -0
  86. package/cjs/components/util/tick-data/index.js.map +1 -0
  87. package/cjs/components/util/tick-data/util.d.ts +21 -0
  88. package/cjs/components/util/tick-data/util.js +115 -0
  89. package/cjs/components/util/tick-data/util.js.map +1 -0
  90. package/cjs/components/util/transform.d.ts +5 -0
  91. package/cjs/components/util/transform.js +45 -0
  92. package/cjs/components/util/transform.js.map +1 -0
  93. package/cjs/core/BaseTable.d.ts +18 -5
  94. package/cjs/core/BaseTable.js +115 -41
  95. package/cjs/core/BaseTable.js.map +1 -1
  96. package/cjs/core/TABLE_EVENT_TYPE.d.ts +5 -0
  97. package/cjs/core/TABLE_EVENT_TYPE.js +6 -1
  98. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  99. package/cjs/core/style.js +1 -1
  100. package/cjs/core/style.js.map +1 -1
  101. package/cjs/core/tableHelper.js +1 -2
  102. package/cjs/data/CachedDataSource.js +2 -1
  103. package/cjs/data/DataSource.js +2 -2
  104. package/cjs/data/DataSource.js.map +1 -1
  105. package/cjs/dataset/dataset-pivot-table.d.ts +60 -0
  106. package/cjs/dataset/dataset-pivot-table.js +387 -0
  107. package/cjs/dataset/dataset-pivot-table.js.map +1 -0
  108. package/cjs/dataset/dataset.d.ts +14 -19
  109. package/cjs/dataset/dataset.js +183 -200
  110. package/cjs/dataset/dataset.js.map +1 -1
  111. package/cjs/dataset/statistics-helper.d.ts +68 -0
  112. package/cjs/dataset/statistics-helper.js +173 -0
  113. package/cjs/dataset/statistics-helper.js.map +1 -0
  114. package/cjs/dataset/util/zero-align.d.ts +10 -0
  115. package/cjs/dataset/util/zero-align.js +119 -0
  116. package/cjs/dataset/util/zero-align.js.map +1 -0
  117. package/cjs/event/EventHandler.js.map +1 -1
  118. package/cjs/event/EventTarget.d.ts +5 -5
  119. package/cjs/event/EventTarget.js +2 -2
  120. package/cjs/event/EventTarget.js.map +1 -1
  121. package/cjs/event/VChartEventProxy.d.ts +1 -0
  122. package/cjs/event/VChartEventProxy.js +1 -0
  123. package/cjs/event/VChartEventProxy.js.map +1 -0
  124. package/cjs/event/event.js +7 -4
  125. package/cjs/event/event.js.map +1 -1
  126. package/cjs/event/listener/table-group.js +8 -6
  127. package/cjs/event/listener/table-group.js.map +1 -1
  128. package/cjs/event/pivot-chart/axis-click.d.ts +2 -0
  129. package/cjs/event/pivot-chart/axis-click.js +42 -0
  130. package/cjs/event/pivot-chart/axis-click.js.map +1 -0
  131. package/cjs/event/pivot-chart/axis-hover.d.ts +2 -0
  132. package/cjs/event/pivot-chart/axis-hover.js +41 -0
  133. package/cjs/event/pivot-chart/axis-hover.js.map +1 -0
  134. package/cjs/event/scroll.js +4 -3
  135. package/cjs/event/scroll.js.map +1 -1
  136. package/cjs/event/sparkline-event.js +1 -2
  137. package/cjs/event/sparkline-event.js.map +1 -1
  138. package/cjs/header-helper/header-helper.js +1 -1
  139. package/cjs/header-helper/header-helper.js.map +1 -1
  140. package/cjs/header-helper/style/MultilineTextHeaderStyle.js +2 -2
  141. package/cjs/header-helper/style/MultilineTextHeaderStyle.js.map +1 -1
  142. package/cjs/header-helper/style/Style.d.ts +0 -1
  143. package/cjs/header-helper/style/Style.js +25 -28
  144. package/cjs/header-helper/style/Style.js.map +1 -1
  145. package/cjs/index.d.ts +4 -3
  146. package/cjs/index.js +11 -2
  147. package/cjs/index.js.map +1 -1
  148. package/cjs/layout/chart-helper/get-axis-config.d.ts +2 -0
  149. package/cjs/layout/chart-helper/get-axis-config.js +118 -0
  150. package/cjs/layout/chart-helper/get-axis-config.js.map +1 -0
  151. package/cjs/layout/chart-helper/get-chart-spec.d.ts +7 -0
  152. package/cjs/layout/chart-helper/get-chart-spec.js +135 -0
  153. package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -0
  154. package/cjs/layout/index.js +2 -1
  155. package/cjs/layout/pivot-header-layout.d.ts +13 -5
  156. package/cjs/layout/pivot-header-layout.js +50 -14
  157. package/cjs/layout/pivot-header-layout.js.map +1 -1
  158. package/cjs/layout/pivot-layout.d.ts +54 -8
  159. package/cjs/layout/pivot-layout.js +399 -91
  160. package/cjs/layout/pivot-layout.js.map +1 -1
  161. package/cjs/layout/simple-header-layout.d.ts +10 -0
  162. package/cjs/layout/simple-header-layout.js +43 -2
  163. package/cjs/layout/simple-header-layout.js.map +1 -1
  164. package/cjs/plugins/{chartTypes.js → chartModules.js} +1 -1
  165. package/cjs/plugins/chartModules.js.map +1 -0
  166. package/cjs/register.d.ts +1 -1
  167. package/cjs/register.js +6 -6
  168. package/cjs/register.js.map +1 -1
  169. package/cjs/render/layout/text.d.ts +33 -4
  170. package/cjs/render/layout/text.js +9 -3
  171. package/cjs/render/layout/text.js.map +1 -1
  172. package/cjs/scenegraph/component/custom.js +17 -16
  173. package/cjs/scenegraph/component/custom.js.map +1 -1
  174. package/cjs/scenegraph/component/menu.d.ts +41 -0
  175. package/cjs/scenegraph/component/table-component.js +3 -3
  176. package/cjs/scenegraph/component/table-component.js.map +1 -1
  177. package/cjs/scenegraph/graphic/chart.d.ts +4 -1
  178. package/cjs/scenegraph/graphic/chart.js +29 -17
  179. package/cjs/scenegraph/graphic/chart.js.map +1 -1
  180. package/cjs/scenegraph/graphic/contributions/chart-render.js +22 -3
  181. package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
  182. package/cjs/scenegraph/graphic/contributions/group-contribution-render.d.ts +9 -9
  183. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +48 -29
  184. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  185. package/cjs/scenegraph/graphic/contributions/image-contribution-render.d.ts +3 -3
  186. package/cjs/scenegraph/graphic/contributions/image-contribution-render.js +2 -2
  187. package/cjs/scenegraph/graphic/contributions/image-contribution-render.js.map +1 -1
  188. package/cjs/scenegraph/graphic/contributions/rect-contribution-render.d.ts +3 -3
  189. package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js +2 -2
  190. package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
  191. package/cjs/scenegraph/graphic/text.d.ts +15 -0
  192. package/cjs/scenegraph/group-creater/cell-helper.js +9 -3
  193. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  194. package/cjs/scenegraph/group-creater/cell-type/chart-cell.d.ts +1 -1
  195. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +6 -5
  196. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  197. package/cjs/scenegraph/group-creater/column.js.map +1 -1
  198. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +3 -0
  199. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +71 -0
  200. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -0
  201. package/cjs/scenegraph/group-creater/progress/proxy.d.ts +1 -1
  202. package/cjs/scenegraph/group-creater/progress/proxy.js +29 -35
  203. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  204. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +6 -6
  205. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  206. package/cjs/scenegraph/layout/compute-col-width.js +23 -15
  207. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  208. package/cjs/scenegraph/layout/compute-row-height.js +20 -9
  209. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  210. package/cjs/scenegraph/layout/move-cell.js +1 -1
  211. package/cjs/scenegraph/layout/move-cell.js.map +1 -1
  212. package/cjs/scenegraph/layout/update-cell.js +3 -2
  213. package/cjs/scenegraph/layout/update-cell.js.map +1 -1
  214. package/cjs/scenegraph/layout/update-height.js +1 -1
  215. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  216. package/cjs/scenegraph/layout/update-row.js +1 -1
  217. package/cjs/scenegraph/layout/update-row.js.map +1 -1
  218. package/cjs/scenegraph/layout/update-width.js +33 -3
  219. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  220. package/cjs/scenegraph/refresh-node/update-chart.d.ts +3 -0
  221. package/cjs/scenegraph/refresh-node/update-chart.js +76 -7
  222. package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
  223. package/cjs/scenegraph/scenegraph.d.ts +8 -0
  224. package/cjs/scenegraph/scenegraph.js +115 -19
  225. package/cjs/scenegraph/scenegraph.js.map +1 -1
  226. package/cjs/scenegraph/stick-text/index.js +10 -8
  227. package/cjs/scenegraph/stick-text/index.js.map +1 -1
  228. package/cjs/scenegraph/style/corner-cell.d.ts +3 -0
  229. package/cjs/scenegraph/style/corner-cell.js +29 -0
  230. package/cjs/scenegraph/style/corner-cell.js.map +1 -0
  231. package/cjs/scenegraph/style/frame-border.d.ts +1 -0
  232. package/cjs/scenegraph/style/frame-border.js +3 -7
  233. package/cjs/scenegraph/style/frame-border.js.map +1 -1
  234. package/cjs/scenegraph/utils/get-cell-merge.js +2 -1
  235. package/cjs/scenegraph/utils/get-cell-merge.js.map +1 -1
  236. package/cjs/state/state.js +1 -1
  237. package/cjs/state/state.js.map +1 -1
  238. package/cjs/themes/DARK.js +1 -2
  239. package/cjs/themes/theme.d.ts +10 -0
  240. package/cjs/themes/theme.js +50 -4
  241. package/cjs/themes/theme.js.map +1 -1
  242. package/cjs/tools/LimitPromiseQueue.js +2 -1
  243. package/cjs/tools/calc.d.ts +3 -0
  244. package/cjs/tools/calc.js +11 -3
  245. package/cjs/tools/calc.js.map +1 -1
  246. package/cjs/tools/debounce.js +1 -1
  247. package/cjs/tools/diff-cell.js +2 -2
  248. package/cjs/tools/dom.js +1 -1
  249. package/cjs/tools/env.js +1 -1
  250. package/cjs/ts-types/base-table.d.ts +29 -12
  251. package/cjs/ts-types/base-table.js.map +1 -1
  252. package/cjs/ts-types/column/style.d.ts +0 -1
  253. package/cjs/ts-types/column/style.js.map +1 -1
  254. package/cjs/ts-types/component/axis.d.ts +12 -0
  255. package/cjs/ts-types/component/axis.js +6 -0
  256. package/cjs/ts-types/component/axis.js.map +1 -0
  257. package/cjs/ts-types/component/legend.d.ts +5 -0
  258. package/cjs/ts-types/component/legend.js +6 -0
  259. package/cjs/ts-types/component/legend.js.map +1 -0
  260. package/cjs/ts-types/component/title.d.ts +47 -0
  261. package/cjs/ts-types/component/title.js +6 -0
  262. package/cjs/ts-types/component/title.js.map +1 -0
  263. package/cjs/ts-types/component/util.d.ts +1 -0
  264. package/cjs/ts-types/component/util.js +6 -0
  265. package/cjs/ts-types/component/util.js.map +1 -0
  266. package/cjs/ts-types/customElement.d.ts +2 -0
  267. package/cjs/ts-types/customElement.js.map +1 -1
  268. package/cjs/ts-types/events.d.ts +108 -83
  269. package/cjs/ts-types/events.js.map +1 -1
  270. package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
  271. package/cjs/ts-types/list-table/define/chart-define.d.ts +1 -1
  272. package/cjs/ts-types/list-table/define/chart-define.js.map +1 -1
  273. package/cjs/ts-types/list-table/layout-map/api.d.ts +4 -2
  274. package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
  275. package/cjs/ts-types/new-data-set.d.ts +19 -5
  276. package/cjs/ts-types/new-data-set.js +2 -2
  277. package/cjs/ts-types/new-data-set.js.map +1 -1
  278. package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.d.ts +4 -0
  279. package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js +3 -1
  280. package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js.map +1 -1
  281. package/cjs/ts-types/pivot-table/corner.d.ts +3 -3
  282. package/cjs/ts-types/pivot-table/corner.js.map +1 -1
  283. package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
  284. package/cjs/ts-types/pivot-table/indicator/chart-indicator.d.ts +1 -1
  285. package/cjs/ts-types/pivot-table/indicator/chart-indicator.js.map +1 -1
  286. package/cjs/ts-types/pivot-table/indicator/index.d.ts +1 -0
  287. package/cjs/ts-types/pivot-table/indicator/index.js.map +1 -1
  288. package/cjs/ts-types/pivot-table/title.d.ts +1 -1
  289. package/cjs/ts-types/pivot-table/title.js.map +1 -1
  290. package/cjs/ts-types/table-engine.d.ts +27 -3
  291. package/cjs/ts-types/table-engine.js.map +1 -1
  292. package/cjs/ts-types/theme.d.ts +5 -0
  293. package/cjs/ts-types/theme.js.map +1 -1
  294. package/dist/vtable.js +37522 -24362
  295. package/dist/vtable.min.js +4 -2
  296. package/es/ListTable.d.ts +2 -1
  297. package/es/ListTable.js +17 -13
  298. package/es/ListTable.js.map +1 -1
  299. package/es/PivotChart.d.ts +69 -0
  300. package/es/PivotChart.js +445 -0
  301. package/es/PivotChart.js.map +1 -0
  302. package/es/PivotTable.d.ts +2 -1
  303. package/es/PivotTable.js +19 -14
  304. package/es/PivotTable.js.map +1 -1
  305. package/es/body-helper/style/MultilineTextStyle.js +2 -2
  306. package/es/body-helper/style/MultilineTextStyle.js.map +1 -1
  307. package/es/body-helper/style/ProgressBarStyle.js +15 -15
  308. package/es/body-helper/style/ProgressBarStyle.js.map +1 -1
  309. package/es/body-helper/style/Style.d.ts +0 -1
  310. package/es/body-helper/style/Style.js +25 -28
  311. package/es/body-helper/style/Style.js.map +1 -1
  312. package/es/{chartType.js → chartModule.js} +2 -2
  313. package/es/chartModule.js.map +1 -0
  314. package/es/components/axis/axis.d.ts +45 -0
  315. package/es/components/axis/axis.js +155 -0
  316. package/es/components/axis/axis.js.map +1 -0
  317. package/es/components/axis/band-scale.d.ts +18 -0
  318. package/es/components/axis/band-scale.js +46 -0
  319. package/es/components/axis/band-scale.js.map +1 -0
  320. package/es/components/axis/get-axis-attributes.d.ts +136 -0
  321. package/es/components/axis/get-axis-attributes.js +166 -0
  322. package/es/components/axis/get-axis-attributes.js.map +1 -0
  323. package/es/components/axis/label-overlap.d.ts +3 -0
  324. package/es/components/axis/label-overlap.js +39 -0
  325. package/es/components/axis/label-overlap.js.map +1 -0
  326. package/es/components/axis/linear-scale.d.ts +45 -0
  327. package/es/components/axis/linear-scale.js +104 -0
  328. package/es/components/axis/linear-scale.js.map +1 -0
  329. package/es/components/legend/get-legend-attributes.d.ts +5 -0
  330. package/es/components/legend/get-legend-attributes.js +84 -0
  331. package/es/components/legend/get-legend-attributes.js.map +1 -0
  332. package/es/components/legend/legend.d.ts +23 -0
  333. package/es/components/legend/legend.js +93 -0
  334. package/es/components/legend/legend.js.map +1 -0
  335. package/{cjs → es/components}/menu/dom/BaseMenu.d.ts +2 -2
  336. package/es/components/menu/dom/BaseMenu.js.map +1 -0
  337. package/es/components/menu/dom/Menu.js.map +1 -0
  338. package/es/{menu → components/menu}/dom/MenuHandler.d.ts +2 -2
  339. package/es/{menu → components/menu}/dom/MenuHandler.js +2 -2
  340. package/es/components/menu/dom/MenuHandler.js.map +1 -0
  341. package/es/{menu → components/menu}/dom/logic/MenuContainer.d.ts +2 -2
  342. package/es/{menu → components/menu}/dom/logic/MenuContainer.js +4 -4
  343. package/es/components/menu/dom/logic/MenuContainer.js.map +1 -0
  344. package/es/{menu → components/menu}/dom/logic/MenuElement.d.ts +2 -2
  345. package/es/{menu → components/menu}/dom/logic/MenuElement.js +9 -9
  346. package/es/components/menu/dom/logic/MenuElement.js.map +1 -0
  347. package/es/components/menu/dom/logic/MenuElementStyle.js.map +1 -0
  348. package/es/components/title/title.d.ts +12 -0
  349. package/es/components/title/title.js +61 -0
  350. package/es/components/title/title.js.map +1 -0
  351. package/{cjs → es/components}/tooltip/BaseTooltip.d.ts +3 -3
  352. package/es/components/tooltip/BaseTooltip.js.map +1 -0
  353. package/es/components/tooltip/Tooltip.js.map +1 -0
  354. package/es/{tooltip → components/tooltip}/TooltipHandler.d.ts +4 -4
  355. package/es/{tooltip → components/tooltip}/TooltipHandler.js +4 -4
  356. package/es/components/tooltip/TooltipHandler.js.map +1 -0
  357. package/{cjs → es/components}/tooltip/logic/BubbleTooltipElement.d.ts +4 -4
  358. package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElement.js +4 -4
  359. package/es/components/tooltip/logic/BubbleTooltipElement.js.map +1 -0
  360. package/es/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -0
  361. package/es/components/util/orient.d.ts +3 -0
  362. package/es/components/util/orient.js +8 -0
  363. package/es/components/util/orient.js.map +1 -0
  364. package/es/components/util/register.d.ts +3 -0
  365. package/es/components/util/register.js +8 -0
  366. package/es/components/util/register.js.map +1 -0
  367. package/es/components/util/tick-data/config.d.ts +1 -0
  368. package/es/components/util/tick-data/config.js +2 -0
  369. package/es/components/util/tick-data/config.js.map +1 -0
  370. package/es/components/util/tick-data/continuous.d.ts +2 -0
  371. package/es/components/util/tick-data/continuous.js +38 -0
  372. package/es/components/util/tick-data/continuous.js.map +1 -0
  373. package/es/components/util/tick-data/discrete/linear.d.ts +2 -0
  374. package/es/components/util/tick-data/discrete/linear.js +59 -0
  375. package/es/components/util/tick-data/discrete/linear.js.map +1 -0
  376. package/es/components/util/tick-data/discrete/polar-angle.d.ts +2 -0
  377. package/es/components/util/tick-data/discrete/polar-angle.js +39 -0
  378. package/es/components/util/tick-data/discrete/polar-angle.js.map +1 -0
  379. package/es/components/util/tick-data/index.d.ts +2 -0
  380. package/es/components/util/tick-data/index.js +19 -0
  381. package/es/components/util/tick-data/index.js.map +1 -0
  382. package/es/components/util/tick-data/util.d.ts +21 -0
  383. package/es/components/util/tick-data/util.js +104 -0
  384. package/es/components/util/tick-data/util.js.map +1 -0
  385. package/es/components/util/transform.d.ts +5 -0
  386. package/es/components/util/transform.js +34 -0
  387. package/es/components/util/transform.js.map +1 -0
  388. package/es/core/BaseTable.d.ts +18 -5
  389. package/es/core/BaseTable.js +119 -43
  390. package/es/core/BaseTable.js.map +1 -1
  391. package/es/core/TABLE_EVENT_TYPE.d.ts +5 -0
  392. package/es/core/TABLE_EVENT_TYPE.js +6 -1
  393. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  394. package/es/core/style.js +1 -1
  395. package/es/core/style.js.map +1 -1
  396. package/es/core/tableHelper.js +1 -2
  397. package/es/data/CachedDataSource.js +2 -1
  398. package/es/data/DataSource.js +2 -2
  399. package/es/data/DataSource.js.map +1 -1
  400. package/es/dataset/dataset-pivot-table.d.ts +60 -0
  401. package/es/dataset/dataset-pivot-table.js +378 -0
  402. package/es/dataset/dataset-pivot-table.js.map +1 -0
  403. package/es/dataset/dataset.d.ts +14 -19
  404. package/es/dataset/dataset.js +175 -190
  405. package/es/dataset/dataset.js.map +1 -1
  406. package/es/dataset/statistics-helper.d.ts +68 -0
  407. package/es/dataset/statistics-helper.js +152 -0
  408. package/es/dataset/statistics-helper.js.map +1 -0
  409. package/es/dataset/util/zero-align.d.ts +10 -0
  410. package/es/dataset/util/zero-align.js +111 -0
  411. package/es/dataset/util/zero-align.js.map +1 -0
  412. package/es/event/EventHandler.js.map +1 -1
  413. package/es/event/EventTarget.d.ts +5 -5
  414. package/es/event/EventTarget.js +2 -2
  415. package/es/event/EventTarget.js.map +1 -1
  416. package/es/event/VChartEventProxy.d.ts +1 -0
  417. package/es/event/VChartEventProxy.js +1 -0
  418. package/es/event/VChartEventProxy.js.map +1 -0
  419. package/es/event/event.js +10 -3
  420. package/es/event/event.js.map +1 -1
  421. package/es/event/listener/table-group.js +8 -6
  422. package/es/event/listener/table-group.js.map +1 -1
  423. package/es/event/pivot-chart/axis-click.d.ts +2 -0
  424. package/es/event/pivot-chart/axis-click.js +36 -0
  425. package/es/event/pivot-chart/axis-click.js.map +1 -0
  426. package/es/event/pivot-chart/axis-hover.d.ts +2 -0
  427. package/es/event/pivot-chart/axis-hover.js +33 -0
  428. package/es/event/pivot-chart/axis-hover.js.map +1 -0
  429. package/es/event/scroll.js +4 -3
  430. package/es/event/scroll.js.map +1 -1
  431. package/es/event/sparkline-event.js +1 -2
  432. package/es/event/sparkline-event.js.map +1 -1
  433. package/es/header-helper/header-helper.js +1 -1
  434. package/es/header-helper/header-helper.js.map +1 -1
  435. package/es/header-helper/style/MultilineTextHeaderStyle.js +2 -2
  436. package/es/header-helper/style/MultilineTextHeaderStyle.js.map +1 -1
  437. package/es/header-helper/style/Style.d.ts +0 -1
  438. package/es/header-helper/style/Style.js +25 -28
  439. package/es/header-helper/style/Style.js.map +1 -1
  440. package/es/index.d.ts +4 -3
  441. package/es/index.js +4 -2
  442. package/es/index.js.map +1 -1
  443. package/es/layout/chart-helper/get-axis-config.d.ts +2 -0
  444. package/es/layout/chart-helper/get-axis-config.js +110 -0
  445. package/es/layout/chart-helper/get-axis-config.js.map +1 -0
  446. package/es/layout/chart-helper/get-chart-spec.d.ts +7 -0
  447. package/es/layout/chart-helper/get-chart-spec.js +126 -0
  448. package/es/layout/chart-helper/get-chart-spec.js.map +1 -0
  449. package/es/layout/index.js +2 -1
  450. package/es/layout/pivot-header-layout.d.ts +13 -5
  451. package/es/layout/pivot-header-layout.js +50 -12
  452. package/es/layout/pivot-header-layout.js.map +1 -1
  453. package/es/layout/pivot-layout.d.ts +54 -8
  454. package/es/layout/pivot-layout.js +402 -89
  455. package/es/layout/pivot-layout.js.map +1 -1
  456. package/es/layout/simple-header-layout.d.ts +10 -0
  457. package/es/layout/simple-header-layout.js +44 -1
  458. package/es/layout/simple-header-layout.js.map +1 -1
  459. package/es/plugins/chartModules.js +2 -0
  460. package/es/plugins/chartModules.js.map +1 -0
  461. package/es/register.d.ts +1 -1
  462. package/es/register.js +3 -3
  463. package/es/register.js.map +1 -1
  464. package/es/render/layout/text.d.ts +33 -4
  465. package/es/render/layout/text.js +9 -3
  466. package/es/render/layout/text.js.map +1 -1
  467. package/es/scenegraph/component/custom.js +17 -16
  468. package/es/scenegraph/component/custom.js.map +1 -1
  469. package/es/scenegraph/component/menu.d.ts +41 -0
  470. package/es/scenegraph/component/table-component.js +3 -3
  471. package/es/scenegraph/component/table-component.js.map +1 -1
  472. package/es/scenegraph/graphic/chart.d.ts +4 -1
  473. package/es/scenegraph/graphic/chart.js +29 -15
  474. package/es/scenegraph/graphic/chart.js.map +1 -1
  475. package/es/scenegraph/graphic/contributions/chart-render.js +22 -3
  476. package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
  477. package/es/scenegraph/graphic/contributions/group-contribution-render.d.ts +9 -9
  478. package/es/scenegraph/graphic/contributions/group-contribution-render.js +48 -29
  479. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  480. package/es/scenegraph/graphic/contributions/image-contribution-render.d.ts +3 -3
  481. package/es/scenegraph/graphic/contributions/image-contribution-render.js +2 -2
  482. package/es/scenegraph/graphic/contributions/image-contribution-render.js.map +1 -1
  483. package/es/scenegraph/graphic/contributions/rect-contribution-render.d.ts +3 -3
  484. package/es/scenegraph/graphic/contributions/rect-contribution-render.js +2 -2
  485. package/es/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
  486. package/es/scenegraph/graphic/text.d.ts +15 -0
  487. package/es/scenegraph/group-creater/cell-helper.js +10 -2
  488. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  489. package/es/scenegraph/group-creater/cell-type/chart-cell.d.ts +1 -1
  490. package/es/scenegraph/group-creater/cell-type/chart-cell.js +6 -5
  491. package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  492. package/es/scenegraph/group-creater/column.js.map +1 -1
  493. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +3 -0
  494. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +65 -0
  495. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -0
  496. package/es/scenegraph/group-creater/progress/proxy.d.ts +1 -1
  497. package/es/scenegraph/group-creater/progress/proxy.js +27 -34
  498. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  499. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +6 -6
  500. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  501. package/es/scenegraph/layout/compute-col-width.js +23 -15
  502. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  503. package/es/scenegraph/layout/compute-row-height.js +20 -9
  504. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  505. package/es/scenegraph/layout/move-cell.js +1 -1
  506. package/es/scenegraph/layout/move-cell.js.map +1 -1
  507. package/es/scenegraph/layout/update-cell.js +3 -1
  508. package/es/scenegraph/layout/update-cell.js.map +1 -1
  509. package/es/scenegraph/layout/update-height.js +1 -1
  510. package/es/scenegraph/layout/update-height.js.map +1 -1
  511. package/es/scenegraph/layout/update-row.js +1 -1
  512. package/es/scenegraph/layout/update-row.js.map +1 -1
  513. package/es/scenegraph/layout/update-width.js +34 -2
  514. package/es/scenegraph/layout/update-width.js.map +1 -1
  515. package/es/scenegraph/refresh-node/update-chart.d.ts +3 -0
  516. package/es/scenegraph/refresh-node/update-chart.js +70 -4
  517. package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
  518. package/es/scenegraph/scenegraph.d.ts +8 -0
  519. package/es/scenegraph/scenegraph.js +117 -19
  520. package/es/scenegraph/scenegraph.js.map +1 -1
  521. package/es/scenegraph/stick-text/index.js +10 -8
  522. package/es/scenegraph/stick-text/index.js.map +1 -1
  523. package/es/scenegraph/style/corner-cell.d.ts +3 -0
  524. package/es/scenegraph/style/corner-cell.js +25 -0
  525. package/es/scenegraph/style/corner-cell.js.map +1 -0
  526. package/es/scenegraph/style/frame-border.d.ts +1 -0
  527. package/es/scenegraph/style/frame-border.js +2 -6
  528. package/es/scenegraph/style/frame-border.js.map +1 -1
  529. package/es/scenegraph/utils/get-cell-merge.js +2 -1
  530. package/es/scenegraph/utils/get-cell-merge.js.map +1 -1
  531. package/es/state/state.js +1 -1
  532. package/es/state/state.js.map +1 -1
  533. package/es/themes/DARK.js +1 -2
  534. package/es/themes/theme.d.ts +10 -0
  535. package/es/themes/theme.js +50 -4
  536. package/es/themes/theme.js.map +1 -1
  537. package/es/tools/LimitPromiseQueue.js +2 -1
  538. package/es/tools/calc.d.ts +3 -0
  539. package/es/tools/calc.js +10 -0
  540. package/es/tools/calc.js.map +1 -1
  541. package/es/tools/debounce.js +1 -1
  542. package/es/tools/diff-cell.js +1 -1
  543. package/es/tools/dom.js +1 -1
  544. package/es/tools/env.js +1 -1
  545. package/es/ts-types/base-table.d.ts +29 -12
  546. package/es/ts-types/base-table.js.map +1 -1
  547. package/es/ts-types/column/style.d.ts +0 -1
  548. package/es/ts-types/column/style.js.map +1 -1
  549. package/es/ts-types/component/axis.d.ts +12 -0
  550. package/es/ts-types/component/axis.js +2 -0
  551. package/es/ts-types/component/axis.js.map +1 -0
  552. package/es/ts-types/component/legend.d.ts +5 -0
  553. package/es/ts-types/component/legend.js +2 -0
  554. package/es/ts-types/component/legend.js.map +1 -0
  555. package/es/ts-types/component/title.d.ts +47 -0
  556. package/es/ts-types/component/title.js +2 -0
  557. package/es/ts-types/component/title.js.map +1 -0
  558. package/es/ts-types/component/util.d.ts +1 -0
  559. package/es/ts-types/component/util.js +2 -0
  560. package/es/ts-types/component/util.js.map +1 -0
  561. package/es/ts-types/customElement.d.ts +2 -0
  562. package/es/ts-types/customElement.js.map +1 -1
  563. package/es/ts-types/events.d.ts +108 -83
  564. package/es/ts-types/events.js.map +1 -1
  565. package/es/ts-types/list-table/define/basic-define.js.map +1 -1
  566. package/es/ts-types/list-table/define/chart-define.d.ts +1 -1
  567. package/es/ts-types/list-table/define/chart-define.js.map +1 -1
  568. package/es/ts-types/list-table/layout-map/api.d.ts +4 -2
  569. package/es/ts-types/list-table/layout-map/api.js.map +1 -1
  570. package/es/ts-types/new-data-set.d.ts +19 -5
  571. package/es/ts-types/new-data-set.js +2 -2
  572. package/es/ts-types/new-data-set.js.map +1 -1
  573. package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.d.ts +4 -0
  574. package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js +4 -0
  575. package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js.map +1 -1
  576. package/es/ts-types/pivot-table/corner.d.ts +3 -3
  577. package/es/ts-types/pivot-table/corner.js.map +1 -1
  578. package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
  579. package/es/ts-types/pivot-table/indicator/chart-indicator.d.ts +1 -1
  580. package/es/ts-types/pivot-table/indicator/chart-indicator.js.map +1 -1
  581. package/es/ts-types/pivot-table/indicator/index.d.ts +1 -0
  582. package/es/ts-types/pivot-table/indicator/index.js.map +1 -1
  583. package/es/ts-types/pivot-table/title.d.ts +1 -1
  584. package/es/ts-types/pivot-table/title.js.map +1 -1
  585. package/es/ts-types/table-engine.d.ts +27 -3
  586. package/es/ts-types/table-engine.js.map +1 -1
  587. package/es/ts-types/theme.d.ts +5 -0
  588. package/es/ts-types/theme.js.map +1 -1
  589. package/package.json +16 -10
  590. package/cjs/chartType.js +0 -14
  591. package/cjs/chartType.js.map +0 -1
  592. package/cjs/menu/dom/BaseMenu.js.map +0 -1
  593. package/cjs/menu/dom/Menu.js.map +0 -1
  594. package/cjs/menu/dom/MenuHandler.js.map +0 -1
  595. package/cjs/menu/dom/logic/MenuContainer.js.map +0 -1
  596. package/cjs/menu/dom/logic/MenuElement.js.map +0 -1
  597. package/cjs/menu/dom/logic/MenuElementStyle.js.map +0 -1
  598. package/cjs/plugins/chartTypes.js.map +0 -1
  599. package/cjs/scenegraph/layout/auto-width.d.ts +0 -2
  600. package/cjs/scenegraph/layout/auto-width.js +0 -85
  601. package/cjs/scenegraph/layout/auto-width.js.map +0 -1
  602. package/cjs/tooltip/BaseTooltip.js.map +0 -1
  603. package/cjs/tooltip/Tooltip.js.map +0 -1
  604. package/cjs/tooltip/TooltipHandler.js.map +0 -1
  605. package/cjs/tooltip/logic/BubbleTooltipElement.js.map +0 -1
  606. package/cjs/tooltip/logic/BubbleTooltipElementStyle.js.map +0 -1
  607. package/es/chartType.js.map +0 -1
  608. package/es/menu/dom/BaseMenu.js.map +0 -1
  609. package/es/menu/dom/Menu.js.map +0 -1
  610. package/es/menu/dom/MenuHandler.js.map +0 -1
  611. package/es/menu/dom/logic/MenuContainer.js.map +0 -1
  612. package/es/menu/dom/logic/MenuElement.js.map +0 -1
  613. package/es/menu/dom/logic/MenuElementStyle.js.map +0 -1
  614. package/es/plugins/chartTypes.js +0 -2
  615. package/es/plugins/chartTypes.js.map +0 -1
  616. package/es/scenegraph/layout/auto-width.d.ts +0 -2
  617. package/es/scenegraph/layout/auto-width.js +0 -82
  618. package/es/scenegraph/layout/auto-width.js.map +0 -1
  619. package/es/tooltip/BaseTooltip.js.map +0 -1
  620. package/es/tooltip/Tooltip.js.map +0 -1
  621. package/es/tooltip/TooltipHandler.js.map +0 -1
  622. package/es/tooltip/logic/BubbleTooltipElement.js.map +0 -1
  623. package/es/tooltip/logic/BubbleTooltipElementStyle.js.map +0 -1
  624. /package/cjs/{chartType.d.ts → chartModule.d.ts} +0 -0
  625. /package/cjs/{menu → components/menu}/dom/BaseMenu.js +0 -0
  626. /package/cjs/{menu → components/menu}/dom/Menu.d.ts +0 -0
  627. /package/cjs/{menu → components/menu}/dom/Menu.js +0 -0
  628. /package/cjs/{menu → components/menu}/dom/logic/MenuElementStyle.d.ts +0 -0
  629. /package/cjs/{menu → components/menu}/dom/logic/MenuElementStyle.js +0 -0
  630. /package/cjs/{tooltip → components/tooltip}/BaseTooltip.js +0 -0
  631. /package/cjs/{tooltip → components/tooltip}/Tooltip.d.ts +0 -0
  632. /package/cjs/{tooltip → components/tooltip}/Tooltip.js +0 -0
  633. /package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.d.ts +0 -0
  634. /package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.js +0 -0
  635. /package/cjs/plugins/{chartTypes.d.ts → chartModules.d.ts} +0 -0
  636. /package/es/{chartType.d.ts → chartModule.d.ts} +0 -0
  637. /package/es/{menu → components/menu}/dom/BaseMenu.js +0 -0
  638. /package/es/{menu → components/menu}/dom/Menu.d.ts +0 -0
  639. /package/es/{menu → components/menu}/dom/Menu.js +0 -0
  640. /package/es/{menu → components/menu}/dom/logic/MenuElementStyle.d.ts +0 -0
  641. /package/es/{menu → components/menu}/dom/logic/MenuElementStyle.js +0 -0
  642. /package/es/{tooltip → components/tooltip}/BaseTooltip.js +0 -0
  643. /package/es/{tooltip → components/tooltip}/Tooltip.d.ts +0 -0
  644. /package/es/{tooltip → components/tooltip}/Tooltip.js +0 -0
  645. /package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.d.ts +0 -0
  646. /package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.js +0 -0
  647. /package/es/plugins/{chartTypes.d.ts → chartModules.d.ts} +0 -0
@@ -16,7 +16,7 @@ let SplitGroupBeforeRenderContribution = class {
16
16
  constructor() {
17
17
  this.time = BaseRenderContributionTime.beforeFillStroke, this.useStyle = !0, this.order = 0;
18
18
  }
19
- drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, fillCb, strokeCb, doFillOrStroke) {
19
+ drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke) {
20
20
  const {stroke: stroke = groupAttribute.stroke, strokeArrayWidth: strokeArrayWidth = groupAttribute.strokeArrayWidth, strokeArrayColor: strokeArrayColor = groupAttribute.strokeArrayColor} = group.attribute;
21
21
  stroke && (Array.isArray(strokeArrayWidth) || Array.isArray(strokeArrayColor)) && (doFillOrStroke.doStroke = !1);
22
22
  }
@@ -30,10 +30,18 @@ let SplitGroupAfterRenderContribution = class {
30
30
  constructor() {
31
31
  this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
32
32
  }
33
- drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, fillCb, strokeCb) {
33
+ drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb) {
34
34
  const {width: width = groupAttribute.width, height: height = groupAttribute.height, stroke: stroke = groupAttribute.stroke, strokeArrayColor: strokeArrayColor = groupAttribute.strokeArrayColor, strokeArrayWidth: strokeArrayWidth = groupAttribute.strokeArrayWidth, lineWidth: lineWidth = groupAttribute.lineWidth, strokeColor: strokeColor = groupAttribute.stroke} = group.attribute;
35
- stroke && (Array.isArray(strokeArrayWidth) || 0 !== lineWidth) && (Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth)) && (("number" == typeof lineWidth && 1 & lineWidth || Array.isArray(strokeArrayWidth) && strokeArrayWidth.some((width => 1 & width))) && (x = Math.floor(x) + .5,
36
- y = Math.floor(y) + .5), renderStroke(group, context, x, y, groupAttribute, stroke, strokeArrayWidth || lineWidth, strokeArrayColor || strokeColor, Math.ceil(width), Math.ceil(height)));
35
+ if (!stroke || !Array.isArray(strokeArrayWidth) && 0 === lineWidth) return;
36
+ let widthForStroke, heightForStroke;
37
+ if (Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth)) {
38
+ if ("number" == typeof lineWidth && 1 & lineWidth || Array.isArray(strokeArrayWidth) && strokeArrayWidth.some((width => 1 & width))) {
39
+ x = Math.floor(x) + .5, y = Math.floor(y) + .5;
40
+ const {width: widthFroDraw, height: heightFroDraw} = getCellSizeForDraw(group, Math.ceil(width), Math.ceil(height));
41
+ widthForStroke = widthFroDraw, heightForStroke = heightFroDraw;
42
+ } else widthForStroke = Math.ceil(width), heightForStroke = Math.ceil(height);
43
+ renderStroke(group, context, x, y, groupAttribute, stroke, strokeArrayWidth || lineWidth, strokeArrayColor || strokeColor, widthForStroke, heightForStroke);
44
+ }
37
45
  }
38
46
  };
39
47
 
@@ -94,7 +102,7 @@ let DashGroupBeforeRenderContribution = class {
94
102
  constructor() {
95
103
  this.time = BaseRenderContributionTime.beforeFillStroke, this.useStyle = !0, this.order = 0;
96
104
  }
97
- drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, fillCb, strokeCb, doFillOrStroke) {
105
+ drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke) {
98
106
  const {lineDash: lineDash = groupAttribute.lineDash, stroke: stroke = groupAttribute.stroke, strokeArrayColor: strokeArrayColor = groupAttribute.strokeArrayColor, strokeArrayWidth: strokeArrayWidth = groupAttribute.strokeArrayWidth} = group.attribute;
99
107
  stroke && Array.isArray(lineDash) && lineDash.length && !Array.isArray(strokeArrayColor) && !Array.isArray(strokeArrayWidth) && (doFillOrStroke.doStroke = !1);
100
108
  }
@@ -108,19 +116,23 @@ let DashGroupAfterRenderContribution = class {
108
116
  constructor() {
109
117
  this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
110
118
  }
111
- drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, fillCb, strokeCb) {
119
+ drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb) {
112
120
  const {lineDash: lineDash = groupAttribute.lineDash, stroke: stroke = groupAttribute.stroke, strokeArrayColor: strokeArrayColor = groupAttribute.strokeArrayColor, strokeArrayWidth: strokeArrayWidth = groupAttribute.strokeArrayWidth, lineWidth: lineWidth = groupAttribute.lineWidth} = group.attribute;
113
121
  if (!stroke || !Array.isArray(lineDash) || !lineDash.length || Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth)) return;
114
- let {width: width = groupAttribute.width, height: height = groupAttribute.height} = group.attribute;
115
- width = Math.ceil(width), height = Math.ceil(height), 1 & lineWidth && (x = Math.floor(x) + .5,
116
- y = Math.floor(y) + .5), context.setStrokeStyle(group, group.attribute, x, y, groupAttribute),
117
- context.beginPath(), context.moveTo(x, y), context.lineTo(x + width, y), context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a,
118
- context.stroke(), context.beginPath(), context.moveTo(x + width, y), context.lineTo(x + width, y + height),
122
+ let widthForStroke, heightForStroke, {width: width = groupAttribute.width, height: height = groupAttribute.height} = group.attribute;
123
+ if (width = Math.ceil(width), height = Math.ceil(height), 1 & lineWidth) {
124
+ x = Math.floor(x) + .5, y = Math.floor(y) + .5;
125
+ const {width: widthFroDraw, height: heightFroDraw} = getCellSizeForDraw(group, Math.ceil(width), Math.ceil(height));
126
+ widthForStroke = widthFroDraw, heightForStroke = heightFroDraw;
127
+ } else widthForStroke = Math.ceil(width), heightForStroke = Math.ceil(height);
128
+ context.setStrokeStyle(group, group.attribute, x, y, groupAttribute), context.beginPath(),
129
+ context.moveTo(x, y), context.lineTo(x + widthForStroke, y), context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a,
130
+ context.stroke(), context.beginPath(), context.moveTo(x + widthForStroke, y), context.lineTo(x + widthForStroke, y + heightForStroke),
119
131
  context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d, context.stroke(),
120
- context.beginPath(), context.moveTo(x, y + height), context.lineTo(x + width, y + height),
132
+ context.beginPath(), context.moveTo(x, y + heightForStroke), context.lineTo(x + widthForStroke, y + heightForStroke),
121
133
  context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a, context.stroke(),
122
- context.beginPath(), context.moveTo(x, y), context.lineTo(x, y + height), context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d,
123
- context.stroke();
134
+ context.beginPath(), context.moveTo(x, y), context.lineTo(x, y + heightForStroke),
135
+ context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d, context.stroke();
124
136
  }
125
137
  };
126
138
 
@@ -132,7 +144,7 @@ let AdjustPosGroupBeforeRenderContribution = class {
132
144
  constructor() {
133
145
  this.time = BaseRenderContributionTime.beforeFillStroke, this.useStyle = !0, this.order = 0;
134
146
  }
135
- drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, fillCb, strokeCb, doFillOrStroke) {
147
+ drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke) {
136
148
  const {lineWidth: lineWidth = groupAttribute.lineWidth, stroke: stroke = groupAttribute.stroke, lineDash: lineDash = groupAttribute.lineDash, strokeArrayWidth: strokeArrayWidth = groupAttribute.strokeArrayWidth, strokeArrayColor: strokeArrayColor = groupAttribute.strokeArrayColor} = group.attribute;
137
149
  stroke && Array.isArray(lineDash) && !lineDash.length && !Array.isArray(strokeArrayColor) && !Array.isArray(strokeArrayWidth) && 1 & lineWidth && (doFillOrStroke.doStroke = !1);
138
150
  }
@@ -146,18 +158,11 @@ let AdjustPosGroupAfterRenderContribution = class {
146
158
  constructor() {
147
159
  this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
148
160
  }
149
- drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, fillCb, strokeCb) {
150
- const {lineWidth: lineWidth = groupAttribute.lineWidth, stroke: stroke = groupAttribute.stroke, lineDash: lineDash = groupAttribute.lineDash, strokeArrayWidth: strokeArrayWidth = groupAttribute.strokeArrayWidth, strokeArrayColor: strokeArrayColor = groupAttribute.strokeArrayColor} = group.attribute;
151
- let {width: width = groupAttribute.width, height: height = groupAttribute.height} = group.attribute;
152
- if (width = Math.ceil(width), height = Math.ceil(height), stroke && Array.isArray(lineDash) && !lineDash.length && !Array.isArray(strokeArrayColor) && !Array.isArray(strokeArrayWidth) && 1 & lineWidth) {
153
- if ("cell" === group.role) {
154
- const table = group.stage.table;
155
- let col = group.col, row = group.row;
156
- const mergeInfo = getCellMergeInfo(table, col, row);
157
- mergeInfo && (col = mergeInfo.end.col, row = mergeInfo.end.row), (table && col === table.colCount - 1 || table && col === table.frozenColCount - 1 && table.scrollLeft) && (width -= 1),
158
- (table && row === table.rowCount - 1 || table && row === table.frozenRowCount - 1 && table.scrollTop) && (height -= 1);
159
- }
160
- context.beginPath(), x = Math.floor(x) + .5, y = Math.floor(y) + .5, context.rect(x, y, width, height),
161
+ drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb) {
162
+ const {lineWidth: lineWidth = groupAttribute.lineWidth, stroke: stroke = groupAttribute.stroke, lineDash: lineDash = groupAttribute.lineDash, strokeArrayWidth: strokeArrayWidth = groupAttribute.strokeArrayWidth, strokeArrayColor: strokeArrayColor = groupAttribute.strokeArrayColor} = group.attribute, {width: width = groupAttribute.width, height: height = groupAttribute.height} = group.attribute;
163
+ if (stroke && Array.isArray(lineDash) && !lineDash.length && !Array.isArray(strokeArrayColor) && !Array.isArray(strokeArrayWidth) && 1 & lineWidth) {
164
+ const {width: widthFroDraw, height: heightFroDraw} = getCellSizeForDraw(group, Math.ceil(width), Math.ceil(height));
165
+ context.beginPath(), x = Math.floor(x) + .5, y = Math.floor(y) + .5, context.rect(x, y, widthFroDraw, heightFroDraw),
161
166
  context.setStrokeStyle(group, group.attribute, x, y, groupAttribute), context.stroke();
162
167
  }
163
168
  }
@@ -171,7 +176,7 @@ let AdjustColorGroupBeforeRenderContribution = class {
171
176
  constructor() {
172
177
  this.time = BaseRenderContributionTime.beforeFillStroke, this.useStyle = !0, this.order = 0;
173
178
  }
174
- drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, fillCb, strokeCb, doFillOrStroke) {
179
+ drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke) {
175
180
  if ("cell" === group.role) {
176
181
  const table = group.stage.table, hoverColor = getCellHoverColor(group, table);
177
182
  hoverColor && (group.oldColor = group.attribute.fill, group.attribute.fill = hoverColor);
@@ -187,7 +192,7 @@ let AdjustColorGroupAfterRenderContribution = class {
187
192
  constructor() {
188
193
  this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
189
194
  }
190
- drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, fillCb, strokeCb) {
195
+ drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb) {
191
196
  "oldColor" in group && (group.attribute.fill = group.oldColor, delete group.oldColor);
192
197
  }
193
198
  };
@@ -195,4 +200,18 @@ let AdjustColorGroupAfterRenderContribution = class {
195
200
  AdjustColorGroupAfterRenderContribution = __decorate([ injectable() ], AdjustColorGroupAfterRenderContribution);
196
201
 
197
202
  export { AdjustColorGroupAfterRenderContribution };
203
+
204
+ function getCellSizeForDraw(group, width, height) {
205
+ const table = group.stage.table;
206
+ if ("cell" === group.role) {
207
+ let col = group.col, row = group.row;
208
+ const mergeInfo = getCellMergeInfo(table, col, row);
209
+ mergeInfo && (col = mergeInfo.end.col, row = mergeInfo.end.row), (table && col === table.colCount - 1 || table && col === table.frozenColCount - 1 && table.scrollLeft) && (width -= 1),
210
+ (table && row === table.rowCount - 1 || table && row === table.frozenRowCount - 1 && table.scrollTop) && (height -= 1);
211
+ } else "corner-frozen" === group.role && (table.scrollLeft && (width -= 1), table.scrollTop && (height -= 1));
212
+ return {
213
+ width: width,
214
+ height: height
215
+ };
216
+ }
198
217
  //# sourceMappingURL=group-contribution-render.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["scenegra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ACjB,QAAiB,EACjB,cAAgD,EAChD,MAIY,EACZ,QAIY,EACZ,cAAuD;QAGvD,IAAK,KAAe,CAAC,IAAI,KAAK,MAAM,EAAE;YACpC,MAAM,KAAK,GAAI,KAAK,CAAC,KAAa,CAAC,KAAqB,CAAC;YACzD,MAAM,UAAU,GAAG,iBAAiB,CAAC,KAAc,EAAE,KAAK,CAAC,CAAC;YAC5D,IAAI,UAAU,EAAE;gBACb,KAAa,CAAC,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC;gBAC/C,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG,UAAU,CAAC;aACnC;SACF;IACH,CAAC;CACF,CAAA;AApCY,wCAAwC;IADpD,UAAU,EAAE;GACA,wCAAwC,CAoCpD;SApCY,wCAAwC;AAuC9C,IAAM,uCAAuC,GAA7C,MAAM,uCAAuC;IAA7C;QACL,SAAI,GAA+B,0BAA0B,CAAC,eAAe,CAAC;QAC9E,aAAQ,GAAG,IAAI,CAAC;QAChB,UAAK,GAAG,CAAC,CAAC;IA4BZ,CAAC;IA3BC,SAAS,CACP,KAAa,EACb,OAAmB,EACnB,CAAS,EACT,CAAS,EACT,MAAe,EACf,QAAiB,EACjB,QAAiB,EACjB,QAAiB,EACjB,cAAgD,EAChD,MAIY,EACZ,QAIY;QAGZ,IAAI,UAAU,IAAI,KAAK,EAAE;YACvB,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG,KAAK,CAAC,QAAe,CAAC;YAC7C,OAAO,KAAK,CAAC,QAAQ,CAAC;SACvB;IACH,CAAC;CACF,CAAA;AA/BY,uCAAuC;IADnD,UAAU,EAAE;GACA,uCAAuC,CA+BnD;SA/BY,uCAAuC","file":"group-contribution-render.js","sourcesContent":["import { injectable } from 'inversify';\nimport type {\n IGroup,\n IContext2d,\n IGroupGraphicAttribute,\n IMarkAttribute,\n IGraphicAttribute,\n IThemeAttribute,\n IGroupRenderContribution\n} from '@visactor/vrender';\nimport { BaseRenderContributionTime } from '@visactor/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';\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 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 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 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 x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\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 );\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>,\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) && (!strokeArrayColor || strokeArrayColor[0])) {\n if (strokeArrayColor) {\n context.strokeStyle = strokeArrayColor[0];\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) && (!strokeArrayColor || strokeArrayColor[1])) {\n if (strokeArrayColor) {\n context.strokeStyle = strokeArrayColor[1];\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) && (!strokeArrayColor || strokeArrayColor[2])) {\n if (strokeArrayColor) {\n context.strokeStyle = strokeArrayColor[2];\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) && (!strokeArrayColor || strokeArrayColor[3])) {\n if (strokeArrayColor) {\n context.strokeStyle = strokeArrayColor[3];\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}\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 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 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 if (lineWidth & 1) {\n x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\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 + width, y);\n context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;\n context.stroke();\n\n // right\n context.beginPath();\n context.moveTo(x + width, y);\n context.lineTo(x + width, y + height);\n context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;\n context.stroke();\n\n // bottom\n context.beginPath();\n context.moveTo(x, y + height);\n context.lineTo(x + width, y + height);\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 + height);\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 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 } = 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 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 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 } = group.attribute as any;\n\n let { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;\n width = Math.ceil(width);\n height = Math.ceil(height);\n\n if (\n 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 context.beginPath();\n x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\n context.rect(x, y, width, height);\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 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 const hoverColor = getCellHoverColor(group as Group, table);\n if (hoverColor) {\n (group as any).oldColor = group.attribute.fill;\n group.attribute.fill = hoverColor;\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 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 ('oldColor' in group) {\n group.attribute.fill = group.oldColor as any;\n delete group.oldColor;\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["scenegraph/graphic/contributions/group-contribution-render.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAWvC,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAGvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAOvD,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,gBAAg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AI,KAAK,CAAC,IAAI,KAAK,eAAe,EAAE;QACzC,IAAI,KAAK,CAAC,UAAU,EAAE;YACpB,KAAK,IAAI,CAAC,CAAC;SACZ;QACD,IAAI,KAAK,CAAC,SAAS,EAAE;YACnB,MAAM,IAAI,CAAC,CAAC;SACb;KACF;IACD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAC3B,CAAC","file":"group-contribution-render.js","sourcesContent":["import { injectable } from 'inversify';\nimport type {\n IGroup,\n IContext2d,\n IGroupGraphicAttribute,\n IMarkAttribute,\n IGraphicAttribute,\n IThemeAttribute,\n IGroupRenderContribution,\n IDrawContext\n} from '@visactor/vrender';\nimport { BaseRenderContributionTime } from '@visactor/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';\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 x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\n\n const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(\n group,\n Math.ceil(width),\n Math.ceil(height)\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>,\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) && (!strokeArrayColor || strokeArrayColor[0])) {\n if (strokeArrayColor) {\n context.strokeStyle = strokeArrayColor[0];\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) && (!strokeArrayColor || strokeArrayColor[1])) {\n if (strokeArrayColor) {\n context.strokeStyle = strokeArrayColor[1];\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) && (!strokeArrayColor || strokeArrayColor[2])) {\n if (strokeArrayColor) {\n context.strokeStyle = strokeArrayColor[2];\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) && (!strokeArrayColor || strokeArrayColor[3])) {\n if (strokeArrayColor) {\n context.strokeStyle = strokeArrayColor[3];\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}\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 x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\n\n const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(\n group,\n Math.ceil(width),\n Math.ceil(height)\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 } = 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 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 } = 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 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 x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\n context.rect(x, y, widthFroDraw, heightFroDraw);\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 const hoverColor = getCellHoverColor(group as Group, table);\n if (hoverColor) {\n (group as any).oldColor = group.attribute.fill;\n group.attribute.fill = hoverColor;\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 ('oldColor' in group) {\n group.attribute.fill = group.oldColor as any;\n delete group.oldColor;\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,10 +1,10 @@
1
- import type { IImage, IContext2d, IImageGraphicAttribute, IMarkAttribute, IGraphicAttribute, IThemeAttribute, IImageRenderContribution } from '@visactor/vrender';
1
+ import type { IImage, IContext2d, IImageGraphicAttribute, IMarkAttribute, IGraphicAttribute, IThemeAttribute, IImageRenderContribution, IDrawContext } from '@visactor/vrender';
2
2
  import { BaseRenderContributionTime } from '@visactor/vrender';
3
3
  export declare class BeforeImageRenderContribution implements IImageRenderContribution {
4
4
  time: BaseRenderContributionTime;
5
5
  useStyle: boolean;
6
6
  order: number;
7
- drawShape(image: IImage, context: IContext2d, x: number, y: number, doFill: boolean, doStroke: boolean, fVisible: boolean, sVisible: boolean, imageAttribute: Required<IImageGraphicAttribute>, fillCb?: (ctx: IContext2d, markAttribute: Partial<IMarkAttribute & IGraphicAttribute>, themeAttribute: IThemeAttribute) => boolean, strokeCb?: (ctx: IContext2d, markAttribute: Partial<IMarkAttribute & IGraphicAttribute>, themeAttribute: IThemeAttribute) => boolean, doFillOrStroke?: {
7
+ drawShape(image: IImage, context: IContext2d, x: number, y: number, doFill: boolean, doStroke: boolean, fVisible: boolean, sVisible: boolean, imageAttribute: Required<IImageGraphicAttribute>, drawContext: IDrawContext, fillCb?: (ctx: IContext2d, markAttribute: Partial<IMarkAttribute & IGraphicAttribute>, themeAttribute: IThemeAttribute) => boolean, strokeCb?: (ctx: IContext2d, markAttribute: Partial<IMarkAttribute & IGraphicAttribute>, themeAttribute: IThemeAttribute) => boolean, doFillOrStroke?: {
8
8
  doFill: boolean;
9
9
  doStroke: boolean;
10
10
  }): void;
@@ -13,7 +13,7 @@ export declare class AfterImageRenderContribution implements IImageRenderContrib
13
13
  time: BaseRenderContributionTime;
14
14
  useStyle: boolean;
15
15
  order: number;
16
- drawShape(image: IImage, context: IContext2d, x: number, y: number, doFill: boolean, doStroke: boolean, fVisible: boolean, sVisible: boolean, imageAttribute: Required<IImageGraphicAttribute>, fillCb?: (ctx: IContext2d, markAttribute: Partial<IMarkAttribute & IGraphicAttribute>, themeAttribute: IThemeAttribute) => boolean, strokeCb?: (ctx: IContext2d, markAttribute: Partial<IMarkAttribute & IGraphicAttribute>, themeAttribute: IThemeAttribute) => boolean, doFillOrStroke?: {
16
+ drawShape(image: IImage, context: IContext2d, x: number, y: number, doFill: boolean, doStroke: boolean, fVisible: boolean, sVisible: boolean, imageAttribute: Required<IImageGraphicAttribute>, drawContext: IDrawContext, fillCb?: (ctx: IContext2d, markAttribute: Partial<IMarkAttribute & IGraphicAttribute>, themeAttribute: IThemeAttribute) => boolean, strokeCb?: (ctx: IContext2d, markAttribute: Partial<IMarkAttribute & IGraphicAttribute>, themeAttribute: IThemeAttribute) => boolean, doFillOrStroke?: {
17
17
  doFill: boolean;
18
18
  doStroke: boolean;
19
19
  }): void;
@@ -12,7 +12,7 @@ let BeforeImageRenderContribution = class {
12
12
  constructor() {
13
13
  this.time = BaseRenderContributionTime.beforeFillStroke, this.useStyle = !0, this.order = 0;
14
14
  }
15
- drawShape(image, context, x, y, doFill, doStroke, fVisible, sVisible, imageAttribute, fillCb, strokeCb, doFillOrStroke) {
15
+ drawShape(image, context, x, y, doFill, doStroke, fVisible, sVisible, imageAttribute, drawContext, fillCb, strokeCb, doFillOrStroke) {
16
16
  const {shape: shape} = image.attribute;
17
17
  if ("circle" === shape) {
18
18
  const {width: width = imageAttribute.width, height: height = imageAttribute.height} = image.attribute;
@@ -30,7 +30,7 @@ let AfterImageRenderContribution = class {
30
30
  constructor() {
31
31
  this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
32
32
  }
33
- drawShape(image, context, x, y, doFill, doStroke, fVisible, sVisible, imageAttribute, fillCb, strokeCb, doFillOrStroke) {
33
+ drawShape(image, context, x, y, doFill, doStroke, fVisible, sVisible, imageAttribute, drawContext, fillCb, strokeCb, doFillOrStroke) {
34
34
  const {shape: shape} = image.attribute;
35
35
  "circle" === shape && context.restore();
36
36
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["scenegraph/graphic/contributions/image-contribution-render.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAUvC,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAOxD,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IAAnC;QACL,SAAI,GAA+B,0BAA0B,CAAC,gBAAgB,CAAC;QAC/E,aAAQ,GAAG,IAAI,CAAC;QAChB,UAAK,GAAG,CAAC,CAAC;IAoCZ,CAAC;IAnCC,SAAS,CACP,KAAa,EACb,OAAmB,EACnB,CAAS,EACT,CAAS,EACT,MAAe,EACf,QAAiB,EACjB,QAAiB,EACjB,QAAiB,EACjB,cAAgD,EAChD,MAIY,EACZ,QAIY,EACZ,c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AA4B,CAgCxC;SAhCY,4BAA4B","file":"image-contribution-render.js","sourcesContent":["import { injectable } from 'inversify';\nimport type {\n IImage,\n IContext2d,\n IImageGraphicAttribute,\n IMarkAttribute,\n IGraphicAttribute,\n IThemeAttribute,\n IImageRenderContribution\n} from '@visactor/vrender';\nimport { BaseRenderContributionTime } from '@visactor/vrender';\n\n/**\n * @description: image支持绘制部分形状\n * @return {*}\n */\n@injectable()\nexport class BeforeImageRenderContribution implements IImageRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n image: IImage,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n imageAttribute: Required<IImageGraphicAttribute>,\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 { shape } = image.attribute as any;\n\n if (shape === 'circle') {\n const { width = imageAttribute.width, height = imageAttribute.height } = image.attribute;\n\n context.beginPath();\n context.arc(x + width / 2, y + height / 2, Math.min(width, height) / 2, 0, 2 * Math.PI);\n context.closePath();\n\n context.save();\n context.clip();\n }\n }\n}\n\n@injectable()\nexport class AfterImageRenderContribution implements IImageRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n image: IImage,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n imageAttribute: Required<IImageGraphicAttribute>,\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 { shape } = image.attribute as any;\n\n if (shape === 'circle') {\n context.restore();\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["scenegraph/graphic/contributions/image-contribution-render.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAWvC,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAOxD,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IAAnC;QACL,SAAI,GAA+B,0BAA0B,CAAC,gBAAgB,CAAC;QAC/E,aAAQ,GAAG,IAAI,CAAC;QAChB,UAAK,GAAG,CAAC,CAAC;IAqCZ,CAAC;IApCC,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,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,SAAgB,CAAC;QAEzC,IAAI,KAAK,KAAK,QAAQ,EAAE;YACtB,MAAM,EAAE,KAAK,GAAG,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC;YAEzF,OAAO,CAAC,SAAS,EAAE,CAAC;YACpB,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;YACxF,OAAO,CAAC,SAAS,EAAE,CAAC;YAEpB,OAAO,CAAC,IAAI,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,EAAE,CAAC;SAChB;IACH,CAAC;CACF,CAAA;AAxCY,6BAA6B;IADzC,UAAU,EAAE;GACA,6BAA6B,CAwCzC;SAxCY,6BAA6B;AA2CnC,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAAlC;QACL,SAAI,GAA+B,0BAA0B,CAAC,eAAe,CAAC;QAC9E,aAAQ,GAAG,IAAI,CAAC;QAChB,UAAK,GAAG,CAAC,CAAC;IA8BZ,CAAC;IA7BC,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,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,SAAgB,CAAC;QAEzC,IAAI,KAAK,KAAK,QAAQ,EAAE;YACtB,OAAO,CAAC,OAAO,EAAE,CAAC;SACnB;IACH,CAAC;CACF,CAAA;AAjCY,4BAA4B;IADxC,UAAU,EAAE;GACA,4BAA4B,CAiCxC;SAjCY,4BAA4B","file":"image-contribution-render.js","sourcesContent":["import { injectable } from 'inversify';\nimport type {\n IImage,\n IContext2d,\n IImageGraphicAttribute,\n IMarkAttribute,\n IGraphicAttribute,\n IThemeAttribute,\n IImageRenderContribution,\n IDrawContext\n} from '@visactor/vrender';\nimport { BaseRenderContributionTime } from '@visactor/vrender';\n\n/**\n * @description: image支持绘制部分形状\n * @return {*}\n */\n@injectable()\nexport class BeforeImageRenderContribution implements IImageRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n image: IImage,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n imageAttribute: Required<IImageGraphicAttribute>,\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 { shape } = image.attribute as any;\n\n if (shape === 'circle') {\n const { width = imageAttribute.width, height = imageAttribute.height } = image.attribute;\n\n context.beginPath();\n context.arc(x + width / 2, y + height / 2, Math.min(width, height) / 2, 0, 2 * Math.PI);\n context.closePath();\n\n context.save();\n context.clip();\n }\n }\n}\n\n@injectable()\nexport class AfterImageRenderContribution implements IImageRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n image: IImage,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n imageAttribute: Required<IImageGraphicAttribute>,\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 { shape } = image.attribute as any;\n\n if (shape === 'circle') {\n context.restore();\n }\n }\n}\n"]}
@@ -1,10 +1,10 @@
1
- import type { IRect, IContext2d, IRectGraphicAttribute, IMarkAttribute, IGraphicAttribute, IThemeAttribute, IRectRenderContribution } from '@visactor/vrender';
1
+ import type { IRect, IContext2d, IRectGraphicAttribute, IMarkAttribute, IGraphicAttribute, IThemeAttribute, IRectRenderContribution, IDrawContext } from '@visactor/vrender';
2
2
  import { BaseRenderContributionTime } from '@visactor/vrender';
3
3
  export declare class SplitRectBeforeRenderContribution implements IRectRenderContribution {
4
4
  time: BaseRenderContributionTime;
5
5
  useStyle: boolean;
6
6
  order: number;
7
- drawShape(rect: IRect, context: IContext2d, x: number, y: number, doFill: boolean, doStroke: boolean, fVisible: boolean, sVisible: boolean, rectAttribute: Required<IRectGraphicAttribute>, fillCb?: (ctx: IContext2d, markAttribute: Partial<IMarkAttribute & IGraphicAttribute>, themeAttribute: IThemeAttribute) => boolean, strokeCb?: (ctx: IContext2d, markAttribute: Partial<IMarkAttribute & IGraphicAttribute>, themeAttribute: IThemeAttribute) => boolean, doFillOrStroke?: {
7
+ drawShape(rect: IRect, context: IContext2d, x: number, y: number, doFill: boolean, doStroke: boolean, fVisible: boolean, sVisible: boolean, rectAttribute: Required<IRectGraphicAttribute>, drawContext: IDrawContext, fillCb?: (ctx: IContext2d, markAttribute: Partial<IMarkAttribute & IGraphicAttribute>, themeAttribute: IThemeAttribute) => boolean, strokeCb?: (ctx: IContext2d, markAttribute: Partial<IMarkAttribute & IGraphicAttribute>, themeAttribute: IThemeAttribute) => boolean, doFillOrStroke?: {
8
8
  doFill: boolean;
9
9
  doStroke: boolean;
10
10
  }): void;
@@ -13,5 +13,5 @@ export declare class SplitRectAfterRenderContribution implements IRectRenderCont
13
13
  time: BaseRenderContributionTime;
14
14
  useStyle: boolean;
15
15
  order: number;
16
- drawShape(rect: IRect, context: IContext2d, x: number, y: number, doFill: boolean, doStroke: boolean, fVisible: boolean, sVisible: boolean, rectAttribute: Required<IRectGraphicAttribute>, fillCb?: (ctx: IContext2d, markAttribute: Partial<IMarkAttribute & IGraphicAttribute>, themeAttribute: IThemeAttribute) => boolean, strokeCb?: (ctx: IContext2d, markAttribute: Partial<IMarkAttribute & IGraphicAttribute>, themeAttribute: IThemeAttribute) => boolean): void;
16
+ drawShape(rect: IRect, context: IContext2d, x: number, y: number, doFill: boolean, doStroke: boolean, fVisible: boolean, sVisible: boolean, rectAttribute: Required<IRectGraphicAttribute>, drawContext: IDrawContext, fillCb?: (ctx: IContext2d, markAttribute: Partial<IMarkAttribute & IGraphicAttribute>, themeAttribute: IThemeAttribute) => boolean, strokeCb?: (ctx: IContext2d, markAttribute: Partial<IMarkAttribute & IGraphicAttribute>, themeAttribute: IThemeAttribute) => boolean): void;
17
17
  }
@@ -14,7 +14,7 @@ let SplitRectBeforeRenderContribution = class {
14
14
  constructor() {
15
15
  this.time = BaseRenderContributionTime.beforeFillStroke, this.useStyle = !0, this.order = 0;
16
16
  }
17
- drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, fillCb, strokeCb, doFillOrStroke) {
17
+ drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb, doFillOrStroke) {
18
18
  const {stroke: stroke = rectAttribute.stroke, strokeArrayWidth: strokeArrayWidth = rectAttribute.strokeArrayWidth, strokeArrayColor: strokeArrayColor = rectAttribute.strokeArrayColor} = rect.attribute;
19
19
  stroke && (Array.isArray(stroke) || Array.isArray(strokeArrayWidth) || Array.isArray(strokeArrayColor)) && (doFillOrStroke.doStroke = !1);
20
20
  }
@@ -28,7 +28,7 @@ let SplitRectAfterRenderContribution = class {
28
28
  constructor() {
29
29
  this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
30
30
  }
31
- drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, fillCb, strokeCb) {
31
+ drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb) {
32
32
  const {width: width = rectAttribute.width, height: height = rectAttribute.height, stroke: stroke = rectAttribute.stroke, strokeArrayColor: strokeArrayColor = rectAttribute.strokeArrayColor, strokeArrayWidth: strokeArrayWidth = rectAttribute.strokeArrayWidth, lineWidth: lineWidth = rectAttribute.lineWidth, strokeColor: strokeColor = rectAttribute.stroke} = rect.attribute;
33
33
  stroke && (Array.isArray(strokeArrayWidth) || 0 !== lineWidth) && (Array.isArray(stroke) || Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth)) && (("number" == typeof lineWidth && 1 & lineWidth || Array.isArray(strokeArrayWidth) && strokeArrayWidth.some((width => 1 & width))) && (x = Math.floor(x) + .5,
34
34
  y = Math.floor(y) + .5), renderStroke(rect, context, x, y, rectAttribute, stroke, strokeArrayWidth || lineWidth, strokeArrayColor || strokeColor, Math.ceil(width), Math.ceil(height)));
@@ -1 +1 @@
1
- {"version":3,"sources":["scenegraph/graphic/contributions/rect-contribution-render.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAYvC,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGpD,IAAM,iCAAiC,GAAvC,MAAM,iCAAiC;IAAvC;QACL,SAAI,GAA+B,0BAA0B,CAAC,gBAAgB,CAAC;QAC/E,aAAQ,GAAY,IAAI,CAAC;QACzB,UAAK,GAAW,CAAC,CAAC;IAuCpB,CAAC;IAtCC,SAAS,CACP,IAAW,EACX,OAAmB,EACnB,CAAS,EACT,CAAS,EACT,MAAe,EACf,QAAiB,EACjB,QAAiB,EACjB,QAAiB,EACjB,aAA8C,EAC9C,MAIY,EACZ,QAIY,EACZ,cAAuD;QAQvD,MAAM,EACJ,MAAM,GAAG,aAAa,CAAC,MAAM,EAC7B,gBAAgB,GAAI,aAAqB,CAAC,gBAAgB,EAC1D,gBAAgB,GAAI,aAAqB,CAAC,gBAAgB,EAC3D,GAAG,IAAI,CAAC,SAAgB,CAAC;QAE1B,IAAI,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,EAAE;YAC3G,cAAc,CAAC,QAAQ,GAAG,KAAK,CAAC;SACj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9E;gBACA,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;gBACxB,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;aACzB;YACD,YAAY,CACV,IAAc,EACd,OAAO,EACP,CAAC,EACD,CAAC,EACD,aAAiD,EACjD,MAAM,EACN,gBAAgB,IAAI,SAAS,EAC7B,gBAAgB,IAAI,WAAW,EAC/B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAChB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAClB,CAAC;SACH;IACH,CAAC;CACF,CAAA;AAjHY,gCAAgC;IAD5C,UAAU,EAAE;GACA,gCAAgC,CAiH5C;SAjHY,gCAAgC;AAoH7C,SAAS,SAAS,CAAC,GAAW;IAC5B,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC","file":"rect-contribution-render.js","sourcesContent":["import { injectable } from 'inversify';\nimport type {\n IRect,\n IContext2d,\n IRectGraphicAttribute,\n IMarkAttribute,\n IGraphicAttribute,\n IThemeAttribute,\n IRectRenderContribution,\n IGroup,\n IGroupGraphicAttribute\n} from '@visactor/vrender';\nimport { BaseRenderContributionTime } from '@visactor/vrender';\nimport { renderStroke } from './group-contribution-render';\n\n@injectable()\nexport class SplitRectBeforeRenderContribution implements IRectRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle: boolean = true;\n order: number = 0;\n drawShape(\n rect: IRect,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n rectAttribute: Required<IRectGraphicAttribute>,\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 { stroke = rectAttribute.stroke } = group.attribute as any;\n\n // if (Array.isArray(stroke)) {\n // doFillOrStroke.doStroke = false;\n // }\n\n const {\n stroke = rectAttribute.stroke,\n strokeArrayWidth = (rectAttribute as any).strokeArrayWidth,\n strokeArrayColor = (rectAttribute as any).strokeArrayColor\n } = rect.attribute as any;\n\n if (stroke && (Array.isArray(stroke) || Array.isArray(strokeArrayWidth) || Array.isArray(strokeArrayColor))) {\n doFillOrStroke.doStroke = false;\n }\n }\n}\n\n@injectable()\nexport class SplitRectAfterRenderContribution implements IRectRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle: boolean = true;\n order: number = 0;\n drawShape(\n rect: IRect,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n rectAttribute: Required<IRectGraphicAttribute>,\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 = rectAttribute.width,\n // height = rectAttribute.height,\n // stroke = rectAttribute.stroke\n // } = group.attribute as any;\n\n // if (!Array.isArray(stroke)) {\n // return;\n // }\n\n // context.setStrokeStyle(group, group.attribute, x, y, rectAttribute);\n // // 单独处理每条边界,目前不考虑圆角\n // context.beginPath();\n // context.moveTo(x, y);\n // // top\n // if (stroke[0]) {\n // context.lineTo(x + width, y);\n // } else {\n // context.moveTo(x + width, y);\n // }\n // // right\n // if (stroke[1]) {\n // context.lineTo(x + width, y + height);\n // } else {\n // context.moveTo(x + width, y + height);\n // }\n // // bottom\n // if (stroke[2]) {\n // context.lineTo(x, y + height);\n // } else {\n // context.moveTo(x, y + height);\n // }\n // // left\n // if (stroke[3]) {\n // // 没有close path是,起点和终点不连续,需要调整y保证不出现缺口\n // const adjustY = stroke[0] ? y - context.lineWidth / 2 : y;\n // context.lineTo(x, adjustY);\n // } else {\n // context.moveTo(x, y);\n // }\n\n // context.stroke();\n\n const {\n width = rectAttribute.width,\n height = rectAttribute.height,\n // 基础border\n stroke = rectAttribute.stroke,\n strokeArrayColor = (rectAttribute as any).strokeArrayColor,\n strokeArrayWidth = (rectAttribute as any).strokeArrayWidth,\n\n lineWidth = rectAttribute.lineWidth,\n strokeColor = rectAttribute.stroke\n // // select & hover border\n // highlightStroke = (rectAttribute as any).highlightStroke,\n // highlightStrokeArrayColor = (rectAttribute as any).highlightStrokeArrayColor,\n // highlightStrokeArrayWidth = (rectAttribute as any).highlightStrokeArrayWidth,\n // highlightStrokeArrayPart = (rectAttribute as any).highlightStrokeArrayPart,\n } = rect.attribute as any;\n\n if (!stroke || (!Array.isArray(strokeArrayWidth) && lineWidth === 0)) {\n return;\n }\n\n if (Array.isArray(stroke) || Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth)) {\n // let dx = 0;\n // let dy = 0;\n if (\n (typeof lineWidth === 'number' && lineWidth & 1) ||\n (Array.isArray(strokeArrayWidth) && strokeArrayWidth.some(width => width & 1))\n ) {\n x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\n }\n renderStroke(\n rect as IGroup,\n context,\n x,\n y,\n rectAttribute as Required<IGroupGraphicAttribute>,\n stroke,\n strokeArrayWidth || lineWidth,\n strokeArrayColor || strokeColor,\n Math.ceil(width),\n Math.ceil(height)\n );\n }\n }\n}\n\n// 判断是否为整数,如果是整数,需要偏移0.5px\nfunction isInteger(num: number) {\n return num % 1 === 0;\n}\n"]}
1
+ {"version":3,"sources":["scenegraph/graphic/contributions/rect-contribution-render.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAavC,OAAO,EAAE,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CAAC;CACF,CAAA;AAlHY,gCAAgC;IAD5C,UAAU,EAAE;GACA,gCAAgC,CAkH5C;SAlHY,gCAAgC;AAqH7C,SAAS,SAAS,CAAC,GAAW;IAC5B,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC","file":"rect-contribution-render.js","sourcesContent":["import { injectable } from 'inversify';\nimport type {\n IRect,\n IContext2d,\n IRectGraphicAttribute,\n IMarkAttribute,\n IGraphicAttribute,\n IThemeAttribute,\n IRectRenderContribution,\n IGroup,\n IGroupGraphicAttribute,\n IDrawContext\n} from '@visactor/vrender';\nimport { BaseRenderContributionTime } from '@visactor/vrender';\nimport { renderStroke } from './group-contribution-render';\n\n@injectable()\nexport class SplitRectBeforeRenderContribution implements IRectRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle: boolean = true;\n order: number = 0;\n drawShape(\n rect: IRect,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n rectAttribute: Required<IRectGraphicAttribute>,\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 { stroke = rectAttribute.stroke } = group.attribute as any;\n\n // if (Array.isArray(stroke)) {\n // doFillOrStroke.doStroke = false;\n // }\n\n const {\n stroke = rectAttribute.stroke,\n strokeArrayWidth = (rectAttribute as any).strokeArrayWidth,\n strokeArrayColor = (rectAttribute as any).strokeArrayColor\n } = rect.attribute as any;\n\n if (stroke && (Array.isArray(stroke) || Array.isArray(strokeArrayWidth) || Array.isArray(strokeArrayColor))) {\n doFillOrStroke.doStroke = false;\n }\n }\n}\n\n@injectable()\nexport class SplitRectAfterRenderContribution implements IRectRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle: boolean = true;\n order: number = 0;\n drawShape(\n rect: IRect,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n rectAttribute: Required<IRectGraphicAttribute>,\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 = rectAttribute.width,\n // height = rectAttribute.height,\n // stroke = rectAttribute.stroke\n // } = group.attribute as any;\n\n // if (!Array.isArray(stroke)) {\n // return;\n // }\n\n // context.setStrokeStyle(group, group.attribute, x, y, rectAttribute);\n // // 单独处理每条边界,目前不考虑圆角\n // context.beginPath();\n // context.moveTo(x, y);\n // // top\n // if (stroke[0]) {\n // context.lineTo(x + width, y);\n // } else {\n // context.moveTo(x + width, y);\n // }\n // // right\n // if (stroke[1]) {\n // context.lineTo(x + width, y + height);\n // } else {\n // context.moveTo(x + width, y + height);\n // }\n // // bottom\n // if (stroke[2]) {\n // context.lineTo(x, y + height);\n // } else {\n // context.moveTo(x, y + height);\n // }\n // // left\n // if (stroke[3]) {\n // // 没有close path是,起点和终点不连续,需要调整y保证不出现缺口\n // const adjustY = stroke[0] ? y - context.lineWidth / 2 : y;\n // context.lineTo(x, adjustY);\n // } else {\n // context.moveTo(x, y);\n // }\n\n // context.stroke();\n\n const {\n width = rectAttribute.width,\n height = rectAttribute.height,\n // 基础border\n stroke = rectAttribute.stroke,\n strokeArrayColor = (rectAttribute as any).strokeArrayColor,\n strokeArrayWidth = (rectAttribute as any).strokeArrayWidth,\n\n lineWidth = rectAttribute.lineWidth,\n strokeColor = rectAttribute.stroke\n // // select & hover border\n // highlightStroke = (rectAttribute as any).highlightStroke,\n // highlightStrokeArrayColor = (rectAttribute as any).highlightStrokeArrayColor,\n // highlightStrokeArrayWidth = (rectAttribute as any).highlightStrokeArrayWidth,\n // highlightStrokeArrayPart = (rectAttribute as any).highlightStrokeArrayPart,\n } = rect.attribute as any;\n\n if (!stroke || (!Array.isArray(strokeArrayWidth) && lineWidth === 0)) {\n return;\n }\n\n if (Array.isArray(stroke) || Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth)) {\n // let dx = 0;\n // let dy = 0;\n if (\n (typeof lineWidth === 'number' && lineWidth & 1) ||\n (Array.isArray(strokeArrayWidth) && strokeArrayWidth.some(width => width & 1))\n ) {\n x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\n }\n renderStroke(\n rect as IGroup,\n context,\n x,\n y,\n rectAttribute as Required<IGroupGraphicAttribute>,\n stroke,\n strokeArrayWidth || lineWidth,\n strokeArrayColor || strokeColor,\n Math.ceil(width),\n Math.ceil(height)\n );\n }\n }\n}\n\n// 判断是否为整数,如果是整数,需要偏移0.5px\nfunction isInteger(num: number) {\n return num % 1 === 0;\n}\n"]}
@@ -0,0 +1,15 @@
1
+ import type { ITextGraphicAttribute } from '@visactor/vrender';
2
+ import { Text } from '@visactor/vrender';
3
+ export interface IWrapTextGraphicAttribute extends ITextGraphicAttribute {
4
+ heightLimit?: number;
5
+ lineClamp?: number;
6
+ autoWrapText?: boolean;
7
+ }
8
+ export declare class WrapText extends Text {
9
+ attribute: IWrapTextGraphicAttribute;
10
+ constructor(params: IWrapTextGraphicAttribute);
11
+ updateSingallineAABBBounds(text: number | string): import("@visactor/vutils").AABBBounds;
12
+ updateMultilineAABBBounds(text: (number | string)[]): import("@visactor/vutils").AABBBounds;
13
+ needUpdateTags(keys: string[]): boolean;
14
+ needUpdateTag(key: string): boolean;
15
+ }
@@ -24,7 +24,10 @@ import { isPromise } from "../../tools/helper";
24
24
 
25
25
  import { dealPromiseData } from "../utils/deal-promise-data";
26
26
 
27
+ import { CartesianAxis } from "../../components/axis/axis";
28
+
27
29
  export function createCell(type, define, table, col, row, colWidth, bgColorFunc, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, isMerge, range, cellTheme) {
30
+ var _a, _b;
28
31
  let cellGroup;
29
32
  if ("text" === type || "link" === type) {
30
33
  if ("link" === type) {
@@ -51,14 +54,19 @@ export function createCell(type, define, table, col, row, colWidth, bgColorFunc,
51
54
  if ("body" !== table.getCellType(col, row) ? (customRender = null == define ? void 0 : define.headerCustomRender,
52
55
  customLayout = null == define ? void 0 : define.headerCustomLayout) : (customRender = (null == define ? void 0 : define.customRender) || table.customRender,
53
56
  customLayout = null == define ? void 0 : define.customLayout), customLayout || customRender) {
54
- const {autoRowHeight: autoRowHeight} = table.internalProps, customResult = dealWithCustom(customLayout, customRender, col, row, table.getColWidth(col), table.getRowHeight(row), !1, autoRowHeight, table);
57
+ const customResult = dealWithCustom(customLayout, customRender, col, row, table.getColWidth(col), table.getRowHeight(row), !1, "autoHeight" === table.heightMode, table);
55
58
  customElementsGroup = customResult.elementsGroup, renderDefault = customResult.renderDefault;
56
59
  }
57
60
  cellGroup = createCellGroup(table, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, customElementsGroup, renderDefault, cellTheme),
58
61
  isMerge && (cellGroup.mergeCol = range.end.col, cellGroup.mergeRow = range.end.row);
62
+ const axisConfig = table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);
63
+ if (axisConfig) {
64
+ const axis = new CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, table);
65
+ cellGroup.clear(), cellGroup.appendChild(axis.component), axis.overlap();
66
+ } else table.internalProps.layoutMap.isEmpty(col, row) && cellGroup.clear();
59
67
  } else if ("image" === type) cellGroup = createImageCellGroup(columnGroup, 0, y, col, row, table.getColWidth(col), table.getRowHeight(row), define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, table, cellTheme); else if ("video" === type) cellGroup = createVideoCellGroup(columnGroup, 0, y, col, row, table.getColWidth(col), table.getRowHeight(row), define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, table, cellTheme); else if ("chart" === type) {
60
68
  const chartInstance = table.internalProps.layoutMap.getChartInstance(col, row);
61
- cellGroup = createChartCellGroup(null, columnGroup, 0, y, col, row, table.getColWidth(col), table.getRowHeight(row), padding, table.getCellValue(col, row), define.chartType, define.chartSpec, chartInstance, table, cellTheme);
69
+ cellGroup = createChartCellGroup(null, columnGroup, 0, y, col, row, table.getColWidth(col), table.getRowHeight(row), padding, table.getCellValue(col, row), define.chartModule, table.isPivotChart() ? table.internalProps.layoutMap.getChartSpec(col, row) : define.chartSpec, chartInstance, null !== (_b = null === (_a = table.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.getChartDataId(col, row)) && void 0 !== _b ? _b : "data", table, cellTheme);
62
70
  } else if ("progressbar" === type) {
63
71
  const style = table._getCellStyle(col, row), value = table.getCellValue(col, row), dataValue = table.getCellOriginValue(col, row);
64
72
  cellGroup = createCellGroup(table, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, null, !0, cellTheme);