@visactor/vtable 0.9.0-alpha.1 → 0.9.1-alpha.3

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 (342) hide show
  1. package/cjs/ListTable.d.ts +2 -2
  2. package/cjs/ListTable.js.map +1 -1
  3. package/cjs/PivotTable.d.ts +4 -4
  4. package/cjs/PivotTable.js.map +1 -1
  5. package/cjs/core/BaseTable.js +16 -10
  6. package/cjs/core/BaseTable.js.map +1 -1
  7. package/cjs/core/tableHelper.d.ts +11 -0
  8. package/cjs/core/tableHelper.js +47 -3
  9. package/cjs/core/tableHelper.js.map +1 -1
  10. package/cjs/core.d.ts +1 -1
  11. package/cjs/core.js +1 -10
  12. package/cjs/core.js.map +1 -1
  13. package/cjs/data/DataSource.d.ts +2 -2
  14. package/cjs/data/DataSource.js.map +1 -1
  15. package/cjs/dataset/dataset.js.map +1 -1
  16. package/cjs/event/event.js +21 -21
  17. package/cjs/event/event.js.map +1 -1
  18. package/cjs/event/sparkline-event.d.ts +2 -0
  19. package/cjs/event/{chart.js → sparkline-event.js} +10 -8
  20. package/cjs/event/sparkline-event.js.map +1 -0
  21. package/cjs/header-helper/header-helper.d.ts +2 -2
  22. package/cjs/header-helper/header-helper.js.map +1 -1
  23. package/cjs/index.d.ts +1 -1
  24. package/cjs/index.js +1 -1
  25. package/cjs/index.js.map +1 -1
  26. package/cjs/layout/simple-header-layout.js +3 -1
  27. package/cjs/layout/simple-header-layout.js.map +1 -1
  28. package/cjs/render/layout/arc.d.ts +4 -4
  29. package/cjs/render/layout/arc.js +2 -2
  30. package/cjs/render/layout/arc.js.map +1 -1
  31. package/cjs/render/layout/circle.d.ts +4 -4
  32. package/cjs/render/layout/circle.js +1 -1
  33. package/cjs/render/layout/circle.js.map +1 -1
  34. package/cjs/render/layout/container.js +2 -2
  35. package/cjs/render/layout/container.js.map +1 -1
  36. package/cjs/render/layout/element.d.ts +4 -8
  37. package/cjs/render/layout/element.js.map +1 -1
  38. package/cjs/render/layout/rect.d.ts +4 -4
  39. package/cjs/render/layout/rect.js +1 -1
  40. package/cjs/render/layout/rect.js.map +1 -1
  41. package/cjs/render/layout/text.d.ts +2 -3
  42. package/cjs/render/layout/text.js +1 -1
  43. package/cjs/render/layout/text.js.map +1 -1
  44. package/cjs/scenegraph/component/cell-content.js +9 -3
  45. package/cjs/scenegraph/component/cell-content.js.map +1 -1
  46. package/cjs/scenegraph/component/cell-mover.js +3 -5
  47. package/cjs/scenegraph/component/cell-mover.js.map +1 -1
  48. package/cjs/scenegraph/component/custom.js +9 -16
  49. package/cjs/scenegraph/component/custom.js.map +1 -1
  50. package/cjs/scenegraph/component/menu.js +6 -10
  51. package/cjs/scenegraph/component/menu.js.map +1 -1
  52. package/cjs/scenegraph/component/table-component.js +15 -21
  53. package/cjs/scenegraph/component/table-component.js.map +1 -1
  54. package/cjs/scenegraph/debug-tool/debug-tool.d.ts +1 -3
  55. package/cjs/scenegraph/debug-tool/debug-tool.js +6 -22
  56. package/cjs/scenegraph/debug-tool/debug-tool.js.map +1 -1
  57. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +16 -12
  58. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  59. package/cjs/scenegraph/graphic/contributions/index.js +4 -4
  60. package/cjs/scenegraph/graphic/contributions/index.js.map +1 -1
  61. package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js +1 -1
  62. package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
  63. package/cjs/scenegraph/group-creater/cell-helper.js +6 -6
  64. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  65. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +2 -4
  66. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  67. package/cjs/scenegraph/group-creater/cell-type/image-cell.js +2 -4
  68. package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  69. package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js +10 -13
  70. package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
  71. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +32 -24
  72. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
  73. package/cjs/scenegraph/group-creater/cell-type/text-cell.js +5 -7
  74. package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  75. package/cjs/scenegraph/group-creater/cell-type/video-cell.js +2 -4
  76. package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  77. package/cjs/scenegraph/group-creater/column-helper.d.ts +1 -10
  78. package/cjs/scenegraph/group-creater/column-helper.js +9 -51
  79. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  80. package/cjs/scenegraph/group-creater/progress/proxy.d.ts +1 -1
  81. package/cjs/scenegraph/group-creater/progress/proxy.js +8 -8
  82. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  83. package/cjs/scenegraph/layout/update-width.js +34 -16
  84. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  85. package/cjs/scenegraph/scenegraph.d.ts +5 -3
  86. package/cjs/scenegraph/scenegraph.js +41 -181
  87. package/cjs/scenegraph/scenegraph.js.map +1 -1
  88. package/cjs/scenegraph/select/create-select-border.d.ts +3 -0
  89. package/cjs/scenegraph/select/create-select-border.js +38 -0
  90. package/cjs/scenegraph/select/create-select-border.js.map +1 -0
  91. package/cjs/scenegraph/select/delete-select-border.d.ts +3 -0
  92. package/cjs/scenegraph/select/delete-select-border.js +19 -0
  93. package/cjs/scenegraph/select/delete-select-border.js.map +1 -0
  94. package/cjs/scenegraph/select/move-select-border.d.ts +2 -0
  95. package/cjs/scenegraph/select/move-select-border.js +13 -0
  96. package/cjs/scenegraph/select/move-select-border.js.map +1 -0
  97. package/cjs/scenegraph/select/update-select-border.d.ts +3 -0
  98. package/cjs/scenegraph/select/update-select-border.js +115 -0
  99. package/cjs/scenegraph/select/update-select-border.js.map +1 -0
  100. package/cjs/scenegraph/stick-text/index.d.ts +2 -0
  101. package/cjs/scenegraph/stick-text/index.js +72 -0
  102. package/cjs/scenegraph/stick-text/index.js.map +1 -0
  103. package/cjs/scenegraph/style/frame-border.d.ts +2 -0
  104. package/cjs/scenegraph/style/frame-border.js +46 -18
  105. package/cjs/scenegraph/style/frame-border.js.map +1 -1
  106. package/cjs/scenegraph/utils/get-cell-merge.js +1 -0
  107. package/cjs/scenegraph/utils/get-cell-merge.js.map +1 -1
  108. package/cjs/scenegraph/utils/text-icon-layout.js +4 -5
  109. package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
  110. package/cjs/state/common/check-in-select.d.ts +1 -2
  111. package/cjs/state/common/check-in-select.js.map +1 -1
  112. package/cjs/state/hover/col.d.ts +1 -2
  113. package/cjs/state/hover/col.js.map +1 -1
  114. package/cjs/state/hover/is-cell-hover.js +5 -5
  115. package/cjs/state/hover/is-cell-hover.js.map +1 -1
  116. package/cjs/state/hover/row.d.ts +1 -2
  117. package/cjs/state/hover/row.js.map +1 -1
  118. package/cjs/state/hover/single.d.ts +1 -2
  119. package/cjs/state/hover/single.js.map +1 -1
  120. package/cjs/state/hover/update-position.js +10 -10
  121. package/cjs/state/hover/update-position.js.map +1 -1
  122. package/cjs/state/select/update-position.js +4 -4
  123. package/cjs/state/select/update-position.js.map +1 -1
  124. package/cjs/state/sort/index.js +2 -2
  125. package/cjs/state/sort/index.js.map +1 -1
  126. package/cjs/state/spark-line/index.js +2 -4
  127. package/cjs/state/spark-line/index.js.map +1 -1
  128. package/cjs/state/state.d.ts +3 -19
  129. package/cjs/state/state.js +12 -24
  130. package/cjs/state/state.js.map +1 -1
  131. package/cjs/tools/global.d.ts +2 -0
  132. package/cjs/tools/global.js +5 -2
  133. package/cjs/tools/global.js.map +1 -1
  134. package/cjs/tools/pixel-ratio.d.ts +1 -0
  135. package/cjs/tools/pixel-ratio.js +15 -0
  136. package/cjs/tools/pixel-ratio.js.map +1 -0
  137. package/cjs/tools/sort.d.ts +2 -1
  138. package/cjs/tools/sort.js.map +1 -1
  139. package/cjs/tools/util.d.ts +2 -1
  140. package/cjs/tools/util.js.map +1 -1
  141. package/cjs/ts-types/common.d.ts +14 -1
  142. package/cjs/ts-types/common.js +9 -1
  143. package/cjs/ts-types/common.js.map +1 -1
  144. package/cjs/ts-types/customElement.d.ts +9 -9
  145. package/cjs/ts-types/customElement.js.map +1 -1
  146. package/cjs/ts-types/events.d.ts +3 -3
  147. package/cjs/ts-types/events.js.map +1 -1
  148. package/cjs/ts-types/index.d.ts +1 -1
  149. package/cjs/ts-types/index.js +1 -1
  150. package/cjs/ts-types/index.js.map +1 -1
  151. package/cjs/ts-types/list-table/define/index.d.ts +3 -3
  152. package/cjs/ts-types/list-table/define/index.js.map +1 -1
  153. package/cjs/ts-types/list-table/define/sparkline-define.d.ts +1 -1
  154. package/cjs/ts-types/list-table/define/sparkline-define.js.map +1 -1
  155. package/cjs/ts-types/new-data-set.d.ts +2 -1
  156. package/cjs/ts-types/new-data-set.js.map +1 -1
  157. package/cjs/ts-types/pivot-table/dimension/multilinetext-dimension.d.ts +1 -1
  158. package/cjs/ts-types/pivot-table/dimension/multilinetext-dimension.js.map +1 -1
  159. package/cjs/ts-types/pivot-table/indicator/sparkline-indicator.d.ts +1 -1
  160. package/cjs/ts-types/pivot-table/indicator/sparkline-indicator.js.map +1 -1
  161. package/cjs/ts-types/sparkline.d.ts +39 -0
  162. package/cjs/ts-types/{chartType.js → sparkline.js} +1 -1
  163. package/cjs/ts-types/sparkline.js.map +1 -0
  164. package/cjs/ts-types/table-engine.d.ts +6 -6
  165. package/cjs/ts-types/table-engine.js.map +1 -1
  166. package/dist/vtable.js +24033 -24161
  167. package/dist/vtable.min.js +2 -2
  168. package/es/ListTable.d.ts +2 -2
  169. package/es/ListTable.js.map +1 -1
  170. package/es/PivotTable.d.ts +4 -4
  171. package/es/PivotTable.js.map +1 -1
  172. package/es/core/BaseTable.js +17 -11
  173. package/es/core/BaseTable.js.map +1 -1
  174. package/es/core/tableHelper.d.ts +11 -0
  175. package/es/core/tableHelper.js +48 -0
  176. package/es/core/tableHelper.js.map +1 -1
  177. package/es/core.d.ts +1 -1
  178. package/es/core.js +1 -3
  179. package/es/core.js.map +1 -1
  180. package/es/data/DataSource.d.ts +2 -2
  181. package/es/data/DataSource.js.map +1 -1
  182. package/es/dataset/dataset.js.map +1 -1
  183. package/es/event/event.js +4 -4
  184. package/es/event/event.js.map +1 -1
  185. package/es/event/sparkline-event.d.ts +2 -0
  186. package/es/event/{chart.js → sparkline-event.js} +8 -6
  187. package/es/event/sparkline-event.js.map +1 -0
  188. package/es/header-helper/header-helper.d.ts +2 -2
  189. package/es/header-helper/header-helper.js.map +1 -1
  190. package/es/index.d.ts +1 -1
  191. package/es/index.js +1 -1
  192. package/es/index.js.map +1 -1
  193. package/es/layout/simple-header-layout.js +3 -1
  194. package/es/layout/simple-header-layout.js.map +1 -1
  195. package/es/render/layout/arc.d.ts +4 -4
  196. package/es/render/layout/arc.js +2 -2
  197. package/es/render/layout/arc.js.map +1 -1
  198. package/es/render/layout/circle.d.ts +4 -4
  199. package/es/render/layout/circle.js +1 -1
  200. package/es/render/layout/circle.js.map +1 -1
  201. package/es/render/layout/container.js +2 -2
  202. package/es/render/layout/container.js.map +1 -1
  203. package/es/render/layout/element.d.ts +4 -8
  204. package/es/render/layout/element.js.map +1 -1
  205. package/es/render/layout/rect.d.ts +4 -4
  206. package/es/render/layout/rect.js +1 -1
  207. package/es/render/layout/rect.js.map +1 -1
  208. package/es/render/layout/text.d.ts +2 -3
  209. package/es/render/layout/text.js +1 -1
  210. package/es/render/layout/text.js.map +1 -1
  211. package/es/scenegraph/component/cell-content.js +9 -3
  212. package/es/scenegraph/component/cell-content.js.map +1 -1
  213. package/es/scenegraph/component/cell-mover.js +3 -5
  214. package/es/scenegraph/component/cell-mover.js.map +1 -1
  215. package/es/scenegraph/component/custom.js +9 -16
  216. package/es/scenegraph/component/custom.js.map +1 -1
  217. package/es/scenegraph/component/menu.js +6 -10
  218. package/es/scenegraph/component/menu.js.map +1 -1
  219. package/es/scenegraph/component/table-component.js +15 -21
  220. package/es/scenegraph/component/table-component.js.map +1 -1
  221. package/es/scenegraph/debug-tool/debug-tool.d.ts +1 -3
  222. package/es/scenegraph/debug-tool/debug-tool.js +7 -23
  223. package/es/scenegraph/debug-tool/debug-tool.js.map +1 -1
  224. package/es/scenegraph/graphic/contributions/group-contribution-render.js +17 -11
  225. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  226. package/es/scenegraph/graphic/contributions/index.js +6 -4
  227. package/es/scenegraph/graphic/contributions/index.js.map +1 -1
  228. package/es/scenegraph/graphic/contributions/rect-contribution-render.js +1 -1
  229. package/es/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
  230. package/es/scenegraph/group-creater/cell-helper.js +5 -5
  231. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  232. package/es/scenegraph/group-creater/cell-type/chart-cell.js +2 -4
  233. package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  234. package/es/scenegraph/group-creater/cell-type/image-cell.js +2 -4
  235. package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  236. package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js +10 -13
  237. package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
  238. package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +32 -24
  239. package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
  240. package/es/scenegraph/group-creater/cell-type/text-cell.js +4 -6
  241. package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  242. package/es/scenegraph/group-creater/cell-type/video-cell.js +2 -4
  243. package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  244. package/es/scenegraph/group-creater/column-helper.d.ts +1 -10
  245. package/es/scenegraph/group-creater/column-helper.js +5 -50
  246. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  247. package/es/scenegraph/group-creater/progress/proxy.d.ts +1 -1
  248. package/es/scenegraph/group-creater/progress/proxy.js +9 -7
  249. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  250. package/es/scenegraph/layout/update-width.js +34 -16
  251. package/es/scenegraph/layout/update-width.js.map +1 -1
  252. package/es/scenegraph/scenegraph.d.ts +5 -3
  253. package/es/scenegraph/scenegraph.js +46 -178
  254. package/es/scenegraph/scenegraph.js.map +1 -1
  255. package/es/scenegraph/select/create-select-border.d.ts +3 -0
  256. package/es/scenegraph/select/create-select-border.js +29 -0
  257. package/es/scenegraph/select/create-select-border.js.map +1 -0
  258. package/es/scenegraph/select/delete-select-border.d.ts +3 -0
  259. package/es/scenegraph/select/delete-select-border.js +12 -0
  260. package/es/scenegraph/select/delete-select-border.js.map +1 -0
  261. package/es/scenegraph/select/move-select-border.d.ts +2 -0
  262. package/es/scenegraph/select/move-select-border.js +7 -0
  263. package/es/scenegraph/select/move-select-border.js.map +1 -0
  264. package/es/scenegraph/select/update-select-border.d.ts +3 -0
  265. package/es/scenegraph/select/update-select-border.js +107 -0
  266. package/es/scenegraph/select/update-select-border.js.map +1 -0
  267. package/es/scenegraph/stick-text/index.d.ts +2 -0
  268. package/es/scenegraph/stick-text/index.js +64 -0
  269. package/es/scenegraph/stick-text/index.js.map +1 -0
  270. package/es/scenegraph/style/frame-border.d.ts +2 -0
  271. package/es/scenegraph/style/frame-border.js +44 -14
  272. package/es/scenegraph/style/frame-border.js.map +1 -1
  273. package/es/scenegraph/utils/get-cell-merge.js +1 -0
  274. package/es/scenegraph/utils/get-cell-merge.js.map +1 -1
  275. package/es/scenegraph/utils/text-icon-layout.js +4 -5
  276. package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
  277. package/es/state/common/check-in-select.d.ts +1 -2
  278. package/es/state/common/check-in-select.js.map +1 -1
  279. package/es/state/hover/col.d.ts +1 -2
  280. package/es/state/hover/col.js.map +1 -1
  281. package/es/state/hover/is-cell-hover.js +2 -2
  282. package/es/state/hover/is-cell-hover.js.map +1 -1
  283. package/es/state/hover/row.d.ts +1 -2
  284. package/es/state/hover/row.js.map +1 -1
  285. package/es/state/hover/single.d.ts +1 -2
  286. package/es/state/hover/single.js.map +1 -1
  287. package/es/state/hover/update-position.js +1 -1
  288. package/es/state/hover/update-position.js.map +1 -1
  289. package/es/state/select/update-position.js +1 -1
  290. package/es/state/select/update-position.js.map +1 -1
  291. package/es/state/sort/index.js +2 -2
  292. package/es/state/sort/index.js.map +1 -1
  293. package/es/state/spark-line/index.js +2 -4
  294. package/es/state/spark-line/index.js.map +1 -1
  295. package/es/state/state.d.ts +3 -19
  296. package/es/state/state.js +5 -22
  297. package/es/state/state.js.map +1 -1
  298. package/es/tools/global.d.ts +2 -0
  299. package/es/tools/global.js +4 -0
  300. package/es/tools/global.js.map +1 -1
  301. package/es/tools/pixel-ratio.d.ts +1 -0
  302. package/es/tools/pixel-ratio.js +11 -0
  303. package/es/tools/pixel-ratio.js.map +1 -0
  304. package/es/tools/sort.d.ts +2 -1
  305. package/es/tools/sort.js.map +1 -1
  306. package/es/tools/util.d.ts +2 -1
  307. package/es/tools/util.js.map +1 -1
  308. package/es/ts-types/common.d.ts +14 -1
  309. package/es/ts-types/common.js +12 -1
  310. package/es/ts-types/common.js.map +1 -1
  311. package/es/ts-types/customElement.d.ts +9 -9
  312. package/es/ts-types/customElement.js.map +1 -1
  313. package/es/ts-types/events.d.ts +3 -3
  314. package/es/ts-types/events.js.map +1 -1
  315. package/es/ts-types/index.d.ts +1 -1
  316. package/es/ts-types/index.js +1 -1
  317. package/es/ts-types/index.js.map +1 -1
  318. package/es/ts-types/list-table/define/index.d.ts +3 -3
  319. package/es/ts-types/list-table/define/index.js.map +1 -1
  320. package/es/ts-types/list-table/define/sparkline-define.d.ts +1 -1
  321. package/es/ts-types/list-table/define/sparkline-define.js.map +1 -1
  322. package/es/ts-types/new-data-set.d.ts +2 -1
  323. package/es/ts-types/new-data-set.js.map +1 -1
  324. package/es/ts-types/pivot-table/dimension/multilinetext-dimension.d.ts +1 -1
  325. package/es/ts-types/pivot-table/dimension/multilinetext-dimension.js.map +1 -1
  326. package/es/ts-types/pivot-table/indicator/sparkline-indicator.d.ts +1 -1
  327. package/es/ts-types/pivot-table/indicator/sparkline-indicator.js.map +1 -1
  328. package/es/ts-types/sparkline.d.ts +39 -0
  329. package/es/ts-types/sparkline.js +2 -0
  330. package/es/ts-types/sparkline.js.map +1 -0
  331. package/es/ts-types/table-engine.d.ts +6 -6
  332. package/es/ts-types/table-engine.js.map +1 -1
  333. package/package.json +18 -6
  334. package/cjs/event/chart.d.ts +0 -2
  335. package/cjs/event/chart.js.map +0 -1
  336. package/cjs/ts-types/chartType.d.ts +0 -53
  337. package/cjs/ts-types/chartType.js.map +0 -1
  338. package/es/event/chart.d.ts +0 -2
  339. package/es/event/chart.js.map +0 -1
  340. package/es/ts-types/chartType.d.ts +0 -53
  341. package/es/ts-types/chartType.js +0 -2
  342. package/es/ts-types/chartType.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["scenegraph/component/table-component.ts"],"names":[],"mappings":";;;AACA,+CAAkG;AAClG,qEAAyD;AAGzD,iCAAqC;AACrC,6CAAyC;AACzC,6CAAyC;AACzC,iCAAiC;AAOjC,MAAa,cAAc;IAezB,YAAY,KAAmB;;QAC7B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;QAG/B,IAAI,CAAC,eAAe,EAAE,CAAC;QAoBvB,MAAM,kBAAkB,GAAG,MAAA,KAAK,CAAC,YAAY,0CAAE,SAAS,CAAC;QACzD,MAAM,kBAAkB,GAAG,MAAA,KAAK,CAAC,YAAY,0CAAE,SAAS,CAAC;QACzD,MAAM,oBAAoB,GAAG,MAAA,KAAK,CAAC,YAAY,0CAAE,OAAO,CAAC;QACzD,MAAM,oBAAoB,GAAG,MAAA,KAAK,CAAC,YAAY,0CAAE,K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QAC7E,IAAI,CAAC,UAAkB,CAAC,aAAa,GAAG;YACvC,CAAC,EAAE,MAAM,CAAC,EAAE;YACZ,CAAC,EAAE,MAAM,CAAC,EAAE;SACb,CAAC;IACJ,CAAC;CACF;AA9dD,wCA8dC","file":"table-component.js","sourcesContent":["import type { ILine, IRect, IGroup } from '@visactor/vrender';\nimport { createRect, createLine, createText, createGroup, createSymbol } from '@visactor/vrender';\nimport { ScrollBar } from '@visactor/vrender-components';\nimport type { Group } from '../graphic/group';\nimport type { WrapText } from '../graphic/text';\nimport { MenuHandler } from './menu';\nimport { DrillIcon } from './drill-icon';\nimport { CellMover } from './cell-mover';\nimport { getColX } from './util';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\n\n/**\n * @description: 表格内容外组件\n * @return {*}\n */\nexport class TableComponent {\n table: BaseTableAPI;\n\n border: IRect; // 表格外边框\n // selectBorder: IRect; // 表格选择区域边框\n columnResizerLine: ILine; // 表格列宽调整基准线\n columnResizerBgLine: ILine; // 表格列宽调整基准线背景\n columnResizerLabel: IGroup; // 表格列宽调整标记\n menu: MenuHandler; // 表格菜单\n vScrollBar: ScrollBar; // 表格横向滚动条\n hScrollBar: ScrollBar; // 表格纵向滚动条\n frozenShadowLine: IRect; // 表格冻结列右侧阴影块\n drillIcon: DrillIcon; // drill icon\n cellMover: CellMover; // 表格列顺序调整标记\n\n constructor(table: BaseTableAPI) {\n this.table = table;\n const theme = this.table.theme;\n\n // 滚动条\n this.createScrollBar();\n\n // // 框选外边框\n // const bodyClickBorderColor = theme.bodyStyle?.click?.cellBorderColor;\n // const bodyClickLineWidth = theme.bodyStyle?.click?.cellBorderLineWidth;\n\n // this.selectBorder = createRect({\n // visible: false,\n // pickable: false,\n // fill: false,\n // stroke: true,\n // strokeColor: bodyClickBorderColor as string,\n // lineWidth: bodyClickLineWidth as number,\n // x: 0,\n // y: 0,\n // width: 0,\n // height: 0,\n // });\n\n // 列宽调整基准线\n const columnResizerColor = theme.columnResize?.lineColor;\n const columnResizerWidth = theme.columnResize?.lineWidth;\n const columnResizerBgColor = theme.columnResize?.bgColor;\n const columnResizerBgWidth = theme.columnResize?.width;\n this.columnResizerLine = createLine({\n visible: false,\n pickable: false,\n stroke: true,\n strokeColor: columnResizerColor as string,\n lineWidth: columnResizerWidth as number,\n x: 0,\n y: 0,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: 0 }\n ]\n });\n this.columnResizerBgLine = createLine({\n visible: false,\n pickable: false,\n stroke: true,\n strokeColor: columnResizerBgColor as string,\n lineWidth: columnResizerBgWidth as number,\n x: 0,\n y: 0,\n // dx: -(columnResizerBgWidth - columnResizerWidth) / 2,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: 0 }\n ]\n });\n\n // 列宽调整文字标签\n const columnResizerLabelText = createText({\n visible: false,\n pickable: false,\n x: 0,\n y: 0,\n fontSize: 10,\n fillColor: '#FFF',\n text: '',\n textBaseline: 'top',\n dx: 12 + 4,\n dy: -8 + 2\n });\n const columnResizerLabelBack = createRect({\n visible: false,\n pickable: false,\n fill: true,\n fillColor: '#3073F2',\n x: 0,\n y: 0,\n width: 38,\n height: 16,\n borderRadius: 5,\n dx: 12,\n dy: -8\n });\n this.columnResizerLabel = createGroup({\n visible: false,\n pickable: false,\n x: 0,\n y: 0\n });\n this.columnResizerLabel.appendChild(columnResizerLabelBack);\n this.columnResizerLabel.appendChild(columnResizerLabelText);\n\n // 列顺序调整基准线\n this.cellMover = new CellMover(this.table);\n\n // 冻结列阴影\n const shadowWidth = theme.frozenColumnLine?.shadow?.width;\n const shadowStartColor = theme.frozenColumnLine?.shadow?.startColor;\n const shadowEndColor = theme.frozenColumnLine?.shadow?.endColor;\n this.frozenShadowLine = createRect({\n visible: true,\n pickable: false,\n x: 0,\n y: 0,\n width: shadowWidth,\n height: 0,\n fillColor: {\n gradient: 'linear',\n x0: 0,\n y0: 0,\n x1: 1,\n y1: 0,\n stops: [\n { color: shadowStartColor, offset: 0 },\n { color: shadowEndColor, offset: 1 }\n ]\n }\n });\n\n // TO BE DONE 冻结列border(theme.frozenColumnLine?.border)\n\n // 弹出窗口\n // this.menu = createGroup({\n // visible: false,\n // pickable: false,\n // x: 0,\n // y: 0,\n // });\n this.menu = new MenuHandler(this.table);\n\n this.drillIcon = new DrillIcon();\n }\n\n /**\n * @description: 组件mark加入到容器Group中\n * @param {Group} componentGroup\n * @return {*}\n */\n addToGroup(componentGroup: Group) {\n componentGroup.addChild(this.frozenShadowLine);\n // componentGroup.addChild(this.selectBorder);\n componentGroup.addChild(this.columnResizerBgLine);\n componentGroup.addChild(this.columnResizerLine);\n componentGroup.addChild(this.columnResizerLabel);\n componentGroup.addChild(this.hScrollBar);\n componentGroup.addChild(this.vScrollBar);\n this.menu.bindTableComponent(componentGroup);\n this.drillIcon.appand(componentGroup);\n this.cellMover.appand(componentGroup);\n }\n\n /**\n * @description: 创建滚动条组件\n * @return {*}\n */\n createScrollBar() {\n const theme = this.table.theme;\n const scrollRailColor = theme.scrollStyle?.scrollRailColor as string;\n const scrollSliderColor = theme.scrollStyle?.scrollSliderColor as string;\n const width = theme.scrollStyle?.width as number;\n // const visible = theme.scrollStyle?.visible as string;\n // const hoverOn = theme.scrollStyle?.hoverOn as boolean;\n\n this.hScrollBar = new ScrollBar({\n direction: 'horizontal',\n x: -this.table.tableNoFrameWidth * 2,\n y: -this.table.tableNoFrameHeight * 2,\n width: this.table.tableNoFrameWidth,\n height: width,\n padding: 0,\n railStyle: {\n fill: !!scrollRailColor,\n fillColor: scrollRailColor\n },\n sliderStyle: {\n fill: true,\n fillColor: scrollSliderColor\n },\n range: [0, 0.1],\n // scrollRange: [0.4, 0.8]\n visible: false\n });\n // hack方案实现初始化隐藏滚动条,也可以add到stage之后执行hideAll\n (this.hScrollBar as any).render();\n this.hScrollBar.hideAll();\n\n this.vScrollBar = new ScrollBar({\n direction: 'vertical',\n x: -this.table.tableNoFrameWidth * 2,\n y: -this.table.tableNoFrameHeight * 2,\n width,\n height: this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight(),\n padding: 0,\n railStyle: {\n fill: !!scrollRailColor,\n fillColor: scrollRailColor\n },\n sliderStyle: {\n fill: true,\n fillColor: scrollSliderColor\n },\n range: [0, 0.1],\n visible: false\n });\n (this.vScrollBar as any).render();\n this.vScrollBar.hideAll();\n }\n\n /**\n * @description: 更新滚动条尺寸\n * @return {*}\n */\n updateScrollBar() {\n const oldHorizontalBarPos = this.table.stateManeger.scroll.horizontalBarPos;\n const oldVerticalBarPos = this.table.stateManeger.scroll.verticalBarPos;\n\n const theme = this.table.theme;\n const width = theme.scrollStyle?.width as number;\n const visible = theme.scrollStyle?.visible as string;\n // const hoverOn = theme.scrollStyle?.hoverOn as boolean;\n const tableWidth = Math.ceil(this.table.scenegraph.tableGroup.attribute.width);\n const tableHeight = Math.ceil(this.table.scenegraph.tableGroup.attribute.height);\n\n const totalHeight = this.table.getAllRowsHeight();\n const totalWidth = this.table.getAllColsWidth();\n const frozenRowsHeight = this.table.getFrozenRowsHeight();\n const frozenColsWidth = this.table.getFrozenColsWidth();\n if (totalWidth > tableWidth) {\n const y = Math.min(tableHeight, totalHeight);\n const rangeEnd = Math.max(0.05, (tableWidth - frozenColsWidth) / (totalWidth - frozenColsWidth));\n this.hScrollBar.setAttributes({\n x: frozenColsWidth,\n y: y - width,\n width: tableWidth - frozenColsWidth,\n range: [0, rangeEnd],\n visible: visible === 'always'\n });\n const bounds = this.hScrollBar.AABBBounds && this.hScrollBar.globalAABBBounds;\n (this.hScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n if (visible === 'always') {\n this.hScrollBar.showAll();\n }\n }\n\n if (totalHeight > tableHeight) {\n const x = Math.min(tableWidth, totalWidth);\n const rangeEnd = Math.max(0.05, (tableHeight - frozenRowsHeight) / (totalHeight - frozenRowsHeight));\n this.vScrollBar.setAttributes({\n x: x - width,\n y: frozenRowsHeight,\n height: tableHeight - frozenRowsHeight,\n range: [0, rangeEnd],\n visible: visible === 'always'\n });\n const bounds = this.vScrollBar.AABBBounds && this.vScrollBar.globalAABBBounds;\n (this.vScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n\n if (visible === 'always') {\n this.vScrollBar.showAll();\n }\n }\n\n this.table.stateManeger.setScrollLeft(oldHorizontalBarPos);\n this.table.stateManeger.setScrollTop(oldVerticalBarPos);\n }\n\n /**\n * @description: 隐藏列宽调整组件\n * @return {*}\n */\n hideResizeCol() {\n // this.columnResizerLine.attribute.visible = false;\n this.columnResizerLine.setAttribute('visible', false);\n this.columnResizerBgLine.setAttribute('visible', false);\n this.columnResizerLabel.setAttribute('visible', false);\n this.columnResizerLabel.hideAll();\n }\n\n /**\n * @description: 显示列宽调整组件\n * @param {number} col\n * @param {number} y\n * @return {*}\n */\n showResizeCol(col: number, y: number) {\n // this.columnResizerLine.attribute.visible = false;\n // 基准线\n const colX = getColX(col, this.table);\n this.columnResizerLine.setAttributes({\n visible: true,\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) }\n ]\n });\n this.columnResizerBgLine.setAttributes({\n visible: true,\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) }\n ]\n });\n\n // 标签\n // this.columnResizerLabel.setAttribute('visible', true);\n this.columnResizerLabel.showAll();\n this.columnResizerLabel.setAttributes({\n visible: true,\n x: colX,\n y\n });\n (this.columnResizerLabel.lastChild as WrapText).setAttribute('text', `${this.table.getColWidth(col)}px`);\n }\n\n /**\n * @description: 更新列宽调整组件\n * @param {number} col\n * @param {number} y 标签显示的y坐标\n * @return {*}\n */\n updateResizeCol(col: number, y: number) {\n // 基准线\n const colX = getColX(col, this.table);\n // this.columnResizerLine.setAttribute('x', x);\n this.columnResizerLine.setAttributes({\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) } // todo: 优化points赋值\n ]\n });\n this.columnResizerBgLine.setAttributes({\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) } // todo: 优化points赋值\n ]\n });\n\n // 标签\n this.columnResizerLabel.setAttributes({\n x: colX,\n y\n });\n (this.columnResizerLabel.lastChild as WrapText).setAttribute(\n 'text',\n `${Math.floor(this.table.getColWidth(col))}px`\n );\n }\n\n /**\n * @description: 隐藏列顺序调整组件\n * @return {*}\n */\n hideMoveCol() {\n this.cellMover.hide();\n }\n\n /**\n * @description: 显示列顺序调整组件\n * @param {number} col\n * @param {number} x\n * @return {*}\n */\n showMoveCol(col: number, row: number, delta: number) {\n this.cellMover.show(col, row, delta);\n }\n\n /**\n * @description: 更新列顺序调整组件\n * @param {number} backX\n * @param {number} lineX\n * @return {*}\n */\n updateMoveCol(backX: number, lineX: number, backY: number, lineY: number) {\n this.cellMover.update(backX, lineX, backY, lineY);\n }\n\n /**\n * @description: 显示冻结列shadow\n * @param {number} col\n * @return {*}\n */\n setFrozenColumnShadow(col: number) {\n if (col < 0) {\n this.frozenShadowLine.setAttributes({\n visible: false\n });\n } else {\n const colX = this.table.getColsWidth(0, col);\n this.frozenShadowLine.setAttributes({\n visible: true,\n x: colX,\n height: this.table.getRowsHeight(0, this.table.rowCount - 1)\n });\n }\n }\n\n hideVerticalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.vScrollBar.setAttribute('visible', false);\n this.vScrollBar.hideAll();\n this.table.scenegraph.updateNextFrame();\n }\n showVerticalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.vScrollBar.setAttribute('visible', true);\n this.vScrollBar.showAll();\n this.table.scenegraph.updateNextFrame();\n }\n hideHorizontalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.hScrollBar.setAttribute('visible', false);\n this.hScrollBar.hideAll();\n this.table.scenegraph.updateNextFrame();\n }\n showHorizontalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.hScrollBar.setAttribute('visible', true);\n this.hScrollBar.showAll();\n this.table.scenegraph.updateNextFrame();\n }\n updateVerticalScrollBarPos(topRatio: number) {\n const range = this.vScrollBar.attribute.range;\n const size = range[1] - range[0];\n const range0 = topRatio * (1 - size);\n this.vScrollBar.setAttribute('range', [range0, range0 + size]);\n const bounds = this.vScrollBar.AABBBounds && this.vScrollBar.globalAABBBounds;\n (this.vScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n }\n updateHorizontalScrollBarPos(leftRatio: number) {\n const range = this.hScrollBar.attribute.range;\n const size = range[1] - range[0];\n this.hScrollBar.setAttribute('range', [leftRatio, leftRatio + size]);\n const bounds = this.hScrollBar.AABBBounds && this.hScrollBar.globalAABBBounds;\n (this.hScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n }\n}\n"]}
1
+ {"version":3,"sources":["scenegraph/component/table-component.ts"],"names":[],"mappings":";;;AACA,+CAAkG;AAClG,qEAAyD;AAGzD,iCAAqC;AACrC,6CAAyC;AACzC,6CAAyC;AACzC,iCAAiC;AAOjC,MAAa,cAAc;IAezB,YAAY,KAAmB;;QAC7B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;QAG/B,IAAI,CAAC,eAAe,EAAE,CAAC;QAGvB,MAAM,kBAAkB,GAAG,MAAA,KAAK,CAAC,YAAY,0CAAE,SAAS,CAAC;QACzD,MAAM,kBAAkB,GAAG,MAAA,KAAK,CAAC,YAAY,0CAAE,SAAS,CAAC;QACzD,MAAM,oBAAoB,GAAG,MAAA,KAAK,CAAC,YAAY,0CAAE,OAAO,CAAC;QACzD,MAAM,oBAAoB,G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SAAS,CAAC,KAAK,CAAC;QAC9C,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACjC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC;QACrE,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC;QAC7E,IAAI,CAAC,UAAkB,CAAC,aAAa,GAAG;YACvC,CAAC,EAAE,MAAM,CAAC,EAAE;YACZ,CAAC,EAAE,MAAM,CAAC,EAAE;SACb,CAAC;IACJ,CAAC;CACF;AA3cD,wCA2cC","file":"table-component.js","sourcesContent":["import type { ILine, IRect, IGroup } from '@visactor/vrender';\nimport { createRect, createLine, createText, createGroup, createSymbol } from '@visactor/vrender';\nimport { ScrollBar } from '@visactor/vrender-components';\nimport type { Group } from '../graphic/group';\nimport type { WrapText } from '../graphic/text';\nimport { MenuHandler } from './menu';\nimport { DrillIcon } from './drill-icon';\nimport { CellMover } from './cell-mover';\nimport { getColX } from './util';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\n\n/**\n * @description: 表格内容外组件\n * @return {*}\n */\nexport class TableComponent {\n table: BaseTableAPI;\n\n border: IRect; // 表格外边框\n // selectBorder: IRect; // 表格选择区域边框\n columnResizerLine: ILine; // 表格列宽调整基准线\n columnResizerBgLine: ILine; // 表格列宽调整基准线背景\n columnResizerLabel: IGroup; // 表格列宽调整标记\n menu: MenuHandler; // 表格菜单\n vScrollBar: ScrollBar; // 表格横向滚动条\n hScrollBar: ScrollBar; // 表格纵向滚动条\n frozenShadowLine: IRect; // 表格冻结列右侧阴影块\n drillIcon: DrillIcon; // drill icon\n cellMover: CellMover; // 表格列顺序调整标记\n\n constructor(table: BaseTableAPI) {\n this.table = table;\n const theme = this.table.theme;\n\n // 滚动条\n this.createScrollBar();\n\n // 列宽调整基准线\n const columnResizerColor = theme.columnResize?.lineColor;\n const columnResizerWidth = theme.columnResize?.lineWidth;\n const columnResizerBgColor = theme.columnResize?.bgColor;\n const columnResizerBgWidth = theme.columnResize?.width;\n this.columnResizerLine = createLine({\n visible: false,\n pickable: false,\n stroke: columnResizerColor as string,\n lineWidth: columnResizerWidth as number,\n x: 0,\n y: 0,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: 0 }\n ]\n });\n this.columnResizerBgLine = createLine({\n visible: false,\n pickable: false,\n stroke: columnResizerBgColor as string,\n lineWidth: columnResizerBgWidth as number,\n x: 0,\n y: 0,\n // dx: -(columnResizerBgWidth - columnResizerWidth) / 2,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: 0 }\n ]\n });\n\n // 列宽调整文字标签\n const columnResizerLabelText = createText({\n visible: false,\n pickable: false,\n x: 0,\n y: 0,\n fontSize: 10,\n fill: '#FFF',\n text: '',\n textBaseline: 'top',\n dx: 12 + 4,\n dy: -8 + 2\n });\n const columnResizerLabelBack = createRect({\n visible: false,\n pickable: false,\n fill: '#3073F2',\n x: 0,\n y: 0,\n width: 38,\n height: 16,\n borderRadius: 5,\n dx: 12,\n dy: -8\n });\n this.columnResizerLabel = createGroup({\n visible: false,\n pickable: false,\n x: 0,\n y: 0\n });\n this.columnResizerLabel.appendChild(columnResizerLabelBack);\n this.columnResizerLabel.appendChild(columnResizerLabelText);\n\n // 列顺序调整基准线\n this.cellMover = new CellMover(this.table);\n\n // 冻结列阴影\n const shadowWidth = theme.frozenColumnLine?.shadow?.width;\n const shadowStartColor = theme.frozenColumnLine?.shadow?.startColor;\n const shadowEndColor = theme.frozenColumnLine?.shadow?.endColor;\n this.frozenShadowLine = createRect({\n visible: true,\n pickable: false,\n x: 0,\n y: 0,\n width: shadowWidth,\n height: 0,\n fill: {\n gradient: 'linear',\n x0: 0,\n y0: 0,\n x1: 1,\n y1: 0,\n stops: [\n { color: shadowStartColor, offset: 0 },\n { color: shadowEndColor, offset: 1 }\n ]\n }\n });\n\n // TO BE DONE 冻结列border(theme.frozenColumnLine?.border)\n\n // 弹出窗口\n // this.menu = createGroup({\n // visible: false,\n // pickable: false,\n // x: 0,\n // y: 0,\n // });\n this.menu = new MenuHandler(this.table);\n\n this.drillIcon = new DrillIcon();\n }\n\n /**\n * @description: 组件mark加入到容器Group中\n * @param {Group} componentGroup\n * @return {*}\n */\n addToGroup(componentGroup: Group) {\n componentGroup.addChild(this.frozenShadowLine);\n // componentGroup.addChild(this.selectBorder);\n componentGroup.addChild(this.columnResizerBgLine);\n componentGroup.addChild(this.columnResizerLine);\n componentGroup.addChild(this.columnResizerLabel);\n if (this.table.theme.scrollStyle.hoverOn) {\n componentGroup.addChild(this.hScrollBar);\n componentGroup.addChild(this.vScrollBar);\n } else {\n componentGroup.stage.defaultLayer.addChild(this.hScrollBar);\n componentGroup.stage.defaultLayer.addChild(this.vScrollBar);\n }\n this.menu.bindTableComponent(componentGroup);\n this.drillIcon.appand(componentGroup);\n this.cellMover.appand(componentGroup);\n }\n\n /**\n * @description: 创建滚动条组件\n * @return {*}\n */\n createScrollBar() {\n const theme = this.table.theme;\n const scrollRailColor = theme.scrollStyle?.scrollRailColor as string;\n const scrollSliderColor = theme.scrollStyle?.scrollSliderColor as string;\n const width = theme.scrollStyle?.width as number;\n // const visible = theme.scrollStyle?.visible as string;\n // const hoverOn = theme.scrollStyle?.hoverOn as boolean;\n\n this.hScrollBar = new ScrollBar({\n direction: 'horizontal',\n x: -this.table.tableNoFrameWidth * 2,\n y: -this.table.tableNoFrameHeight * 2,\n width: this.table.tableNoFrameWidth,\n height: width,\n padding: 0,\n railStyle: {\n fill: scrollRailColor\n },\n sliderStyle: {\n fill: scrollSliderColor\n },\n range: [0, 0.1],\n // scrollRange: [0.4, 0.8]\n visible: false\n });\n // hack方案实现初始化隐藏滚动条,也可以add到stage之后执行hideAll\n (this.hScrollBar as any).render();\n this.hScrollBar.hideAll();\n\n this.vScrollBar = new ScrollBar({\n direction: 'vertical',\n x: -this.table.tableNoFrameWidth * 2,\n y: -this.table.tableNoFrameHeight * 2,\n width,\n height: this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight(),\n padding: 0,\n railStyle: {\n fill: scrollRailColor\n },\n sliderStyle: {\n fill: scrollSliderColor\n },\n range: [0, 0.1],\n visible: false\n });\n (this.vScrollBar as any).render();\n this.vScrollBar.hideAll();\n }\n\n /**\n * @description: 更新滚动条尺寸\n * @return {*}\n */\n updateScrollBar() {\n const oldHorizontalBarPos = this.table.stateManeger.scroll.horizontalBarPos;\n const oldVerticalBarPos = this.table.stateManeger.scroll.verticalBarPos;\n\n const theme = this.table.theme;\n const width = theme.scrollStyle?.width as number;\n const visible = theme.scrollStyle?.visible as string;\n // const hoverOn = theme.scrollStyle?.hoverOn as boolean;\n const tableWidth = Math.ceil(this.table.scenegraph.tableGroup.attribute.width);\n const tableHeight = Math.ceil(this.table.scenegraph.tableGroup.attribute.height);\n\n const totalHeight = this.table.getAllRowsHeight();\n const totalWidth = this.table.getAllColsWidth();\n const frozenRowsHeight = this.table.getFrozenRowsHeight();\n const frozenColsWidth = this.table.getFrozenColsWidth();\n if (totalWidth > tableWidth) {\n const y = Math.min(tableHeight, totalHeight);\n const rangeEnd = Math.max(0.05, (tableWidth - frozenColsWidth) / (totalWidth - frozenColsWidth));\n this.hScrollBar.setAttributes({\n x: frozenColsWidth,\n y: y - (this.table.theme.scrollStyle.hoverOn ? width : 0),\n width: tableWidth - frozenColsWidth,\n range: [0, rangeEnd],\n visible: visible === 'always'\n });\n const bounds = this.hScrollBar.AABBBounds && this.hScrollBar.globalAABBBounds;\n (this.hScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n if (visible === 'always') {\n this.hScrollBar.showAll();\n }\n }\n\n if (totalHeight > tableHeight) {\n const x = Math.min(tableWidth, totalWidth);\n const rangeEnd = Math.max(0.05, (tableHeight - frozenRowsHeight) / (totalHeight - frozenRowsHeight));\n this.vScrollBar.setAttributes({\n x: x - (this.table.theme.scrollStyle.hoverOn ? width : 0),\n y: frozenRowsHeight,\n height: tableHeight - frozenRowsHeight,\n range: [0, rangeEnd],\n visible: visible === 'always'\n });\n const bounds = this.vScrollBar.AABBBounds && this.vScrollBar.globalAABBBounds;\n (this.vScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n\n if (visible === 'always') {\n this.vScrollBar.showAll();\n }\n }\n\n this.table.stateManeger.setScrollLeft(oldHorizontalBarPos);\n this.table.stateManeger.setScrollTop(oldVerticalBarPos);\n }\n\n /**\n * @description: 隐藏列宽调整组件\n * @return {*}\n */\n hideResizeCol() {\n // this.columnResizerLine.attribute.visible = false;\n this.columnResizerLine.setAttribute('visible', false);\n this.columnResizerBgLine.setAttribute('visible', false);\n this.columnResizerLabel.setAttribute('visible', false);\n this.columnResizerLabel.hideAll();\n }\n\n /**\n * @description: 显示列宽调整组件\n * @param {number} col\n * @param {number} y\n * @return {*}\n */\n showResizeCol(col: number, y: number) {\n // this.columnResizerLine.attribute.visible = false;\n // 基准线\n const colX = getColX(col, this.table);\n this.columnResizerLine.setAttributes({\n visible: true,\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) }\n ]\n });\n this.columnResizerBgLine.setAttributes({\n visible: true,\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) }\n ]\n });\n\n // 标签\n // this.columnResizerLabel.setAttribute('visible', true);\n this.columnResizerLabel.showAll();\n this.columnResizerLabel.setAttributes({\n visible: true,\n x: colX,\n y\n });\n (this.columnResizerLabel.lastChild as WrapText).setAttribute('text', `${this.table.getColWidth(col)}px`);\n }\n\n /**\n * @description: 更新列宽调整组件\n * @param {number} col\n * @param {number} y 标签显示的y坐标\n * @return {*}\n */\n updateResizeCol(col: number, y: number) {\n // 基准线\n const colX = getColX(col, this.table);\n // this.columnResizerLine.setAttribute('x', x);\n this.columnResizerLine.setAttributes({\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) } // todo: 优化points赋值\n ]\n });\n this.columnResizerBgLine.setAttributes({\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) } // todo: 优化points赋值\n ]\n });\n\n // 标签\n this.columnResizerLabel.setAttributes({\n x: colX,\n y\n });\n (this.columnResizerLabel.lastChild as WrapText).setAttribute(\n 'text',\n `${Math.floor(this.table.getColWidth(col))}px`\n );\n }\n\n /**\n * @description: 隐藏列顺序调整组件\n * @return {*}\n */\n hideMoveCol() {\n this.cellMover.hide();\n }\n\n /**\n * @description: 显示列顺序调整组件\n * @param {number} col\n * @param {number} x\n * @return {*}\n */\n showMoveCol(col: number, row: number, delta: number) {\n this.cellMover.show(col, row, delta);\n }\n\n /**\n * @description: 更新列顺序调整组件\n * @param {number} backX\n * @param {number} lineX\n * @return {*}\n */\n updateMoveCol(backX: number, lineX: number, backY: number, lineY: number) {\n this.cellMover.update(backX, lineX, backY, lineY);\n }\n\n /**\n * @description: 显示冻结列shadow\n * @param {number} col\n * @return {*}\n */\n setFrozenColumnShadow(col: number) {\n if (col < 0) {\n this.frozenShadowLine.setAttributes({\n visible: false\n });\n } else {\n const colX = this.table.getColsWidth(0, col);\n this.frozenShadowLine.setAttributes({\n visible: true,\n x: colX,\n height: this.table.getRowsHeight(0, this.table.rowCount - 1)\n });\n }\n }\n\n hideVerticalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.vScrollBar.setAttribute('visible', false);\n this.vScrollBar.hideAll();\n this.table.scenegraph.updateNextFrame();\n }\n showVerticalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.vScrollBar.setAttribute('visible', true);\n this.vScrollBar.showAll();\n this.table.scenegraph.updateNextFrame();\n }\n hideHorizontalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.hScrollBar.setAttribute('visible', false);\n this.hScrollBar.hideAll();\n this.table.scenegraph.updateNextFrame();\n }\n showHorizontalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.hScrollBar.setAttribute('visible', true);\n this.hScrollBar.showAll();\n this.table.scenegraph.updateNextFrame();\n }\n updateVerticalScrollBarPos(topRatio: number) {\n const range = this.vScrollBar.attribute.range;\n const size = range[1] - range[0];\n const range0 = topRatio * (1 - size);\n this.vScrollBar.setAttribute('range', [range0, range0 + size]);\n const bounds = this.vScrollBar.AABBBounds && this.vScrollBar.globalAABBBounds;\n (this.vScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n }\n updateHorizontalScrollBarPos(leftRatio: number) {\n const range = this.hScrollBar.attribute.range;\n const size = range[1] - range[0];\n this.hScrollBar.setAttribute('range', [leftRatio, leftRatio + size]);\n const bounds = this.hScrollBar.AABBBounds && this.hScrollBar.globalAABBBounds;\n (this.hScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import type { FederatedPointerEvent, IStage, IRect, IGraphic } from '@visactor/vrender';
1
+ import type { FederatedPointerEvent, IStage, IGraphic } from '@visactor/vrender';
2
2
  export interface DebugToolOptions {
3
3
  container?: HTMLElement;
4
4
  infoPosition?: 'tl' | 'tr' | 'bl' | 'br';
@@ -12,7 +12,6 @@ export declare class DebugTool {
12
12
  _infoContainer: HTMLElement;
13
13
  _highlightRect: HTMLElement;
14
14
  _target: IGraphic;
15
- _rect: IRect;
16
15
  _mode: 'hover' | 'click';
17
16
  _customGrapicKeys?: string[];
18
17
  _modeTip: HTMLElement;
@@ -27,7 +26,6 @@ export declare class DebugTool {
27
26
  createHighlightRect(): void;
28
27
  bindStageEvent(): void;
29
28
  addHighlightBounds(bounds: any): void;
30
- removeHighlightBounds(): void;
31
29
  updateInfo(): void;
32
30
  clearInfo(): void;
33
31
  updateMode(): void;
@@ -53,39 +53,24 @@ class DebugTool {
53
53
  this._highlightRect.style.position = "absolute", container.appendChild(this._highlightRect);
54
54
  }
55
55
  bindStageEvent() {
56
- this._rect = (0, vrender_1.createRect)({
57
- x: 0,
58
- y: 0,
59
- width: 0,
60
- height: 0,
61
- fill: !1,
62
- stroke: !0,
63
- strokeColor: "red",
64
- lineWidth: 1,
65
- pickable: !1,
66
- visible: !1
67
- }), this._stage.defaultLayer.appendChild(this._rect), this._callback.pointermove = e => {
56
+ this._callback.pointermove = e => {
68
57
  "hover" !== this._mode || (e.target && e.target !== this._target ? (this._target = e.target,
69
58
  this.addHighlightBounds(this._target.globalAABBBounds), setTimeout((() => {
70
59
  this.updateInfo();
71
- }), 100)) : e.target || (this._target = void 0, this.removeHighlightBounds(), this.clearInfo()));
60
+ }), 100)) : e.target || (this._target = void 0, this.clearInfo()));
72
61
  }, this._stage.addEventListener("pointermove", this._callback.pointermove), this._callback.pointerup = e => {
73
62
  "click" !== this._mode || (e.target && e.target !== this._target ? (this._target = e.target,
74
63
  this.addHighlightBounds(this._target.globalAABBBounds), setTimeout((() => {
75
64
  this.updateInfo();
76
- }), 100)) : e.target || (this._target = void 0, this.removeHighlightBounds(), this.clearInfo()));
65
+ }), 100)) : e.target || (this._target = void 0, this.clearInfo()));
77
66
  }, this._stage.addEventListener("pointerup", this._callback.pointerup), this._callback.pointerleave = e => {
78
- "hover" === this._mode && (this._target = void 0, this.removeHighlightBounds(),
79
- this.clearInfo());
67
+ "hover" === this._mode && (this._target = void 0, this.clearInfo());
80
68
  }, this._stage.addEventListener("pointerleave", this._callback.pointerleave);
81
69
  }
82
70
  addHighlightBounds(bounds) {
83
71
  this._highlightRect.style.left = `${bounds.x1}px`, this._highlightRect.style.top = `${bounds.y1}px`,
84
72
  this._highlightRect.style.width = `${bounds.width()}px`, this._highlightRect.style.height = `${bounds.height()}px`;
85
73
  }
86
- removeHighlightBounds() {
87
- this._rect.setAttribute("visible", !1), this._stage.renderNextFrame();
88
- }
89
74
  updateInfo() {
90
75
  if (!this._target) return;
91
76
  this._infoContainer.children.length > 1 && this._infoContainer.removeChild(this._infoContainer.children[1]),
@@ -128,9 +113,8 @@ class DebugTool {
128
113
  }
129
114
  release() {
130
115
  document.body.removeChild(this._infoContainer), this._highlightRect.parentElement.removeChild(this._highlightRect),
131
- this._stage.defaultLayer.removeChild(this._rect), this._stage.removeEventListener("pointermove", this._callback.pointermove),
132
- this._stage.removeEventListener("pointerup", this._callback.pointerup), this._stage.removeEventListener("pointerleave", this._callback.pointerleave),
133
- window.removeEventListener("keydown", this._callback.keydown);
116
+ this._stage.removeEventListener("pointermove", this._callback.pointermove), this._stage.removeEventListener("pointerup", this._callback.pointerup),
117
+ this._stage.removeEventListener("pointerleave", this._callback.pointerleave), window.removeEventListener("keydown", this._callback.keydown);
134
118
  }
135
119
  }
136
120
 
@@ -1 +1 @@
1
- {"version":3,"sources":["scenegraph/debug-tool/debug-tool.ts"],"names":[],"mappings":";;;;;;AACA,+CAAyD;AACzD,0EAA8C;AAW9C,MAAa,SAAS;IAgBpB,YAAY,KAAa,EAAE,OAA0B;QAVrD,UAAK,GAAsB,OAAO,CAAC;QAWjC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,SAAS,GAAG,EAAS,CAAC;QAE3B,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,EAAE;YAC7B,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC;SACnD;QAGD,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,EAAE;YACtB,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,SAAS,CAAC;SACzC;aAAM;YACL,IAAI,CAAC,mBAAmB,CAAC,OAAO,C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,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;wBACrB,MAAM;oBACR,KAAK,OAAO;wBACV,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;wBACrB,MAAM;iBACT;gBACD,IAAI,CAAC,UAAU,EAAE,CAAC;aACnB;QACH,CAAC,CAAC;QACF,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED,OAAO;QAEL,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAG/C,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAGnE,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACjD,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QAC3E,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QACvE,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAG7E,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAChE,CAAC;CACF;AArQD,8BAqQC","file":"debug-tool.js","sourcesContent":["import type { FederatedPointerEvent, IStage, IRect, IGraphic } from '@visactor/vrender';\nimport { createRect, getTheme } from '@visactor/vrender';\nimport JSONFormatter from 'json-formatter-js';\n\nexport interface DebugToolOptions {\n container?: HTMLElement;\n infoPosition?: 'tl' | 'tr' | 'bl' | 'br';\n infoWidth?: number;\n infoHeight?: number;\n mode?: 'hover' | 'click';\n customGrapicKeys?: string[];\n}\n\nexport class DebugTool {\n _stage: IStage;\n _infoContainer: HTMLElement;\n _highlightRect: HTMLElement;\n _target: IGraphic;\n _rect: IRect;\n _mode: 'hover' | 'click' = 'hover';\n _customGrapicKeys?: string[];\n _modeTip: HTMLElement;\n _callback: {\n pointermove: (e: FederatedPointerEvent) => void;\n pointerup: (e: FederatedPointerEvent) => void;\n pointerleave: (e: FederatedPointerEvent) => void;\n keydown: (e: KeyboardEvent) => void;\n };\n\n constructor(stage: IStage, options?: DebugToolOptions) {\n this._stage = stage;\n this._callback = {} as any;\n\n if (options?.customGrapicKeys) {\n this._customGrapicKeys = options.customGrapicKeys;\n }\n\n // 创建信息框\n if (options?.container) {\n this._infoContainer = options.container;\n } else {\n this.createInfoContainer(options);\n }\n\n // 创建高亮矩形\n this.createHighlightRect();\n\n // 绑定stage事件\n this.bindStageEvent();\n\n // 绑定键盘事件\n this.bindKeyEvent();\n }\n\n createInfoContainer(options?: DebugToolOptions) {\n const position = options?.infoPosition || 'tr';\n const width = options?.infoWidth || 300;\n const height = options?.infoPosition || 400;\n this._infoContainer = document.createElement('div');\n this._infoContainer.style.position = 'fixed';\n this._infoContainer.style.width = `${width}px`;\n this._infoContainer.style.height = `${height}px`;\n this._infoContainer.style.backgroundColor = 'rgba(210, 210, 210, 0.3)';\n this._infoContainer.style.overflow = 'auto';\n this._infoContainer.style.display = 'none';\n switch (position) {\n case 'tl':\n this._infoContainer.style.top = '0px';\n this._infoContainer.style.left = '0px';\n break;\n case 'tr':\n this._infoContainer.style.top = '0px';\n this._infoContainer.style.right = `0px`;\n break;\n case 'bl':\n this._infoContainer.style.bottom = `0px`;\n this._infoContainer.style.left = '0px';\n break;\n case 'br':\n this._infoContainer.style.bottom = `0px`;\n this._infoContainer.style.right = `0px`;\n break;\n }\n\n // Tip\n // debug 模式:hover(shift + s改变模式;shift + d控制台输出target graphic)\n const tip = document.createElement('div');\n const tipSpan1 = document.createElement('span');\n tipSpan1.innerText = 'debug 模式:';\n tip.appendChild(tipSpan1);\n this._modeTip = document.createElement('span');\n this._modeTip.innerText = this._mode;\n tip.appendChild(this._modeTip);\n const tipSpan2 = document.createElement('span');\n tipSpan2.innerText = '(shift + s改变模式;shift + d控制台输出target graphic)';\n tip.appendChild(tipSpan2);\n this._infoContainer.appendChild(tip);\n\n // document.body.append(this._infoContainer);\n this._stage.window.getContainer().append(this._infoContainer);\n }\n\n createHighlightRect() {\n const container = this._stage.window.getContainer();\n this._highlightRect = document.createElement('div');\n this._highlightRect.style.display = 'absolute';\n this._highlightRect.style.border = '1px solid red';\n this._highlightRect.style.pointerEvents = 'none';\n this._highlightRect.style.position = 'absolute';\n container.appendChild(this._highlightRect);\n }\n\n bindStageEvent() {\n this._rect = createRect({\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n fill: false,\n stroke: true,\n strokeColor: 'red',\n lineWidth: 1,\n pickable: false,\n visible: false\n });\n this._stage.defaultLayer.appendChild(this._rect);\n\n this._callback.pointermove = (e: FederatedPointerEvent) => {\n if (this._mode !== 'hover') {\n // do nothing\n } else if (e.target && (e.target as unknown as IGraphic) !== this._target) {\n // 更新bounds\n this._target = e.target as unknown as IGraphic;\n this.addHighlightBounds(this._target.globalAABBBounds);\n setTimeout(() => {\n this.updateInfo();\n }, 100);\n } else if (!e.target) {\n this._target = undefined;\n this.removeHighlightBounds();\n this.clearInfo();\n }\n };\n this._stage.addEventListener('pointermove', this._callback.pointermove);\n\n this._callback.pointerup = (e: FederatedPointerEvent) => {\n if (this._mode !== 'click') {\n // do nothing\n } else if (e.target && (e.target as unknown as IGraphic) !== this._target) {\n // 更新bounds\n this._target = e.target as unknown as IGraphic;\n this.addHighlightBounds(this._target.globalAABBBounds);\n setTimeout(() => {\n this.updateInfo();\n }, 100);\n } else if (!e.target) {\n this._target = undefined;\n this.removeHighlightBounds();\n this.clearInfo();\n }\n };\n this._stage.addEventListener('pointerup', this._callback.pointerup);\n\n this._callback.pointerleave = (e: FederatedPointerEvent) => {\n if (this._mode === 'hover') {\n this._target = undefined;\n this.removeHighlightBounds();\n this.clearInfo();\n }\n };\n this._stage.addEventListener('pointerleave', this._callback.pointerleave);\n }\n\n addHighlightBounds(bounds: any) {\n // 使用VRender绘制高亮框会导致触发多余渲染,因此使用dom\n // this._rect.setAttributes({\n // x: bounds.x1,\n // y: bounds.y1,\n // width: bounds.width(),\n // height: bounds.height(),\n // visible: true,\n // });\n\n // // 保证rect在最上层\n // this._stage.defaultLayer.appendChild(this._rect);\n // this._stage.renderNextFrame();\n\n this._highlightRect.style.left = `${bounds.x1}px`;\n this._highlightRect.style.top = `${bounds.y1}px`;\n this._highlightRect.style.width = `${bounds.width()}px`;\n this._highlightRect.style.height = `${bounds.height()}px`;\n }\n\n removeHighlightBounds() {\n this._rect.setAttribute('visible', false);\n this._stage.renderNextFrame();\n }\n\n updateInfo() {\n if (!this._target) {\n return;\n }\n // this._infoContainer.innerHTML = '';\n if (this._infoContainer.children.length > 1) {\n this._infoContainer.removeChild(this._infoContainer.children[1]);\n }\n this._infoContainer.style.display = 'block';\n\n const info = {\n customKeys: {},\n type: this._target.type,\n // role: (this._target as any).role,\n globalX: this._target.globalTransMatrix.e,\n globalY: this._target.globalTransMatrix.f,\n attribute: this._target.attribute,\n theme: getTheme(this._target)[this._target.type],\n target: this._target\n };\n\n if (this._customGrapicKeys) {\n this._customGrapicKeys.forEach(key => {\n info.customKeys[key] = this._target[key];\n });\n } else {\n delete info.customKeys;\n }\n\n const formatter = new JSONFormatter(info, 2);\n this._infoContainer.appendChild(formatter.render());\n }\n\n clearInfo() {\n this._infoContainer.style.display = 'none';\n }\n\n updateMode() {\n this._modeTip.innerText = this._mode;\n }\n\n bindKeyEvent() {\n this._callback.keydown = (e: KeyboardEvent) => {\n if (e.key === 'D') {\n console.log(this._target);\n } else if (e.key === 'S') {\n switch (this._mode) {\n case 'click':\n this._mode = 'hover';\n break;\n case 'hover':\n this._mode = 'click';\n break;\n }\n this.updateMode();\n }\n };\n window.addEventListener('keydown', this._callback.keydown);\n }\n\n release() {\n // 移除信息框\n document.body.removeChild(this._infoContainer);\n\n // 移除高亮框\n this._highlightRect.parentElement.removeChild(this._highlightRect);\n\n // 解绑stage事件\n this._stage.defaultLayer.removeChild(this._rect);\n this._stage.removeEventListener('pointermove', this._callback.pointermove);\n this._stage.removeEventListener('pointerup', this._callback.pointerup);\n this._stage.removeEventListener('pointerleave', this._callback.pointerleave);\n\n // 解绑键盘事件\n window.removeEventListener('keydown', this._callback.keydown);\n }\n}\n"]}
1
+ {"version":3,"sources":["scenegraph/debug-tool/debug-tool.ts"],"names":[],"mappings":";;;;;;AACA,+CAAyD;AACzD,0EAA8C;AAW9C,MAAa,SAAS;IAgBpB,YAAY,KAAa,EAAE,OAA0B;QAVrD,UAAK,GAAsB,OAAO,CAAC;QAWjC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,SAAS,GAAG,EAAS,CAAC;QAE3B,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,EAAE;YAC7B,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC;SACnD;QAGD,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,EAAE;YACtB,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,SAAS,CAAC;SACzC;aAAM;YACL,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;SACnC;QAGD,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAG3B,IAAI,CAAC,cAAc,EAAE,CAAC;QAGtB,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAED,mBAAmB,CAAC,OAA0B;QAC5C,MAAM,QAAQ,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,KAAI,IAAI,CAAC;QAC/C,MAAM,KAAK,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,KAAI,GAAG,CAAC;QACxC,MAAM,MAAM,GAAG,CA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KAAK,GAAG,EAAE;gBACjB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;aAC3B;iBAAM,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,EAAE;gBACxB,QAAQ,IAAI,CAAC,KAAK,EAAE;oBAClB,KAAK,OAAO;wBACV,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;wBACrB,MAAM;oBACR,KAAK,OAAO;wBACV,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;wBACrB,MAAM;iBACT;gBACD,IAAI,CAAC,UAAU,EAAE,CAAC;aACnB;QACH,CAAC,CAAC;QACF,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED,OAAO;QAEL,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAG/C,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAInE,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QAC3E,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QACvE,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAG7E,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAChE,CAAC;CACF;AAvPD,8BAuPC","file":"debug-tool.js","sourcesContent":["import type { FederatedPointerEvent, IStage, IRect, IGraphic } from '@visactor/vrender';\nimport { createRect, getTheme } from '@visactor/vrender';\nimport JSONFormatter from 'json-formatter-js';\n\nexport interface DebugToolOptions {\n container?: HTMLElement;\n infoPosition?: 'tl' | 'tr' | 'bl' | 'br';\n infoWidth?: number;\n infoHeight?: number;\n mode?: 'hover' | 'click';\n customGrapicKeys?: string[];\n}\n\nexport class DebugTool {\n _stage: IStage;\n _infoContainer: HTMLElement;\n _highlightRect: HTMLElement;\n _target: IGraphic;\n // _rect: IRect;\n _mode: 'hover' | 'click' = 'hover';\n _customGrapicKeys?: string[];\n _modeTip: HTMLElement;\n _callback: {\n pointermove: (e: FederatedPointerEvent) => void;\n pointerup: (e: FederatedPointerEvent) => void;\n pointerleave: (e: FederatedPointerEvent) => void;\n keydown: (e: KeyboardEvent) => void;\n };\n\n constructor(stage: IStage, options?: DebugToolOptions) {\n this._stage = stage;\n this._callback = {} as any;\n\n if (options?.customGrapicKeys) {\n this._customGrapicKeys = options.customGrapicKeys;\n }\n\n // 创建信息框\n if (options?.container) {\n this._infoContainer = options.container;\n } else {\n this.createInfoContainer(options);\n }\n\n // 创建高亮矩形\n this.createHighlightRect();\n\n // 绑定stage事件\n this.bindStageEvent();\n\n // 绑定键盘事件\n this.bindKeyEvent();\n }\n\n createInfoContainer(options?: DebugToolOptions) {\n const position = options?.infoPosition || 'tr';\n const width = options?.infoWidth || 300;\n const height = options?.infoPosition || 400;\n this._infoContainer = document.createElement('div');\n this._infoContainer.style.position = 'fixed';\n this._infoContainer.style.width = `${width}px`;\n this._infoContainer.style.height = `${height}px`;\n this._infoContainer.style.backgroundColor = 'rgba(210, 210, 210, 0.3)';\n this._infoContainer.style.overflow = 'auto';\n this._infoContainer.style.display = 'none';\n switch (position) {\n case 'tl':\n this._infoContainer.style.top = '0px';\n this._infoContainer.style.left = '0px';\n break;\n case 'tr':\n this._infoContainer.style.top = '0px';\n this._infoContainer.style.right = `0px`;\n break;\n case 'bl':\n this._infoContainer.style.bottom = `0px`;\n this._infoContainer.style.left = '0px';\n break;\n case 'br':\n this._infoContainer.style.bottom = `0px`;\n this._infoContainer.style.right = `0px`;\n break;\n }\n\n // Tip\n // debug 模式:hover(shift + s改变模式;shift + d控制台输出target graphic)\n const tip = document.createElement('div');\n const tipSpan1 = document.createElement('span');\n tipSpan1.innerText = 'debug 模式:';\n tip.appendChild(tipSpan1);\n this._modeTip = document.createElement('span');\n this._modeTip.innerText = this._mode;\n tip.appendChild(this._modeTip);\n const tipSpan2 = document.createElement('span');\n tipSpan2.innerText = '(shift + s改变模式;shift + d控制台输出target graphic)';\n tip.appendChild(tipSpan2);\n this._infoContainer.appendChild(tip);\n\n // document.body.append(this._infoContainer);\n this._stage.window.getContainer().append(this._infoContainer);\n }\n\n createHighlightRect() {\n const container = this._stage.window.getContainer();\n this._highlightRect = document.createElement('div');\n this._highlightRect.style.display = 'absolute';\n this._highlightRect.style.border = '1px solid red';\n this._highlightRect.style.pointerEvents = 'none';\n this._highlightRect.style.position = 'absolute';\n container.appendChild(this._highlightRect);\n }\n\n bindStageEvent() {\n this._callback.pointermove = (e: FederatedPointerEvent) => {\n if (this._mode !== 'hover') {\n // do nothing\n } else if (e.target && (e.target as unknown as IGraphic) !== this._target) {\n // 更新bounds\n this._target = e.target as unknown as IGraphic;\n this.addHighlightBounds(this._target.globalAABBBounds);\n setTimeout(() => {\n this.updateInfo();\n }, 100);\n } else if (!e.target) {\n this._target = undefined;\n // this.removeHighlightBounds();\n this.clearInfo();\n }\n };\n this._stage.addEventListener('pointermove', this._callback.pointermove);\n\n this._callback.pointerup = (e: FederatedPointerEvent) => {\n if (this._mode !== 'click') {\n // do nothing\n } else if (e.target && (e.target as unknown as IGraphic) !== this._target) {\n // 更新bounds\n this._target = e.target as unknown as IGraphic;\n this.addHighlightBounds(this._target.globalAABBBounds);\n setTimeout(() => {\n this.updateInfo();\n }, 100);\n } else if (!e.target) {\n this._target = undefined;\n // this.removeHighlightBounds();\n this.clearInfo();\n }\n };\n this._stage.addEventListener('pointerup', this._callback.pointerup);\n\n this._callback.pointerleave = (e: FederatedPointerEvent) => {\n if (this._mode === 'hover') {\n this._target = undefined;\n // this.removeHighlightBounds();\n this.clearInfo();\n }\n };\n this._stage.addEventListener('pointerleave', this._callback.pointerleave);\n }\n\n addHighlightBounds(bounds: any) {\n // 使用VRender绘制高亮框会导致触发多余渲染,因此使用dom\n // this._rect.setAttributes({\n // x: bounds.x1,\n // y: bounds.y1,\n // width: bounds.width(),\n // height: bounds.height(),\n // visible: true,\n // });\n\n // // 保证rect在最上层\n // this._stage.defaultLayer.appendChild(this._rect);\n // this._stage.renderNextFrame();\n\n this._highlightRect.style.left = `${bounds.x1}px`;\n this._highlightRect.style.top = `${bounds.y1}px`;\n this._highlightRect.style.width = `${bounds.width()}px`;\n this._highlightRect.style.height = `${bounds.height()}px`;\n }\n\n // removeHighlightBounds() {\n // this._rect.setAttribute('visible', false);\n // this._stage.renderNextFrame();\n // }\n\n updateInfo() {\n if (!this._target) {\n return;\n }\n // this._infoContainer.innerHTML = '';\n if (this._infoContainer.children.length > 1) {\n this._infoContainer.removeChild(this._infoContainer.children[1]);\n }\n this._infoContainer.style.display = 'block';\n\n const info = {\n customKeys: {},\n type: this._target.type,\n // role: (this._target as any).role,\n globalX: this._target.globalTransMatrix.e,\n globalY: this._target.globalTransMatrix.f,\n attribute: this._target.attribute,\n theme: getTheme(this._target)[this._target.type],\n target: this._target\n };\n\n if (this._customGrapicKeys) {\n this._customGrapicKeys.forEach(key => {\n info.customKeys[key] = this._target[key];\n });\n } else {\n delete info.customKeys;\n }\n\n const formatter = new JSONFormatter(info, 2);\n this._infoContainer.appendChild(formatter.render());\n }\n\n clearInfo() {\n this._infoContainer.style.display = 'none';\n }\n\n updateMode() {\n this._modeTip.innerText = this._mode;\n }\n\n bindKeyEvent() {\n this._callback.keydown = (e: KeyboardEvent) => {\n if (e.key === 'D') {\n console.log(this._target);\n } else if (e.key === 'S') {\n switch (this._mode) {\n case 'click':\n this._mode = 'hover';\n break;\n case 'hover':\n this._mode = 'click';\n break;\n }\n this.updateMode();\n }\n };\n window.addEventListener('keydown', this._callback.keydown);\n }\n\n release() {\n // 移除信息框\n document.body.removeChild(this._infoContainer);\n\n // 移除高亮框\n this._highlightRect.parentElement.removeChild(this._highlightRect);\n\n // 解绑stage事件\n // this._stage.defaultLayer.removeChild(this._rect);\n this._stage.removeEventListener('pointermove', this._callback.pointermove);\n this._stage.removeEventListener('pointerup', this._callback.pointerup);\n this._stage.removeEventListener('pointerleave', this._callback.pointerleave);\n\n // 解绑键盘事件\n window.removeEventListener('keydown', this._callback.keydown);\n }\n}\n"]}
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", {
10
10
  value: !0
11
11
  }), exports.AdjustColorGroupAfterRenderContribution = exports.AdjustColorGroupBeforeRenderContribution = exports.AdjustPosGroupAfterRenderContribution = exports.AdjustPosGroupBeforeRenderContribution = exports.DashGroupAfterRenderContribution = exports.DashGroupBeforeRenderContribution = exports.renderStroke = exports.getWidthInfo = exports.SplitGroupAfterRenderContribution = exports.SplitGroupBeforeRenderContribution = void 0;
12
12
 
13
- const inversify_1 = require("inversify"), vrender_1 = require("@visactor/vrender"), is_cell_hover_1 = require("../../../state/hover/is-cell-hover");
13
+ const inversify_1 = require("inversify"), vrender_1 = require("@visactor/vrender"), is_cell_hover_1 = require("../../../state/hover/is-cell-hover"), get_cell_merge_1 = require("../../utils/get-cell-merge");
14
14
 
15
15
  let SplitGroupBeforeRenderContribution = class {
16
16
  constructor() {
@@ -32,8 +32,8 @@ let SplitGroupAfterRenderContribution = class {
32
32
  this.order = 0;
33
33
  }
34
34
  drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, fillCb, strokeCb) {
35
- 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.strokeColor} = group.attribute;
36
- 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,
35
+ 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;
36
+ 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,
37
37
  y = Math.floor(y) + .5), renderStroke(group, context, x, y, groupAttribute, stroke, strokeArrayWidth || lineWidth, strokeArrayColor || strokeColor, Math.ceil(width), Math.ceil(height)));
38
38
  }
39
39
  };
@@ -98,7 +98,7 @@ let DashGroupBeforeRenderContribution = class {
98
98
  }
99
99
  drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, fillCb, strokeCb, doFillOrStroke) {
100
100
  const {lineDash: lineDash = groupAttribute.lineDash, stroke: stroke = groupAttribute.stroke, strokeArrayColor: strokeArrayColor = groupAttribute.strokeArrayColor, strokeArrayWidth: strokeArrayWidth = groupAttribute.strokeArrayWidth} = group.attribute;
101
- stroke && Array.isArray(lineDash) && lineDash.length && !Array.isArray(stroke) && !Array.isArray(strokeArrayColor) && !Array.isArray(strokeArrayWidth) && (doFillOrStroke.doStroke = !1);
101
+ stroke && Array.isArray(lineDash) && lineDash.length && !Array.isArray(strokeArrayColor) && !Array.isArray(strokeArrayWidth) && (doFillOrStroke.doStroke = !1);
102
102
  }
103
103
  };
104
104
 
@@ -112,7 +112,7 @@ let DashGroupAfterRenderContribution = class {
112
112
  }
113
113
  drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, fillCb, strokeCb) {
114
114
  const {lineDash: lineDash = groupAttribute.lineDash, stroke: stroke = groupAttribute.stroke, strokeArrayColor: strokeArrayColor = groupAttribute.strokeArrayColor, strokeArrayWidth: strokeArrayWidth = groupAttribute.strokeArrayWidth, lineWidth: lineWidth = groupAttribute.lineWidth} = group.attribute;
115
- if (!stroke || !Array.isArray(lineDash) || !lineDash.length || Array.isArray(stroke) || Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth)) return;
115
+ if (!stroke || !Array.isArray(lineDash) || !lineDash.length || Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth)) return;
116
116
  let {width: width = groupAttribute.width, height: height = groupAttribute.height} = group.attribute;
117
117
  width = Math.ceil(width), height = Math.ceil(height), 1 & lineWidth && (x = Math.floor(x) + .5,
118
118
  y = Math.floor(y) + .5), context.setStrokeStyle(group, group.attribute, x, y, groupAttribute),
@@ -136,7 +136,7 @@ let AdjustPosGroupBeforeRenderContribution = class {
136
136
  }
137
137
  drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, fillCb, strokeCb, doFillOrStroke) {
138
138
  const {lineWidth: lineWidth = groupAttribute.lineWidth, stroke: stroke = groupAttribute.stroke, lineDash: lineDash = groupAttribute.lineDash, strokeArrayWidth: strokeArrayWidth = groupAttribute.strokeArrayWidth, strokeArrayColor: strokeArrayColor = groupAttribute.strokeArrayColor} = group.attribute;
139
- stroke && Array.isArray(lineDash) && !lineDash.length && !Array.isArray(stroke) && !Array.isArray(strokeArrayColor) && !Array.isArray(strokeArrayWidth) && 1 & lineWidth && (doFillOrStroke.doStroke = !1);
139
+ stroke && Array.isArray(lineDash) && !lineDash.length && !Array.isArray(strokeArrayColor) && !Array.isArray(strokeArrayWidth) && 1 & lineWidth && (doFillOrStroke.doStroke = !1);
140
140
  }
141
141
  };
142
142
 
@@ -151,10 +151,14 @@ let AdjustPosGroupAfterRenderContribution = class {
151
151
  drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, fillCb, strokeCb) {
152
152
  const {lineWidth: lineWidth = groupAttribute.lineWidth, stroke: stroke = groupAttribute.stroke, lineDash: lineDash = groupAttribute.lineDash, strokeArrayWidth: strokeArrayWidth = groupAttribute.strokeArrayWidth, strokeArrayColor: strokeArrayColor = groupAttribute.strokeArrayColor} = group.attribute;
153
153
  let {width: width = groupAttribute.width, height: height = groupAttribute.height} = group.attribute;
154
- if (width = Math.ceil(width), height = Math.ceil(height), stroke && Array.isArray(lineDash) && !lineDash.length && !Array.isArray(stroke) && !Array.isArray(strokeArrayColor) && !Array.isArray(strokeArrayWidth) && 1 & lineWidth) {
155
- const table = group.stage.table, col = group.col, row = group.row;
156
- (table && col === table.colCount - 1 || table && col === table.frozenColCount - 1 && table.scrollLeft) && (width -= 1),
157
- (table && row === table.rowCount - 1 || table && row === table.frozenRowCount - 1 && table.scrollTop) && (height -= 1),
154
+ if (width = Math.ceil(width), height = Math.ceil(height), stroke && Array.isArray(lineDash) && !lineDash.length && !Array.isArray(strokeArrayColor) && !Array.isArray(strokeArrayWidth) && 1 & lineWidth) {
155
+ if ("cell" === group.role) {
156
+ const table = group.stage.table;
157
+ let col = group.col, row = group.row;
158
+ const mergeInfo = (0, get_cell_merge_1.getCellMergeInfo)(table, col, row);
159
+ mergeInfo && (col = mergeInfo.end.col, row = mergeInfo.end.row), (table && col === table.colCount - 1 || table && col === table.frozenColCount - 1 && table.scrollLeft) && (width -= 1),
160
+ (table && row === table.rowCount - 1 || table && row === table.frozenRowCount - 1 && table.scrollTop) && (height -= 1);
161
+ }
158
162
  context.beginPath(), x = Math.floor(x) + .5, y = Math.floor(y) + .5, context.rect(x, y, width, height),
159
163
  context.setStrokeStyle(group, group.attribute, x, y, groupAttribute), context.stroke();
160
164
  }
@@ -172,7 +176,7 @@ let AdjustColorGroupBeforeRenderContribution = class {
172
176
  drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, fillCb, strokeCb, doFillOrStroke) {
173
177
  if ("cell" === group.role) {
174
178
  const table = group.stage.table, hoverColor = (0, is_cell_hover_1.getCellHoverColor)(group, table);
175
- hoverColor && (group.oldColor = group.attribute.fillColor, group.attribute.fillColor = hoverColor);
179
+ hoverColor && (group.oldColor = group.attribute.fill, group.attribute.fill = hoverColor);
176
180
  }
177
181
  }
178
182
  };
@@ -186,7 +190,7 @@ let AdjustColorGroupAfterRenderContribution = class {
186
190
  this.order = 0;
187
191
  }
188
192
  drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, fillCb, strokeCb) {
189
- "oldColor" in group && (group.attribute.fillColor = group.oldColor, delete group.oldColor);
193
+ "oldColor" in group && (group.attribute.fill = group.oldColor, delete group.oldColor);
190
194
  }
191
195
  };
192
196
 
@@ -1 +1 @@
1
- {"version":3,"sources":["scenegraph/graphic/contributions/group-contribution-render.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yCAAuC;AAUvC,+CAA+D;AAE/D,sEAAuE;AAQhE,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;IAAxC;QACL,SAAI,GAA+B,oCAA0B,CAAC,gBAAgB,CAAC;QAC/E,aAAQ,GAAG,IAAI,CAAC;QAChB,UAAK,GAAG,CAAC,CAAC;IAkEZ,CAAC;IAjEC,SAAS,CACP,KAAa,EACb,OAAmB,EACnB,CAAS,EACT,CAAS,EACT,MAAe,EACf,QAAiB,EACjB,QAAiB,EACjB,QAAiB,EACjB,cAAgD,EAChD,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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QAIY;QAGZ,IAAI,UAAU,IAAI,KAAK,EAAE;YACvB,KAAK,CAAC,SAAS,CAAC,SAAS,GAAG,KAAK,CAAC,QAAe,CAAC;YAClD,OAAO,KAAK,CAAC,QAAQ,CAAC;SACvB;IACH,CAAC;CACF,CAAA;AA/BY,uCAAuC;IADnD,IAAA,sBAAU,GAAE;GACA,uCAAuC,CA+BnD;AA/BY,0FAAuC","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';\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.strokeColor\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(stroke) || 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(stroke) &&\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(stroke) ||\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(stroke) && // 非分段渲染\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(stroke) && // 非分段渲染\n !Array.isArray(strokeArrayColor) &&\n !Array.isArray(strokeArrayWidth) &&\n lineWidth & 1 // 奇数线宽\n ) {\n const table = (group.stage as any).table as BaseTableAPI;\n const col = (group as any).col as number;\n const row = (group as any).row as number;\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\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.fillColor;\n group.attribute.fillColor = 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.fillColor = 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,yCAAuC;AAUvC,+CAA+D;AAE/D,sEAAuE;AAGvE,+DAA8D;AAOvD,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;IAAxC;QACL,SAAI,GAA+B,oCAA0B,CAAC,gBAAgB,CAAC;QAC/E,aAAQ,GAAG,IAAI,CAAC;QAChB,UAAK,GAAG,CAAC,CAAC;IAkEZ,CAAC;IAjEC,SAAS,CACP,KAAa,EACb,OAAmB,EACnB,CAAS,EACT,CAAS,EACT,MAAe,EACf,QAAiB,EACjB,QAAiB,EACjB,QAAiB,EACjB,cAAgD,EAChD,MAIY,EACZ,QAIY,EACZ,cAAuD;QAEvD,M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GAA7C,MAAM,uCAAuC;IAA7C;QACL,SAAI,GAA+B,oCAA0B,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,IAAA,sBAAU,GAAE;GACA,uCAAuC,CA+BnD;AA/BY,0FAAuC","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 { getPadding } 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"]}
@@ -7,10 +7,10 @@ Object.defineProperty(exports, "__esModule", {
7
7
  const inversify_1 = require("inversify"), vrender_1 = require("@visactor/vrender"), chart_render_1 = require("./chart-render"), image_contribution_render_1 = require("./image-contribution-render"), rect_contribution_render_1 = require("./rect-contribution-render"), group_contribution_render_1 = require("./group-contribution-render");
8
8
 
9
9
  exports.default = new inversify_1.ContainerModule(((bind, unbind, isBound, rebind) => {
10
- bind(rect_contribution_render_1.SplitRectBeforeRenderContribution).toSelf().inSingletonScope(),
11
- bind(vrender_1.RectRenderContribution).toService(rect_contribution_render_1.SplitRectBeforeRenderContribution),
12
- bind(rect_contribution_render_1.SplitRectAfterRenderContribution).toSelf().inSingletonScope(),
13
- bind(vrender_1.RectRenderContribution).toService(rect_contribution_render_1.SplitRectAfterRenderContribution),
10
+ isBound(vrender_1.SplitRectBeforeRenderContribution) ? rebind(vrender_1.SplitRectBeforeRenderContribution).to(rect_contribution_render_1.SplitRectBeforeRenderContribution).inSingletonScope() : (bind(rect_contribution_render_1.SplitRectBeforeRenderContribution).toSelf().inSingletonScope(),
11
+ bind(vrender_1.RectRenderContribution).toService(rect_contribution_render_1.SplitRectBeforeRenderContribution)),
12
+ isBound(vrender_1.SplitRectAfterRenderContribution) ? rebind(vrender_1.SplitRectAfterRenderContribution).to(rect_contribution_render_1.SplitRectAfterRenderContribution).inSingletonScope() : (bind(rect_contribution_render_1.SplitRectAfterRenderContribution).toSelf().inSingletonScope(),
13
+ bind(vrender_1.RectRenderContribution).toService(rect_contribution_render_1.SplitRectAfterRenderContribution)),
14
14
  bind(group_contribution_render_1.SplitGroupAfterRenderContribution).toSelf().inSingletonScope(),
15
15
  bind(vrender_1.GroupRenderContribution).toService(group_contribution_render_1.SplitGroupAfterRenderContribution),
16
16
  bind(group_contribution_render_1.SplitGroupBeforeRenderContribution).toSelf().inSingletonScope(),