@visactor/vrender-core 0.19.6-alpha.3 → 0.19.7-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (760) hide show
  1. package/cjs/allocator/bounds-allocate.js +1 -1
  2. package/cjs/allocator/bounds-allocate.js.map +1 -1
  3. package/cjs/allocator/canvas-allocate.js +9 -11
  4. package/cjs/allocator/canvas-allocate.js.map +1 -1
  5. package/cjs/allocator/graphic-allocate.js +9 -5
  6. package/cjs/allocator/graphic-allocate.js.map +1 -1
  7. package/cjs/allocator/matrix-allocate.js +6 -2
  8. package/cjs/allocator/matrix-allocate.js.map +1 -1
  9. package/cjs/animate/Ticker/default-ticker.js +14 -25
  10. package/cjs/animate/Ticker/default-ticker.js.map +1 -1
  11. package/cjs/animate/animate.js +7 -8
  12. package/cjs/animate/animate.js.map +1 -1
  13. package/cjs/animate/custom-animate.d.ts +1 -0
  14. package/cjs/animate/custom-animate.js +82 -67
  15. package/cjs/animate/custom-animate.js.map +1 -1
  16. package/cjs/animate/easing.js +8 -19
  17. package/cjs/animate/easing.js.map +1 -1
  18. package/cjs/animate/morphing.js +23 -20
  19. package/cjs/animate/morphing.js.map +1 -1
  20. package/cjs/application.js +1 -7
  21. package/cjs/application.js.map +1 -1
  22. package/cjs/canvas/conical-gradient.js +5 -12
  23. package/cjs/canvas/conical-gradient.js.map +1 -1
  24. package/cjs/canvas/contributions/base-canvas.js +7 -19
  25. package/cjs/canvas/contributions/base-canvas.js.map +1 -1
  26. package/cjs/color-string/interpolate.js +3 -5
  27. package/cjs/color-string/interpolate.js.map +1 -1
  28. package/cjs/color-string/store.js +1 -3
  29. package/cjs/color-string/store.js.map +1 -1
  30. package/cjs/common/bounds-context.js +0 -1
  31. package/cjs/common/bounds-context.js.map +1 -1
  32. package/cjs/common/canvas-utils.js +6 -3
  33. package/cjs/common/canvas-utils.js.map +1 -1
  34. package/cjs/common/contribution-provider.js +0 -3
  35. package/cjs/common/contribution-provider.js.map +1 -1
  36. package/cjs/common/custom-path2d.js +1 -7
  37. package/cjs/common/custom-path2d.js.map +1 -1
  38. package/cjs/common/generator.js +1 -2
  39. package/cjs/common/generator.js.map +1 -1
  40. package/cjs/common/inversify/binding.js +0 -12
  41. package/cjs/common/inversify/binding.js.map +1 -1
  42. package/cjs/common/inversify/container.js +0 -4
  43. package/cjs/common/inversify/container.js.map +1 -1
  44. package/cjs/common/inversify/cotainer-module.js +0 -2
  45. package/cjs/common/inversify/cotainer-module.js.map +1 -1
  46. package/cjs/common/inversify/meta-data.js +0 -2
  47. package/cjs/common/inversify/meta-data.js.map +1 -1
  48. package/cjs/common/inversify/syntax/binding_in_syntax.js +0 -1
  49. package/cjs/common/inversify/syntax/binding_in_syntax.js.map +1 -1
  50. package/cjs/common/inversify/syntax/binding_to_syntax.js +0 -1
  51. package/cjs/common/inversify/syntax/binding_to_syntax.js.map +1 -1
  52. package/cjs/common/inversify-lite/annotation/lazy_service_identifier.js +0 -1
  53. package/cjs/common/inversify-lite/annotation/lazy_service_identifier.js.map +1 -1
  54. package/cjs/common/inversify-lite/bindings/binding.js +0 -14
  55. package/cjs/common/inversify-lite/bindings/binding.js.map +1 -1
  56. package/cjs/common/inversify-lite/container/container.js +46 -22
  57. package/cjs/common/inversify-lite/container/container.js.map +1 -1
  58. package/cjs/common/inversify-lite/container/container_module.js +0 -4
  59. package/cjs/common/inversify-lite/container/container_module.js.map +1 -1
  60. package/cjs/common/inversify-lite/container/lookup.js +0 -1
  61. package/cjs/common/inversify-lite/container/lookup.js.map +1 -1
  62. package/cjs/common/inversify-lite/planning/context.js +0 -4
  63. package/cjs/common/inversify-lite/planning/context.js.map +1 -1
  64. package/cjs/common/inversify-lite/planning/metadata.js +0 -2
  65. package/cjs/common/inversify-lite/planning/metadata.js.map +1 -1
  66. package/cjs/common/inversify-lite/planning/plan.js +0 -2
  67. package/cjs/common/inversify-lite/planning/plan.js.map +1 -1
  68. package/cjs/common/inversify-lite/planning/queryable_string.js +0 -1
  69. package/cjs/common/inversify-lite/planning/queryable_string.js.map +1 -1
  70. package/cjs/common/inversify-lite/planning/request.js +0 -8
  71. package/cjs/common/inversify-lite/planning/request.js.map +1 -1
  72. package/cjs/common/inversify-lite/planning/target.js +0 -7
  73. package/cjs/common/inversify-lite/planning/target.js.map +1 -1
  74. package/cjs/common/inversify-lite/resolution/instantiation.js +42 -16
  75. package/cjs/common/inversify-lite/resolution/instantiation.js.map +1 -1
  76. package/cjs/common/inversify-lite/scope/scope.js +29 -3
  77. package/cjs/common/inversify-lite/scope/scope.js.map +1 -1
  78. package/cjs/common/inversify-lite/syntax/binding_in_syntax.js +0 -1
  79. package/cjs/common/inversify-lite/syntax/binding_in_syntax.js.map +1 -1
  80. package/cjs/common/inversify-lite/syntax/binding_in_when_on_syntax.js +0 -3
  81. package/cjs/common/inversify-lite/syntax/binding_in_when_on_syntax.js.map +1 -1
  82. package/cjs/common/inversify-lite/syntax/binding_on_syntax.js +0 -1
  83. package/cjs/common/inversify-lite/syntax/binding_on_syntax.js.map +1 -1
  84. package/cjs/common/inversify-lite/syntax/binding_to_syntax.js +0 -1
  85. package/cjs/common/inversify-lite/syntax/binding_to_syntax.js.map +1 -1
  86. package/cjs/common/inversify-lite/syntax/binding_when_on_syntax.js +0 -2
  87. package/cjs/common/inversify-lite/syntax/binding_when_on_syntax.js.map +1 -1
  88. package/cjs/common/inversify-lite/syntax/binding_when_syntax.js +0 -1
  89. package/cjs/common/inversify-lite/syntax/binding_when_syntax.js.map +1 -1
  90. package/cjs/common/polygon.js +2 -1
  91. package/cjs/common/polygon.js.map +1 -1
  92. package/cjs/common/render-area.js +3 -2
  93. package/cjs/common/render-area.js.map +1 -1
  94. package/cjs/common/render-curve.js +8 -4
  95. package/cjs/common/render-curve.js.map +1 -1
  96. package/cjs/common/seg-context.js +3 -12
  97. package/cjs/common/seg-context.js.map +1 -1
  98. package/cjs/common/segment/basis.js +0 -13
  99. package/cjs/common/segment/basis.js.map +1 -1
  100. package/cjs/common/segment/common.js +2 -2
  101. package/cjs/common/segment/common.js.map +1 -1
  102. package/cjs/common/segment/curve/arc.js +2 -2
  103. package/cjs/common/segment/curve/arc.js.map +1 -1
  104. package/cjs/common/segment/curve/base.js +0 -4
  105. package/cjs/common/segment/curve/base.js.map +1 -1
  106. package/cjs/common/segment/curve/cubic-bezier.js +2 -2
  107. package/cjs/common/segment/curve/cubic-bezier.js.map +1 -1
  108. package/cjs/common/segment/curve/curve-context.js +0 -4
  109. package/cjs/common/segment/curve/curve-context.js.map +1 -1
  110. package/cjs/common/segment/curve/ellipse.js +3 -3
  111. package/cjs/common/segment/curve/ellipse.js.map +1 -1
  112. package/cjs/common/segment/curve/line.js +1 -2
  113. package/cjs/common/segment/curve/line.js.map +1 -1
  114. package/cjs/common/segment/curve/move.js +1 -2
  115. package/cjs/common/segment/curve/move.js.map +1 -1
  116. package/cjs/common/segment/curve/path.js +0 -2
  117. package/cjs/common/segment/curve/path.js.map +1 -1
  118. package/cjs/common/segment/curve/quadratic-bezier.js +2 -2
  119. package/cjs/common/segment/curve/quadratic-bezier.js.map +1 -1
  120. package/cjs/common/segment/linear.js +0 -10
  121. package/cjs/common/segment/linear.js.map +1 -1
  122. package/cjs/common/segment/monotone.js +0 -13
  123. package/cjs/common/segment/monotone.js.map +1 -1
  124. package/cjs/common/segment/step.js +2 -13
  125. package/cjs/common/segment/step.js.map +1 -1
  126. package/cjs/common/sort.js +34 -3
  127. package/cjs/common/sort.js.map +1 -1
  128. package/cjs/common/split-path.js +11 -4
  129. package/cjs/common/split-path.js.map +1 -1
  130. package/cjs/common/utils.js +4 -8
  131. package/cjs/common/utils.js.map +1 -1
  132. package/cjs/common/xml/parser.js +2 -3
  133. package/cjs/common/xml/parser.js.map +1 -1
  134. package/cjs/core/camera.js +4 -11
  135. package/cjs/core/camera.js.map +1 -1
  136. package/cjs/core/contributions/env/base-contribution.js +0 -6
  137. package/cjs/core/contributions/env/base-contribution.js.map +1 -1
  138. package/cjs/core/contributions/layerHandler/canvas2d-contribution.js +11 -20
  139. package/cjs/core/contributions/layerHandler/canvas2d-contribution.js.map +1 -1
  140. package/cjs/core/contributions/layerHandler/empty-contribution.js +8 -8
  141. package/cjs/core/contributions/layerHandler/empty-contribution.js.map +1 -1
  142. package/cjs/core/contributions/layerHandler/offscreen2d-contribution.js +6 -5
  143. package/cjs/core/contributions/layerHandler/offscreen2d-contribution.js.map +1 -1
  144. package/cjs/core/contributions/textMeasure/AtextMeasure.js +8 -11
  145. package/cjs/core/contributions/textMeasure/AtextMeasure.js.map +1 -1
  146. package/cjs/core/contributions/textMeasure/layout.js +0 -3
  147. package/cjs/core/contributions/textMeasure/layout.js.map +1 -1
  148. package/cjs/core/contributions/window/base-contribution.js +0 -2
  149. package/cjs/core/contributions/window/base-contribution.js.map +1 -1
  150. package/cjs/core/global.js +0 -8
  151. package/cjs/core/global.js.map +1 -1
  152. package/cjs/core/graphic-utils.js +5 -16
  153. package/cjs/core/graphic-utils.js.map +1 -1
  154. package/cjs/core/layer-service.js +7 -7
  155. package/cjs/core/layer-service.js.map +1 -1
  156. package/cjs/core/layer.js +9 -7
  157. package/cjs/core/layer.js.map +1 -1
  158. package/cjs/core/stage.js +34 -68
  159. package/cjs/core/stage.js.map +1 -1
  160. package/cjs/core/window.js +13 -16
  161. package/cjs/core/window.js.map +1 -1
  162. package/cjs/event/event-manager.js +145 -153
  163. package/cjs/event/event-manager.js.map +1 -1
  164. package/cjs/event/event-system.js +43 -60
  165. package/cjs/event/event-system.js.map +1 -1
  166. package/cjs/event/event-target.js +3 -1
  167. package/cjs/event/event-target.js.map +1 -1
  168. package/cjs/event/federated-event/base-event.js +15 -43
  169. package/cjs/event/federated-event/base-event.js.map +1 -1
  170. package/cjs/event/federated-event/mouse-event.js +18 -27
  171. package/cjs/event/federated-event/mouse-event.js.map +1 -1
  172. package/cjs/event/federated-event/pointer-event.js +8 -12
  173. package/cjs/event/federated-event/pointer-event.js.map +1 -1
  174. package/cjs/event/federated-event/wheel-event.js +10 -13
  175. package/cjs/event/federated-event/wheel-event.js.map +1 -1
  176. package/cjs/graphic/arc.js +5 -10
  177. package/cjs/graphic/arc.js.map +1 -1
  178. package/cjs/graphic/arc3d.js +4 -7
  179. package/cjs/graphic/arc3d.js.map +1 -1
  180. package/cjs/graphic/area.js +9 -14
  181. package/cjs/graphic/area.js.map +1 -1
  182. package/cjs/graphic/builtin-symbol/arrow.js +3 -2
  183. package/cjs/graphic/builtin-symbol/arrow.js.map +1 -1
  184. package/cjs/graphic/builtin-symbol/arrow2-down.js +3 -2
  185. package/cjs/graphic/builtin-symbol/arrow2-down.js.map +1 -1
  186. package/cjs/graphic/builtin-symbol/arrow2-left.js +3 -2
  187. package/cjs/graphic/builtin-symbol/arrow2-left.js.map +1 -1
  188. package/cjs/graphic/builtin-symbol/arrow2-right.js +3 -2
  189. package/cjs/graphic/builtin-symbol/arrow2-right.js.map +1 -1
  190. package/cjs/graphic/builtin-symbol/arrow2-up.js +3 -2
  191. package/cjs/graphic/builtin-symbol/arrow2-up.js.map +1 -1
  192. package/cjs/graphic/builtin-symbol/circle.js +3 -2
  193. package/cjs/graphic/builtin-symbol/circle.js.map +1 -1
  194. package/cjs/graphic/builtin-symbol/close.js +3 -2
  195. package/cjs/graphic/builtin-symbol/close.js.map +1 -1
  196. package/cjs/graphic/builtin-symbol/cross.js +3 -2
  197. package/cjs/graphic/builtin-symbol/cross.js.map +1 -1
  198. package/cjs/graphic/builtin-symbol/diamond.js +3 -2
  199. package/cjs/graphic/builtin-symbol/diamond.js.map +1 -1
  200. package/cjs/graphic/builtin-symbol/line-h.js +3 -2
  201. package/cjs/graphic/builtin-symbol/line-h.js.map +1 -1
  202. package/cjs/graphic/builtin-symbol/line-v.js +3 -2
  203. package/cjs/graphic/builtin-symbol/line-v.js.map +1 -1
  204. package/cjs/graphic/builtin-symbol/rect.js +3 -2
  205. package/cjs/graphic/builtin-symbol/rect.js.map +1 -1
  206. package/cjs/graphic/builtin-symbol/square.js +3 -2
  207. package/cjs/graphic/builtin-symbol/square.js.map +1 -1
  208. package/cjs/graphic/builtin-symbol/star.js +3 -2
  209. package/cjs/graphic/builtin-symbol/star.js.map +1 -1
  210. package/cjs/graphic/builtin-symbol/stroke.js +3 -2
  211. package/cjs/graphic/builtin-symbol/stroke.js.map +1 -1
  212. package/cjs/graphic/builtin-symbol/thin-triangle.js +3 -2
  213. package/cjs/graphic/builtin-symbol/thin-triangle.js.map +1 -1
  214. package/cjs/graphic/builtin-symbol/triangle-down.js +3 -2
  215. package/cjs/graphic/builtin-symbol/triangle-down.js.map +1 -1
  216. package/cjs/graphic/builtin-symbol/triangle-left.js +3 -2
  217. package/cjs/graphic/builtin-symbol/triangle-left.js.map +1 -1
  218. package/cjs/graphic/builtin-symbol/triangle-right.js +3 -2
  219. package/cjs/graphic/builtin-symbol/triangle-right.js.map +1 -1
  220. package/cjs/graphic/builtin-symbol/triangle-up.js +3 -2
  221. package/cjs/graphic/builtin-symbol/triangle-up.js.map +1 -1
  222. package/cjs/graphic/builtin-symbol/triangle.js +3 -1
  223. package/cjs/graphic/builtin-symbol/triangle.js.map +1 -1
  224. package/cjs/graphic/builtin-symbol/utils.js +1 -6
  225. package/cjs/graphic/builtin-symbol/utils.js.map +1 -1
  226. package/cjs/graphic/builtin-symbol/wedge.js +3 -2
  227. package/cjs/graphic/builtin-symbol/wedge.js.map +1 -1
  228. package/cjs/graphic/builtin-symbol/wye.js +3 -2
  229. package/cjs/graphic/builtin-symbol/wye.js.map +1 -1
  230. package/cjs/graphic/circle.js +6 -8
  231. package/cjs/graphic/circle.js.map +1 -1
  232. package/cjs/graphic/config.js +32 -58
  233. package/cjs/graphic/config.js.map +1 -1
  234. package/cjs/graphic/glyph.js +9 -10
  235. package/cjs/graphic/glyph.js.map +1 -1
  236. package/cjs/graphic/graphic-service/graphic-service.js +8 -12
  237. package/cjs/graphic/graphic-service/graphic-service.js.map +1 -1
  238. package/cjs/graphic/graphic.js +44 -27
  239. package/cjs/graphic/graphic.js.map +1 -1
  240. package/cjs/graphic/group.js +5 -9
  241. package/cjs/graphic/group.js.map +1 -1
  242. package/cjs/graphic/image.js +16 -18
  243. package/cjs/graphic/image.js.map +1 -1
  244. package/cjs/graphic/line.js +6 -11
  245. package/cjs/graphic/line.js.map +1 -1
  246. package/cjs/graphic/node-tree.js +44 -25
  247. package/cjs/graphic/node-tree.js.map +1 -1
  248. package/cjs/graphic/path.js +6 -12
  249. package/cjs/graphic/path.js.map +1 -1
  250. package/cjs/graphic/polygon.js +4 -7
  251. package/cjs/graphic/polygon.js.map +1 -1
  252. package/cjs/graphic/pyramid3d.js +3 -4
  253. package/cjs/graphic/pyramid3d.js.map +1 -1
  254. package/cjs/graphic/rect.js +3 -7
  255. package/cjs/graphic/rect.js.map +1 -1
  256. package/cjs/graphic/rect3d.js +4 -5
  257. package/cjs/graphic/rect3d.js.map +1 -1
  258. package/cjs/graphic/richtext/frame.js +0 -19
  259. package/cjs/graphic/richtext/frame.js.map +1 -1
  260. package/cjs/graphic/richtext/icon.js +6 -14
  261. package/cjs/graphic/richtext/icon.js.map +1 -1
  262. package/cjs/graphic/richtext/line.js +2 -14
  263. package/cjs/graphic/richtext/line.js.map +1 -1
  264. package/cjs/graphic/richtext/paragraph.js +0 -22
  265. package/cjs/graphic/richtext/paragraph.js.map +1 -1
  266. package/cjs/graphic/richtext/utils.js +2 -1
  267. package/cjs/graphic/richtext/utils.js.map +1 -1
  268. package/cjs/graphic/richtext/wrapper.js +0 -12
  269. package/cjs/graphic/richtext/wrapper.js.map +1 -1
  270. package/cjs/graphic/richtext.js +45 -38
  271. package/cjs/graphic/richtext.js.map +1 -1
  272. package/cjs/graphic/shadow-root.js +1 -2
  273. package/cjs/graphic/shadow-root.js.map +1 -1
  274. package/cjs/graphic/symbol.js +5 -12
  275. package/cjs/graphic/symbol.js.map +1 -1
  276. package/cjs/graphic/text.js +45 -45
  277. package/cjs/graphic/text.js.map +1 -1
  278. package/cjs/graphic/theme.js +0 -4
  279. package/cjs/graphic/theme.js.map +1 -1
  280. package/cjs/graphic/tools.js +44 -16
  281. package/cjs/graphic/tools.js.map +1 -1
  282. package/cjs/graphic/wrap-text.js +7 -7
  283. package/cjs/graphic/wrap-text.js.map +1 -1
  284. package/cjs/picker/global-picker-service.js +0 -1
  285. package/cjs/picker/global-picker-service.js.map +1 -1
  286. package/cjs/picker/pick-interceptor.js +15 -5
  287. package/cjs/picker/pick-interceptor.js.map +1 -1
  288. package/cjs/picker/picker-service.js +5 -5
  289. package/cjs/picker/picker-service.js.map +1 -1
  290. package/cjs/plugins/builtin-plugin/3dview-transform-plugin.js +20 -26
  291. package/cjs/plugins/builtin-plugin/3dview-transform-plugin.js.map +1 -1
  292. package/cjs/plugins/builtin-plugin/auto-render-plugin.js +4 -5
  293. package/cjs/plugins/builtin-plugin/auto-render-plugin.js.map +1 -1
  294. package/cjs/plugins/builtin-plugin/dirty-bounds-plugin.js +4 -5
  295. package/cjs/plugins/builtin-plugin/dirty-bounds-plugin.js.map +1 -1
  296. package/cjs/plugins/builtin-plugin/flex-layout-plugin.js +8 -11
  297. package/cjs/plugins/builtin-plugin/flex-layout-plugin.js.map +1 -1
  298. package/cjs/plugins/builtin-plugin/html-attribute-plugin.js +19 -28
  299. package/cjs/plugins/builtin-plugin/html-attribute-plugin.js.map +1 -1
  300. package/cjs/plugins/builtin-plugin/incremental-auto-render-plugin.js +8 -12
  301. package/cjs/plugins/builtin-plugin/incremental-auto-render-plugin.js.map +1 -1
  302. package/cjs/plugins/builtin-plugin/react-attribute-plugin.js +7 -6
  303. package/cjs/plugins/builtin-plugin/react-attribute-plugin.js.map +1 -1
  304. package/cjs/plugins/plugin-service.js +0 -1
  305. package/cjs/plugins/plugin-service.js.map +1 -1
  306. package/cjs/render/contributions/render/arc-render.js +4 -6
  307. package/cjs/render/contributions/render/arc-render.js.map +1 -1
  308. package/cjs/render/contributions/render/arc3d-render.js +7 -5
  309. package/cjs/render/contributions/render/arc3d-render.js.map +1 -1
  310. package/cjs/render/contributions/render/area-render.js +23 -21
  311. package/cjs/render/contributions/render/area-render.js.map +1 -1
  312. package/cjs/render/contributions/render/base-render.js +0 -5
  313. package/cjs/render/contributions/render/base-render.js.map +1 -1
  314. package/cjs/render/contributions/render/circle-render.js +4 -6
  315. package/cjs/render/contributions/render/circle-render.js.map +1 -1
  316. package/cjs/render/contributions/render/contributions/arc-contribution-render.js +4 -3
  317. package/cjs/render/contributions/render/contributions/arc-contribution-render.js.map +1 -1
  318. package/cjs/render/contributions/render/contributions/area-texture-contribution-render.js +9 -6
  319. package/cjs/render/contributions/render/contributions/area-texture-contribution-render.js.map +1 -1
  320. package/cjs/render/contributions/render/contributions/base-contribution-render.js +8 -10
  321. package/cjs/render/contributions/render/contributions/base-contribution-render.js.map +1 -1
  322. package/cjs/render/contributions/render/contributions/base-texture-contribution-render.js +4 -4
  323. package/cjs/render/contributions/render/contributions/base-texture-contribution-render.js.map +1 -1
  324. package/cjs/render/contributions/render/contributions/circle-contribution-render.js +4 -3
  325. package/cjs/render/contributions/render/contributions/circle-contribution-render.js.map +1 -1
  326. package/cjs/render/contributions/render/contributions/group-contribution-render.js +3 -1
  327. package/cjs/render/contributions/render/contributions/group-contribution-render.js.map +1 -1
  328. package/cjs/render/contributions/render/contributions/image-contribution-render.js +3 -1
  329. package/cjs/render/contributions/render/contributions/image-contribution-render.js.map +1 -1
  330. package/cjs/render/contributions/render/contributions/rect-contribution-render.js +14 -11
  331. package/cjs/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
  332. package/cjs/render/contributions/render/contributions/symbol-contribution-render.js +4 -3
  333. package/cjs/render/contributions/render/contributions/symbol-contribution-render.js.map +1 -1
  334. package/cjs/render/contributions/render/contributions/text-contribution-render.js +8 -6
  335. package/cjs/render/contributions/render/contributions/text-contribution-render.js.map +1 -1
  336. package/cjs/render/contributions/render/draw-contribution.js +14 -12
  337. package/cjs/render/contributions/render/draw-contribution.js.map +1 -1
  338. package/cjs/render/contributions/render/draw-interceptor.js +21 -11
  339. package/cjs/render/contributions/render/draw-interceptor.js.map +1 -1
  340. package/cjs/render/contributions/render/glyph-render.js +3 -2
  341. package/cjs/render/contributions/render/glyph-render.js.map +1 -1
  342. package/cjs/render/contributions/render/graphic-render.js +1 -4
  343. package/cjs/render/contributions/render/graphic-render.js.map +1 -1
  344. package/cjs/render/contributions/render/group-render.js +3 -7
  345. package/cjs/render/contributions/render/group-render.js.map +1 -1
  346. package/cjs/render/contributions/render/image-render.js +2 -4
  347. package/cjs/render/contributions/render/image-render.js.map +1 -1
  348. package/cjs/render/contributions/render/incremental-area-render.js +3 -1
  349. package/cjs/render/contributions/render/incremental-area-render.js.map +1 -1
  350. package/cjs/render/contributions/render/incremental-draw-contribution.js +109 -80
  351. package/cjs/render/contributions/render/incremental-draw-contribution.js.map +1 -1
  352. package/cjs/render/contributions/render/incremental-line-render.js +3 -1
  353. package/cjs/render/contributions/render/incremental-line-render.js.map +1 -1
  354. package/cjs/render/contributions/render/line-render.js +16 -12
  355. package/cjs/render/contributions/render/line-render.js.map +1 -1
  356. package/cjs/render/contributions/render/path-render.js +7 -8
  357. package/cjs/render/contributions/render/path-render.js.map +1 -1
  358. package/cjs/render/contributions/render/polygon-render.js +4 -6
  359. package/cjs/render/contributions/render/polygon-render.js.map +1 -1
  360. package/cjs/render/contributions/render/pyramid3d-render.js +5 -3
  361. package/cjs/render/contributions/render/pyramid3d-render.js.map +1 -1
  362. package/cjs/render/contributions/render/rect-render.js +7 -8
  363. package/cjs/render/contributions/render/rect-render.js.map +1 -1
  364. package/cjs/render/contributions/render/rect3d-render.js +7 -5
  365. package/cjs/render/contributions/render/rect3d-render.js.map +1 -1
  366. package/cjs/render/contributions/render/richtext-render.js +3 -4
  367. package/cjs/render/contributions/render/richtext-render.js.map +1 -1
  368. package/cjs/render/contributions/render/symbol-render.js +14 -11
  369. package/cjs/render/contributions/render/symbol-render.js.map +1 -1
  370. package/cjs/render/contributions/render/text-render.js +8 -8
  371. package/cjs/render/contributions/render/text-render.js.map +1 -1
  372. package/cjs/render/contributions/render/utils.js +1 -1
  373. package/cjs/render/contributions/render/utils.js.map +1 -1
  374. package/cjs/render/render-service.js +2 -11
  375. package/cjs/render/render-service.js.map +1 -1
  376. package/cjs/resource-loader/loader.js +16 -13
  377. package/cjs/resource-loader/loader.js.map +1 -1
  378. package/cjs/tapable/Hook.js +0 -3
  379. package/cjs/tapable/Hook.js.map +1 -1
  380. package/dist/index.es.js +1759 -2166
  381. package/es/allocator/bounds-allocate.js +1 -1
  382. package/es/allocator/bounds-allocate.js.map +1 -1
  383. package/es/allocator/canvas-allocate.js +9 -11
  384. package/es/allocator/canvas-allocate.js.map +1 -1
  385. package/es/allocator/graphic-allocate.js +9 -5
  386. package/es/allocator/graphic-allocate.js.map +1 -1
  387. package/es/allocator/matrix-allocate.js +6 -2
  388. package/es/allocator/matrix-allocate.js.map +1 -1
  389. package/es/animate/Ticker/default-ticker.js +14 -25
  390. package/es/animate/Ticker/default-ticker.js.map +1 -1
  391. package/es/animate/animate.js +8 -7
  392. package/es/animate/animate.js.map +1 -1
  393. package/es/animate/custom-animate.d.ts +1 -0
  394. package/es/animate/custom-animate.js +81 -65
  395. package/es/animate/custom-animate.js.map +1 -1
  396. package/es/animate/easing.js +8 -18
  397. package/es/animate/easing.js.map +1 -1
  398. package/es/animate/morphing.js +23 -20
  399. package/es/animate/morphing.js.map +1 -1
  400. package/es/application.js +1 -7
  401. package/es/application.js.map +1 -1
  402. package/es/canvas/conical-gradient.js +6 -12
  403. package/es/canvas/conical-gradient.js.map +1 -1
  404. package/es/canvas/contributions/base-canvas.js +7 -19
  405. package/es/canvas/contributions/base-canvas.js.map +1 -1
  406. package/es/color-string/interpolate.js +3 -5
  407. package/es/color-string/interpolate.js.map +1 -1
  408. package/es/color-string/store.js +2 -2
  409. package/es/color-string/store.js.map +1 -1
  410. package/es/common/bounds-context.js +0 -1
  411. package/es/common/bounds-context.js.map +1 -1
  412. package/es/common/canvas-utils.js +6 -3
  413. package/es/common/canvas-utils.js.map +1 -1
  414. package/es/common/contribution-provider.js +0 -3
  415. package/es/common/contribution-provider.js.map +1 -1
  416. package/es/common/custom-path2d.js +1 -7
  417. package/es/common/custom-path2d.js.map +1 -1
  418. package/es/common/generator.js +2 -1
  419. package/es/common/generator.js.map +1 -1
  420. package/es/common/inversify/binding.js +0 -12
  421. package/es/common/inversify/binding.js.map +1 -1
  422. package/es/common/inversify/container.js +0 -4
  423. package/es/common/inversify/container.js.map +1 -1
  424. package/es/common/inversify/cotainer-module.js +0 -2
  425. package/es/common/inversify/cotainer-module.js.map +1 -1
  426. package/es/common/inversify/meta-data.js +0 -2
  427. package/es/common/inversify/meta-data.js.map +1 -1
  428. package/es/common/inversify/syntax/binding_in_syntax.js +0 -1
  429. package/es/common/inversify/syntax/binding_in_syntax.js.map +1 -1
  430. package/es/common/inversify/syntax/binding_to_syntax.js +0 -1
  431. package/es/common/inversify/syntax/binding_to_syntax.js.map +1 -1
  432. package/es/common/inversify-lite/annotation/lazy_service_identifier.js +0 -1
  433. package/es/common/inversify-lite/annotation/lazy_service_identifier.js.map +1 -1
  434. package/es/common/inversify-lite/bindings/binding.js +0 -14
  435. package/es/common/inversify-lite/bindings/binding.js.map +1 -1
  436. package/es/common/inversify-lite/container/container.js +48 -22
  437. package/es/common/inversify-lite/container/container.js.map +1 -1
  438. package/es/common/inversify-lite/container/container_module.js +0 -4
  439. package/es/common/inversify-lite/container/container_module.js.map +1 -1
  440. package/es/common/inversify-lite/container/lookup.js +0 -1
  441. package/es/common/inversify-lite/container/lookup.js.map +1 -1
  442. package/es/common/inversify-lite/planning/context.js +0 -4
  443. package/es/common/inversify-lite/planning/context.js.map +1 -1
  444. package/es/common/inversify-lite/planning/metadata.js +0 -2
  445. package/es/common/inversify-lite/planning/metadata.js.map +1 -1
  446. package/es/common/inversify-lite/planning/plan.js +0 -2
  447. package/es/common/inversify-lite/planning/plan.js.map +1 -1
  448. package/es/common/inversify-lite/planning/queryable_string.js +0 -1
  449. package/es/common/inversify-lite/planning/queryable_string.js.map +1 -1
  450. package/es/common/inversify-lite/planning/request.js +0 -8
  451. package/es/common/inversify-lite/planning/request.js.map +1 -1
  452. package/es/common/inversify-lite/planning/target.js +0 -7
  453. package/es/common/inversify-lite/planning/target.js.map +1 -1
  454. package/es/common/inversify-lite/resolution/instantiation.js +44 -16
  455. package/es/common/inversify-lite/resolution/instantiation.js.map +1 -1
  456. package/es/common/inversify-lite/scope/scope.js +29 -3
  457. package/es/common/inversify-lite/scope/scope.js.map +1 -1
  458. package/es/common/inversify-lite/syntax/binding_in_syntax.js +0 -1
  459. package/es/common/inversify-lite/syntax/binding_in_syntax.js.map +1 -1
  460. package/es/common/inversify-lite/syntax/binding_in_when_on_syntax.js +0 -3
  461. package/es/common/inversify-lite/syntax/binding_in_when_on_syntax.js.map +1 -1
  462. package/es/common/inversify-lite/syntax/binding_on_syntax.js +0 -1
  463. package/es/common/inversify-lite/syntax/binding_on_syntax.js.map +1 -1
  464. package/es/common/inversify-lite/syntax/binding_to_syntax.js +0 -1
  465. package/es/common/inversify-lite/syntax/binding_to_syntax.js.map +1 -1
  466. package/es/common/inversify-lite/syntax/binding_when_on_syntax.js +0 -2
  467. package/es/common/inversify-lite/syntax/binding_when_on_syntax.js.map +1 -1
  468. package/es/common/inversify-lite/syntax/binding_when_syntax.js +0 -1
  469. package/es/common/inversify-lite/syntax/binding_when_syntax.js.map +1 -1
  470. package/es/common/polygon.js +2 -1
  471. package/es/common/polygon.js.map +1 -1
  472. package/es/common/render-area.js +3 -2
  473. package/es/common/render-area.js.map +1 -1
  474. package/es/common/render-curve.js +8 -4
  475. package/es/common/render-curve.js.map +1 -1
  476. package/es/common/seg-context.js +3 -12
  477. package/es/common/seg-context.js.map +1 -1
  478. package/es/common/segment/basis.js +0 -13
  479. package/es/common/segment/basis.js.map +1 -1
  480. package/es/common/segment/common.js +1 -1
  481. package/es/common/segment/common.js.map +1 -1
  482. package/es/common/segment/curve/arc.js +1 -2
  483. package/es/common/segment/curve/arc.js.map +1 -1
  484. package/es/common/segment/curve/base.js +0 -4
  485. package/es/common/segment/curve/base.js.map +1 -1
  486. package/es/common/segment/curve/cubic-bezier.js +2 -2
  487. package/es/common/segment/curve/cubic-bezier.js.map +1 -1
  488. package/es/common/segment/curve/curve-context.js +0 -4
  489. package/es/common/segment/curve/curve-context.js.map +1 -1
  490. package/es/common/segment/curve/ellipse.js +3 -3
  491. package/es/common/segment/curve/ellipse.js.map +1 -1
  492. package/es/common/segment/curve/line.js +1 -2
  493. package/es/common/segment/curve/line.js.map +1 -1
  494. package/es/common/segment/curve/move.js +1 -2
  495. package/es/common/segment/curve/move.js.map +1 -1
  496. package/es/common/segment/curve/path.js +0 -2
  497. package/es/common/segment/curve/path.js.map +1 -1
  498. package/es/common/segment/curve/quadratic-bezier.js +2 -2
  499. package/es/common/segment/curve/quadratic-bezier.js.map +1 -1
  500. package/es/common/segment/linear.js +0 -10
  501. package/es/common/segment/linear.js.map +1 -1
  502. package/es/common/segment/monotone.js +0 -13
  503. package/es/common/segment/monotone.js.map +1 -1
  504. package/es/common/segment/step.js +1 -12
  505. package/es/common/segment/step.js.map +1 -1
  506. package/es/common/sort.js +34 -3
  507. package/es/common/sort.js.map +1 -1
  508. package/es/common/split-path.js +11 -4
  509. package/es/common/split-path.js.map +1 -1
  510. package/es/common/utils.js +5 -7
  511. package/es/common/utils.js.map +1 -1
  512. package/es/common/xml/parser.js +2 -2
  513. package/es/common/xml/parser.js.map +1 -1
  514. package/es/core/camera.js +4 -11
  515. package/es/core/camera.js.map +1 -1
  516. package/es/core/contributions/env/base-contribution.js +0 -6
  517. package/es/core/contributions/env/base-contribution.js.map +1 -1
  518. package/es/core/contributions/layerHandler/canvas2d-contribution.js +11 -20
  519. package/es/core/contributions/layerHandler/canvas2d-contribution.js.map +1 -1
  520. package/es/core/contributions/layerHandler/empty-contribution.js +8 -8
  521. package/es/core/contributions/layerHandler/empty-contribution.js.map +1 -1
  522. package/es/core/contributions/layerHandler/offscreen2d-contribution.js +6 -5
  523. package/es/core/contributions/layerHandler/offscreen2d-contribution.js.map +1 -1
  524. package/es/core/contributions/textMeasure/AtextMeasure.js +8 -11
  525. package/es/core/contributions/textMeasure/AtextMeasure.js.map +1 -1
  526. package/es/core/contributions/textMeasure/layout.js +0 -3
  527. package/es/core/contributions/textMeasure/layout.js.map +1 -1
  528. package/es/core/contributions/window/base-contribution.js +0 -2
  529. package/es/core/contributions/window/base-contribution.js.map +1 -1
  530. package/es/core/global.js +0 -8
  531. package/es/core/global.js.map +1 -1
  532. package/es/core/graphic-utils.js +5 -16
  533. package/es/core/graphic-utils.js.map +1 -1
  534. package/es/core/layer-service.js +7 -7
  535. package/es/core/layer-service.js.map +1 -1
  536. package/es/core/layer.js +9 -7
  537. package/es/core/layer.js.map +1 -1
  538. package/es/core/stage.js +34 -68
  539. package/es/core/stage.js.map +1 -1
  540. package/es/core/window.js +14 -16
  541. package/es/core/window.js.map +1 -1
  542. package/es/event/event-manager.js +145 -153
  543. package/es/event/event-manager.js.map +1 -1
  544. package/es/event/event-system.js +43 -60
  545. package/es/event/event-system.js.map +1 -1
  546. package/es/event/event-target.js +3 -1
  547. package/es/event/event-target.js.map +1 -1
  548. package/es/event/federated-event/base-event.js +15 -43
  549. package/es/event/federated-event/base-event.js.map +1 -1
  550. package/es/event/federated-event/mouse-event.js +18 -27
  551. package/es/event/federated-event/mouse-event.js.map +1 -1
  552. package/es/event/federated-event/pointer-event.js +8 -12
  553. package/es/event/federated-event/pointer-event.js.map +1 -1
  554. package/es/event/federated-event/wheel-event.js +11 -12
  555. package/es/event/federated-event/wheel-event.js.map +1 -1
  556. package/es/graphic/arc.js +6 -9
  557. package/es/graphic/arc.js.map +1 -1
  558. package/es/graphic/arc3d.js +5 -6
  559. package/es/graphic/arc3d.js.map +1 -1
  560. package/es/graphic/area.js +10 -13
  561. package/es/graphic/area.js.map +1 -1
  562. package/es/graphic/builtin-symbol/arrow.js +3 -2
  563. package/es/graphic/builtin-symbol/arrow.js.map +1 -1
  564. package/es/graphic/builtin-symbol/arrow2-down.js +3 -2
  565. package/es/graphic/builtin-symbol/arrow2-down.js.map +1 -1
  566. package/es/graphic/builtin-symbol/arrow2-left.js +3 -2
  567. package/es/graphic/builtin-symbol/arrow2-left.js.map +1 -1
  568. package/es/graphic/builtin-symbol/arrow2-right.js +3 -2
  569. package/es/graphic/builtin-symbol/arrow2-right.js.map +1 -1
  570. package/es/graphic/builtin-symbol/arrow2-up.js +3 -2
  571. package/es/graphic/builtin-symbol/arrow2-up.js.map +1 -1
  572. package/es/graphic/builtin-symbol/circle.js +3 -2
  573. package/es/graphic/builtin-symbol/circle.js.map +1 -1
  574. package/es/graphic/builtin-symbol/close.js +3 -2
  575. package/es/graphic/builtin-symbol/close.js.map +1 -1
  576. package/es/graphic/builtin-symbol/cross.js +3 -2
  577. package/es/graphic/builtin-symbol/cross.js.map +1 -1
  578. package/es/graphic/builtin-symbol/diamond.js +3 -2
  579. package/es/graphic/builtin-symbol/diamond.js.map +1 -1
  580. package/es/graphic/builtin-symbol/line-h.js +3 -2
  581. package/es/graphic/builtin-symbol/line-h.js.map +1 -1
  582. package/es/graphic/builtin-symbol/line-v.js +3 -2
  583. package/es/graphic/builtin-symbol/line-v.js.map +1 -1
  584. package/es/graphic/builtin-symbol/rect.js +3 -2
  585. package/es/graphic/builtin-symbol/rect.js.map +1 -1
  586. package/es/graphic/builtin-symbol/square.js +3 -2
  587. package/es/graphic/builtin-symbol/square.js.map +1 -1
  588. package/es/graphic/builtin-symbol/star.js +3 -2
  589. package/es/graphic/builtin-symbol/star.js.map +1 -1
  590. package/es/graphic/builtin-symbol/stroke.js +3 -2
  591. package/es/graphic/builtin-symbol/stroke.js.map +1 -1
  592. package/es/graphic/builtin-symbol/thin-triangle.js +3 -2
  593. package/es/graphic/builtin-symbol/thin-triangle.js.map +1 -1
  594. package/es/graphic/builtin-symbol/triangle-down.js +3 -2
  595. package/es/graphic/builtin-symbol/triangle-down.js.map +1 -1
  596. package/es/graphic/builtin-symbol/triangle-left.js +3 -2
  597. package/es/graphic/builtin-symbol/triangle-left.js.map +1 -1
  598. package/es/graphic/builtin-symbol/triangle-right.js +3 -2
  599. package/es/graphic/builtin-symbol/triangle-right.js.map +1 -1
  600. package/es/graphic/builtin-symbol/triangle-up.js +3 -2
  601. package/es/graphic/builtin-symbol/triangle-up.js.map +1 -1
  602. package/es/graphic/builtin-symbol/triangle.js +3 -1
  603. package/es/graphic/builtin-symbol/triangle.js.map +1 -1
  604. package/es/graphic/builtin-symbol/utils.js +2 -6
  605. package/es/graphic/builtin-symbol/utils.js.map +1 -1
  606. package/es/graphic/builtin-symbol/wedge.js +3 -2
  607. package/es/graphic/builtin-symbol/wedge.js.map +1 -1
  608. package/es/graphic/builtin-symbol/wye.js +3 -2
  609. package/es/graphic/builtin-symbol/wye.js.map +1 -1
  610. package/es/graphic/circle.js +6 -7
  611. package/es/graphic/circle.js.map +1 -1
  612. package/es/graphic/config.js +44 -72
  613. package/es/graphic/config.js.map +1 -1
  614. package/es/graphic/glyph.js +9 -9
  615. package/es/graphic/glyph.js.map +1 -1
  616. package/es/graphic/graphic-service/graphic-service.js +8 -12
  617. package/es/graphic/graphic-service/graphic-service.js.map +1 -1
  618. package/es/graphic/graphic.js +44 -27
  619. package/es/graphic/graphic.js.map +1 -1
  620. package/es/graphic/group.js +5 -8
  621. package/es/graphic/group.js.map +1 -1
  622. package/es/graphic/image.js +16 -17
  623. package/es/graphic/image.js.map +1 -1
  624. package/es/graphic/line.js +7 -10
  625. package/es/graphic/line.js.map +1 -1
  626. package/es/graphic/node-tree.js +44 -25
  627. package/es/graphic/node-tree.js.map +1 -1
  628. package/es/graphic/path.js +7 -11
  629. package/es/graphic/path.js.map +1 -1
  630. package/es/graphic/polygon.js +4 -6
  631. package/es/graphic/polygon.js.map +1 -1
  632. package/es/graphic/pyramid3d.js +3 -3
  633. package/es/graphic/pyramid3d.js.map +1 -1
  634. package/es/graphic/rect.js +4 -6
  635. package/es/graphic/rect.js.map +1 -1
  636. package/es/graphic/rect3d.js +4 -4
  637. package/es/graphic/rect3d.js.map +1 -1
  638. package/es/graphic/richtext/frame.js +0 -19
  639. package/es/graphic/richtext/frame.js.map +1 -1
  640. package/es/graphic/richtext/icon.js +6 -14
  641. package/es/graphic/richtext/icon.js.map +1 -1
  642. package/es/graphic/richtext/line.js +2 -14
  643. package/es/graphic/richtext/line.js.map +1 -1
  644. package/es/graphic/richtext/paragraph.js +0 -22
  645. package/es/graphic/richtext/paragraph.js.map +1 -1
  646. package/es/graphic/richtext/utils.js +2 -1
  647. package/es/graphic/richtext/utils.js.map +1 -1
  648. package/es/graphic/richtext/wrapper.js +0 -12
  649. package/es/graphic/richtext/wrapper.js.map +1 -1
  650. package/es/graphic/richtext.js +46 -37
  651. package/es/graphic/richtext.js.map +1 -1
  652. package/es/graphic/shadow-root.js +1 -2
  653. package/es/graphic/shadow-root.js.map +1 -1
  654. package/es/graphic/symbol.js +6 -11
  655. package/es/graphic/symbol.js.map +1 -1
  656. package/es/graphic/text.js +40 -39
  657. package/es/graphic/text.js.map +1 -1
  658. package/es/graphic/theme.js +0 -4
  659. package/es/graphic/theme.js.map +1 -1
  660. package/es/graphic/tools.js +44 -16
  661. package/es/graphic/tools.js.map +1 -1
  662. package/es/graphic/wrap-text.js +6 -6
  663. package/es/graphic/wrap-text.js.map +1 -1
  664. package/es/picker/global-picker-service.js +0 -1
  665. package/es/picker/global-picker-service.js.map +1 -1
  666. package/es/picker/pick-interceptor.js +15 -5
  667. package/es/picker/pick-interceptor.js.map +1 -1
  668. package/es/picker/picker-service.js +5 -5
  669. package/es/picker/picker-service.js.map +1 -1
  670. package/es/plugins/builtin-plugin/3dview-transform-plugin.js +20 -26
  671. package/es/plugins/builtin-plugin/3dview-transform-plugin.js.map +1 -1
  672. package/es/plugins/builtin-plugin/auto-render-plugin.js +4 -5
  673. package/es/plugins/builtin-plugin/auto-render-plugin.js.map +1 -1
  674. package/es/plugins/builtin-plugin/dirty-bounds-plugin.js +4 -5
  675. package/es/plugins/builtin-plugin/dirty-bounds-plugin.js.map +1 -1
  676. package/es/plugins/builtin-plugin/flex-layout-plugin.js +8 -11
  677. package/es/plugins/builtin-plugin/flex-layout-plugin.js.map +1 -1
  678. package/es/plugins/builtin-plugin/html-attribute-plugin.js +17 -28
  679. package/es/plugins/builtin-plugin/html-attribute-plugin.js.map +1 -1
  680. package/es/plugins/builtin-plugin/incremental-auto-render-plugin.js +8 -12
  681. package/es/plugins/builtin-plugin/incremental-auto-render-plugin.js.map +1 -1
  682. package/es/plugins/builtin-plugin/react-attribute-plugin.js +6 -6
  683. package/es/plugins/builtin-plugin/react-attribute-plugin.js.map +1 -1
  684. package/es/plugins/plugin-service.js +0 -1
  685. package/es/plugins/plugin-service.js.map +1 -1
  686. package/es/render/contributions/render/arc-render.js +4 -6
  687. package/es/render/contributions/render/arc-render.js.map +1 -1
  688. package/es/render/contributions/render/arc3d-render.js +7 -5
  689. package/es/render/contributions/render/arc3d-render.js.map +1 -1
  690. package/es/render/contributions/render/area-render.js +23 -21
  691. package/es/render/contributions/render/area-render.js.map +1 -1
  692. package/es/render/contributions/render/base-render.js +0 -5
  693. package/es/render/contributions/render/base-render.js.map +1 -1
  694. package/es/render/contributions/render/circle-render.js +4 -6
  695. package/es/render/contributions/render/circle-render.js.map +1 -1
  696. package/es/render/contributions/render/contributions/arc-contribution-render.js +3 -3
  697. package/es/render/contributions/render/contributions/arc-contribution-render.js.map +1 -1
  698. package/es/render/contributions/render/contributions/area-texture-contribution-render.js +5 -2
  699. package/es/render/contributions/render/contributions/area-texture-contribution-render.js.map +1 -1
  700. package/es/render/contributions/render/contributions/base-contribution-render.js +7 -10
  701. package/es/render/contributions/render/contributions/base-contribution-render.js.map +1 -1
  702. package/es/render/contributions/render/contributions/base-texture-contribution-render.js +3 -4
  703. package/es/render/contributions/render/contributions/base-texture-contribution-render.js.map +1 -1
  704. package/es/render/contributions/render/contributions/circle-contribution-render.js +3 -3
  705. package/es/render/contributions/render/contributions/circle-contribution-render.js.map +1 -1
  706. package/es/render/contributions/render/contributions/group-contribution-render.js +3 -1
  707. package/es/render/contributions/render/contributions/group-contribution-render.js.map +1 -1
  708. package/es/render/contributions/render/contributions/image-contribution-render.js +3 -1
  709. package/es/render/contributions/render/contributions/image-contribution-render.js.map +1 -1
  710. package/es/render/contributions/render/contributions/rect-contribution-render.js +11 -11
  711. package/es/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
  712. package/es/render/contributions/render/contributions/symbol-contribution-render.js +3 -3
  713. package/es/render/contributions/render/contributions/symbol-contribution-render.js.map +1 -1
  714. package/es/render/contributions/render/contributions/text-contribution-render.js +8 -6
  715. package/es/render/contributions/render/contributions/text-contribution-render.js.map +1 -1
  716. package/es/render/contributions/render/draw-contribution.js +14 -12
  717. package/es/render/contributions/render/draw-contribution.js.map +1 -1
  718. package/es/render/contributions/render/draw-interceptor.js +21 -11
  719. package/es/render/contributions/render/draw-interceptor.js.map +1 -1
  720. package/es/render/contributions/render/glyph-render.js +3 -2
  721. package/es/render/contributions/render/glyph-render.js.map +1 -1
  722. package/es/render/contributions/render/graphic-render.js +1 -4
  723. package/es/render/contributions/render/graphic-render.js.map +1 -1
  724. package/es/render/contributions/render/group-render.js +3 -7
  725. package/es/render/contributions/render/group-render.js.map +1 -1
  726. package/es/render/contributions/render/image-render.js +2 -5
  727. package/es/render/contributions/render/image-render.js.map +1 -1
  728. package/es/render/contributions/render/incremental-area-render.js +3 -1
  729. package/es/render/contributions/render/incremental-area-render.js.map +1 -1
  730. package/es/render/contributions/render/incremental-draw-contribution.js +109 -80
  731. package/es/render/contributions/render/incremental-draw-contribution.js.map +1 -1
  732. package/es/render/contributions/render/incremental-line-render.js +3 -1
  733. package/es/render/contributions/render/incremental-line-render.js.map +1 -1
  734. package/es/render/contributions/render/line-render.js +16 -12
  735. package/es/render/contributions/render/line-render.js.map +1 -1
  736. package/es/render/contributions/render/path-render.js +6 -8
  737. package/es/render/contributions/render/path-render.js.map +1 -1
  738. package/es/render/contributions/render/polygon-render.js +4 -6
  739. package/es/render/contributions/render/polygon-render.js.map +1 -1
  740. package/es/render/contributions/render/pyramid3d-render.js +5 -3
  741. package/es/render/contributions/render/pyramid3d-render.js.map +1 -1
  742. package/es/render/contributions/render/rect-render.js +6 -8
  743. package/es/render/contributions/render/rect-render.js.map +1 -1
  744. package/es/render/contributions/render/rect3d-render.js +7 -5
  745. package/es/render/contributions/render/rect3d-render.js.map +1 -1
  746. package/es/render/contributions/render/richtext-render.js +3 -4
  747. package/es/render/contributions/render/richtext-render.js.map +1 -1
  748. package/es/render/contributions/render/symbol-render.js +14 -11
  749. package/es/render/contributions/render/symbol-render.js.map +1 -1
  750. package/es/render/contributions/render/text-render.js +8 -9
  751. package/es/render/contributions/render/text-render.js.map +1 -1
  752. package/es/render/contributions/render/utils.js +1 -1
  753. package/es/render/contributions/render/utils.js.map +1 -1
  754. package/es/render/render-service.js +2 -11
  755. package/es/render/render-service.js.map +1 -1
  756. package/es/resource-loader/loader.js +17 -12
  757. package/es/resource-loader/loader.js.map +1 -1
  758. package/es/tapable/Hook.js +0 -3
  759. package/es/tapable/Hook.js.map +1 -1
  760. package/package.json +6 -5
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/builtin-symbol/wedge.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAiCpC,MAAM,UAAU,KAAK,CAAC,GAAe,EAAE,CAAS,EAAE,MAAc,EAAE,MAAc;IAC9E,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAChB,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;IAChC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC;IAC3C,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC;IAC5C,GAAG,CAAC,SAAS,EAAE,CAAC;IAChB,OAAO,IAAI,CAAC;AACd,CAAC;AAGD,MAAM,OAAO,WAAY,SAAQ,UAAU;IACzC,IAAI,GAAe,OAAO,CAAC;IAC3B,OAAO,GAAW,8EAA8E,CAAC;IAEjG,IAAI,CAAC,GAAe,EAAE,IAAY,EAAE,MAAc,EAAE,MAAc;QAChE,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC;QACnB,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;IAED,UAAU,CAAC,GAAe,EAAE,IAAY,EAAE,MAAc,EAAE,MAAc,EAAE,MAAc;QACtF,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,MAAM,CAAC;QAC5B,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;CACF;AAED,eAAe,IAAI,WAAW,EAAE,CAAC","file":"wedge.js","sourcesContent":["import type { IBounds } from '@visactor/vutils';\nimport type { IContext2d, SymbolType, ISymbolClass } from '../../interface';\nimport { BaseSymbol } from './base';\n\n/**\n * 部分源码参考 https://github.com/vega/vega/blob/main/packages/vega-scenegraph/src/path/symbols.js\n * Copyright (c) 2015-2023, University of Washington Interactive Data Lab\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\n 3. Neither the name of the copyright holder nor the names of its contributors\n may be used to endorse or promote products derived from this software\n without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\n FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nexport function wedge(ctx: IContext2d, r: number, transX: number, transY: number) {\n const h = r * 2;\n ctx.moveTo(transX, -r + transY);\n ctx.lineTo(h / 3 / 2 + transX, r + transY);\n ctx.lineTo(-h / 3 / 2 + transX, r + transY);\n ctx.closePath();\n return true;\n}\n\n// 以中心为锚点,size为circle外接正方形的面积\nexport class WedgeSymbol extends BaseSymbol implements ISymbolClass {\n type: SymbolType = 'wedge';\n pathStr: string = 'M0,-0.5773502691896257L-0.125,0.28867513459481287L0.125,0.28867513459481287Z';\n\n draw(ctx: IContext2d, size: number, transX: number, transY: number) {\n const r = size / 2;\n return wedge(ctx, r, transX, transY);\n }\n\n drawOffset(ctx: IContext2d, size: number, transX: number, transY: number, offset: number) {\n const r = size / 2 + offset;\n return wedge(ctx, r, transX, transY);\n }\n}\n\nexport default new WedgeSymbol();\n"]}
1
+ {"version":3,"sources":["../src/graphic/builtin-symbol/wedge.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAiCpC,MAAM,UAAU,KAAK,CAAC,GAAe,EAAE,CAAS,EAAE,MAAc,EAAE,MAAc;IAC9E,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAChB,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;IAChC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC;IAC3C,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC;IAC5C,GAAG,CAAC,SAAS,EAAE,CAAC;IAChB,OAAO,IAAI,CAAC;AACd,CAAC;AAGD,MAAM,OAAO,WAAY,SAAQ,UAAU;IAA3C;;QACE,SAAI,GAAe,OAAO,CAAC;QAC3B,YAAO,GAAW,8EAA8E,CAAC;IAWnG,CAAC;IATC,IAAI,CAAC,GAAe,EAAE,IAAY,EAAE,MAAc,EAAE,MAAc;QAChE,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC;QACnB,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;IAED,UAAU,CAAC,GAAe,EAAE,IAAY,EAAE,MAAc,EAAE,MAAc,EAAE,MAAc;QACtF,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,MAAM,CAAC;QAC5B,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;CACF;AAED,eAAe,IAAI,WAAW,EAAE,CAAC","file":"wedge.js","sourcesContent":["import type { IBounds } from '@visactor/vutils';\nimport type { IContext2d, SymbolType, ISymbolClass } from '../../interface';\nimport { BaseSymbol } from './base';\n\n/**\n * 部分源码参考 https://github.com/vega/vega/blob/main/packages/vega-scenegraph/src/path/symbols.js\n * Copyright (c) 2015-2023, University of Washington Interactive Data Lab\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\n 3. Neither the name of the copyright holder nor the names of its contributors\n may be used to endorse or promote products derived from this software\n without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\n FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nexport function wedge(ctx: IContext2d, r: number, transX: number, transY: number) {\n const h = r * 2;\n ctx.moveTo(transX, -r + transY);\n ctx.lineTo(h / 3 / 2 + transX, r + transY);\n ctx.lineTo(-h / 3 / 2 + transX, r + transY);\n ctx.closePath();\n return true;\n}\n\n// 以中心为锚点,size为circle外接正方形的面积\nexport class WedgeSymbol extends BaseSymbol implements ISymbolClass {\n type: SymbolType = 'wedge';\n pathStr: string = 'M0,-0.5773502691896257L-0.125,0.28867513459481287L0.125,0.28867513459481287Z';\n\n draw(ctx: IContext2d, size: number, transX: number, transY: number) {\n const r = size / 2;\n return wedge(ctx, r, transX, transY);\n }\n\n drawOffset(ctx: IContext2d, size: number, transX: number, transY: number, offset: number) {\n const r = size / 2 + offset;\n return wedge(ctx, r, transX, transY);\n }\n}\n\nexport default new WedgeSymbol();\n"]}
@@ -15,8 +15,9 @@ export function wye(ctx, r, transX, transY) {
15
15
  }
16
16
 
17
17
  export class WyeSymbol extends BaseSymbol {
18
- type="wye";
19
- pathStr="M0.25 0.14433756729740646L0.25 0.6443375672974064L-0.25 0.6443375672974064L-0.25 0.14433756729740643L-0.6830127018922193 -0.10566243270259357L-0.4330127018922193 -0.5386751345948129L0 -0.28867513459481287L0.4330127018922193 -0.5386751345948129L0.6830127018922193 -0.10566243270259357Z";
18
+ constructor() {
19
+ super(...arguments), this.type = "wye", this.pathStr = "M0.25 0.14433756729740646L0.25 0.6443375672974064L-0.25 0.6443375672974064L-0.25 0.14433756729740643L-0.6830127018922193 -0.10566243270259357L-0.4330127018922193 -0.5386751345948129L0 -0.28867513459481287L0.4330127018922193 -0.5386751345948129L0.6830127018922193 -0.10566243270259357Z";
20
+ }
20
21
  draw(ctx, size, transX, transY) {
21
22
  return wye(ctx, size / 2, transX, transY);
22
23
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/builtin-symbol/wye.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAoBpC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;AACf,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AACtB,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;AACvB,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,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AC;IAC/D,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,CAAC;IAC/D,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,CAAC;IAC/D,GAAG,CAAC,SAAS,EAAE,CAAC;IAChB,OAAO,KAAK,CAAC;AACf,CAAC;AAGD,MAAM,OAAO,SAAU,SAAQ,UAAU;IACvC,IAAI,GAAe,KAAK,CAAC;IAEzB,OAAO,GAEL,8RAA8R,CAAC;IAEjS,IAAI,CAAC,GAAe,EAAE,IAAY,EAAE,MAAc,EAAE,MAAc;QAChE,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC;QAEnB,OAAO,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,CAAC;IAED,UAAU,CAAC,GAAe,EAAE,IAAY,EAAE,MAAc,EAAE,MAAc,EAAE,MAAc;QACtF,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,MAAM,CAAC;QAE5B,OAAO,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,CAAC;CACF;AAED,eAAe,IAAI,SAAS,EAAE,CAAC","file":"wye.js","sourcesContent":["import type { IBounds } from '@visactor/vutils';\nimport { sqrt } from '@visactor/vutils';\nimport type { IContext2d, SymbolType, ISymbolClass } from '../../interface';\nimport { BaseSymbol } from './base';\n\n/**\n * \n *Copyright 2010-2021 Mike Bostock\n\n Permission to use, copy, modify, and/or distribute this software for any purpose\n with or without fee is hereby granted, provided that the above copyright notice\n and this permission notice appear in all copies.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS\n OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\n TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\n THIS SOFTWARE.\n */\n// 借鉴自d3\n// https://github.com/d3/d3-shape/blob/main/src/symbol/wye.js\nconst c = -0.5;\nconst s = sqrt(3) / 2;\nconst k = 1 / sqrt(12);\nconst a = (k / 2 + 1) * 3;\nexport function wye(ctx: IContext2d, r: number, transX: number, transY: number) {\n const x0 = r / 2;\n const y0 = r * k;\n const x1 = x0;\n const y1 = r * k + r;\n const x2 = -x1;\n const y2 = y1;\n ctx.moveTo(x0 + transX, y0 + transY);\n ctx.lineTo(x1 + transX, y1 + transY);\n ctx.lineTo(x2 + transX, y2 + transY);\n ctx.lineTo(c * x0 - s * y0 + transX, s * x0 + c * y0 + transY);\n ctx.lineTo(c * x1 - s * y1 + transX, s * x1 + c * y1 + transY);\n ctx.lineTo(c * x2 - s * y2 + transX, s * x2 + c * y2 + transY);\n ctx.lineTo(c * x0 + s * y0 + transX, c * y0 - s * x0 + transY);\n ctx.lineTo(c * x1 + s * y1 + transX, c * y1 - s * x1 + transY);\n ctx.lineTo(c * x2 + s * y2 + transX, c * y2 - s * x2 + transY);\n ctx.closePath();\n return false;\n}\n\n// 以中心为锚点,size为wye外接正方形的面积\nexport class WyeSymbol extends BaseSymbol implements ISymbolClass {\n type: SymbolType = 'wye';\n /* eslint-disable max-len */\n pathStr: string =\n /* eslint-disable max-len */\n 'M0.25 0.14433756729740646L0.25 0.6443375672974064L-0.25 0.6443375672974064L-0.25 0.14433756729740643L-0.6830127018922193 -0.10566243270259357L-0.4330127018922193 -0.5386751345948129L0 -0.28867513459481287L0.4330127018922193 -0.5386751345948129L0.6830127018922193 -0.10566243270259357Z';\n\n draw(ctx: IContext2d, size: number, transX: number, transY: number) {\n const r = size / 2;\n // const r = sqrt(size / a);\n return wye(ctx, r, transX, transY);\n }\n\n drawOffset(ctx: IContext2d, size: number, transX: number, transY: number, offset: number) {\n const r = size / 2 + offset;\n // const r = sqrt(size / a);\n return wye(ctx, r, transX, transY);\n }\n}\n\nexport default new WyeSymbol();\n"]}
1
+ {"version":3,"sources":["../src/graphic/builtin-symbol/wye.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAoBpC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;AACf,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AACtB,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;AACvB,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,CAAC,GAAe,EAAE,CAAS,EAAE,MAAc,EAAE,MAAc;IAC5E,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IACjB,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IACjB,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACrB,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;IACf,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,GAAG,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,EAAE,EAAE,GAAG,MAAM,CAAC,CAAC;IACrC,GAAG,CAAC,MAAM,CAA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QAEzB,YAAO,GAEL,8RAA8R,CAAC;IAanS,CAAC;IAXC,IAAI,CAAC,GAAe,EAAE,IAAY,EAAE,MAAc,EAAE,MAAc;QAChE,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC;QAEnB,OAAO,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,CAAC;IAED,UAAU,CAAC,GAAe,EAAE,IAAY,EAAE,MAAc,EAAE,MAAc,EAAE,MAAc;QACtF,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,MAAM,CAAC;QAE5B,OAAO,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,CAAC;CACF;AAED,eAAe,IAAI,SAAS,EAAE,CAAC","file":"wye.js","sourcesContent":["import type { IBounds } from '@visactor/vutils';\nimport { sqrt } from '@visactor/vutils';\nimport type { IContext2d, SymbolType, ISymbolClass } from '../../interface';\nimport { BaseSymbol } from './base';\n\n/**\n * \n *Copyright 2010-2021 Mike Bostock\n\n Permission to use, copy, modify, and/or distribute this software for any purpose\n with or without fee is hereby granted, provided that the above copyright notice\n and this permission notice appear in all copies.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS\n OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\n TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\n THIS SOFTWARE.\n */\n// 借鉴自d3\n// https://github.com/d3/d3-shape/blob/main/src/symbol/wye.js\nconst c = -0.5;\nconst s = sqrt(3) / 2;\nconst k = 1 / sqrt(12);\nconst a = (k / 2 + 1) * 3;\nexport function wye(ctx: IContext2d, r: number, transX: number, transY: number) {\n const x0 = r / 2;\n const y0 = r * k;\n const x1 = x0;\n const y1 = r * k + r;\n const x2 = -x1;\n const y2 = y1;\n ctx.moveTo(x0 + transX, y0 + transY);\n ctx.lineTo(x1 + transX, y1 + transY);\n ctx.lineTo(x2 + transX, y2 + transY);\n ctx.lineTo(c * x0 - s * y0 + transX, s * x0 + c * y0 + transY);\n ctx.lineTo(c * x1 - s * y1 + transX, s * x1 + c * y1 + transY);\n ctx.lineTo(c * x2 - s * y2 + transX, s * x2 + c * y2 + transY);\n ctx.lineTo(c * x0 + s * y0 + transX, c * y0 - s * x0 + transY);\n ctx.lineTo(c * x1 + s * y1 + transX, c * y1 - s * x1 + transY);\n ctx.lineTo(c * x2 + s * y2 + transX, c * y2 - s * x2 + transY);\n ctx.closePath();\n return false;\n}\n\n// 以中心为锚点,size为wye外接正方形的面积\nexport class WyeSymbol extends BaseSymbol implements ISymbolClass {\n type: SymbolType = 'wye';\n /* eslint-disable max-len */\n pathStr: string =\n /* eslint-disable max-len */\n 'M0.25 0.14433756729740646L0.25 0.6443375672974064L-0.25 0.6443375672974064L-0.25 0.14433756729740643L-0.6830127018922193 -0.10566243270259357L-0.4330127018922193 -0.5386751345948129L0 -0.28867513459481287L0.4330127018922193 -0.5386751345948129L0.6830127018922193 -0.10566243270259357Z';\n\n draw(ctx: IContext2d, size: number, transX: number, transY: number) {\n const r = size / 2;\n // const r = sqrt(size / a);\n return wye(ctx, r, transX, transY);\n }\n\n drawOffset(ctx: IContext2d, size: number, transX: number, transY: number, offset: number) {\n const r = size / 2 + offset;\n // const r = sqrt(size / a);\n return wye(ctx, r, transX, transY);\n }\n}\n\nexport default new WyeSymbol();\n"]}
@@ -13,12 +13,10 @@ import { CIRCLE_NUMBER_TYPE } from "./constants";
13
13
  const CIRCLE_UPDATE_TAG_KEY = [ "radius", "startAngle", "endAngle", ...GRAPHIC_UPDATE_TAG_KEY ];
14
14
 
15
15
  export class Circle extends Graphic {
16
- type="circle";
17
- static NOWORK_ANIMATE_ATTR=NOWORK_ANIMATE_ATTR;
18
16
  constructor(params = {
19
17
  radius: 1
20
18
  }) {
21
- super(params), this.numberType = CIRCLE_NUMBER_TYPE;
19
+ super(params), this.type = "circle", this.numberType = CIRCLE_NUMBER_TYPE;
22
20
  }
23
21
  isValid() {
24
22
  return super.isValid() && this._isValid();
@@ -47,19 +45,20 @@ export class Circle extends Graphic {
47
45
  return super.needUpdateTag(key, CIRCLE_UPDATE_TAG_KEY);
48
46
  }
49
47
  toCustomPath() {
50
- const attribute = this.attribute, radius = attribute.radius ?? this.getDefaultAttribute("radius"), startAngle = attribute.startAngle ?? this.getDefaultAttribute("startAngle"), endAngle = attribute.endAngle ?? this.getDefaultAttribute("endAngle"), path = new CustomPath2D;
48
+ var _a, _b, _c;
49
+ const attribute = this.attribute, radius = null !== (_a = attribute.radius) && void 0 !== _a ? _a : this.getDefaultAttribute("radius"), startAngle = null !== (_b = attribute.startAngle) && void 0 !== _b ? _b : this.getDefaultAttribute("startAngle"), endAngle = null !== (_c = attribute.endAngle) && void 0 !== _c ? _c : this.getDefaultAttribute("endAngle"), path = new CustomPath2D;
51
50
  return path.arc(0, 0, radius, startAngle, endAngle), path;
52
51
  }
53
52
  clone() {
54
- return new Circle({
55
- ...this.attribute
56
- });
53
+ return new Circle(Object.assign({}, this.attribute));
57
54
  }
58
55
  getNoWorkAnimateAttr() {
59
56
  return Circle.NOWORK_ANIMATE_ATTR;
60
57
  }
61
58
  }
62
59
 
60
+ Circle.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;
61
+
63
62
  export function createCircle(attributes) {
64
63
  return new Circle(attributes);
65
64
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/circle.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,m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AU,CAAC,CAAC;QAE5E,MAAM,IAAI,GAAG,IAAI,YAAY,EAAE,CAAC;QAEhC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;QAE7C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK;QACH,OAAO,IAAI,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IAC3C,CAAC;IAED,oBAAoB;QAClB,OAAO,MAAM,CAAC,mBAAmB,CAAC;IACpC,CAAC;;AAGH,MAAM,UAAU,YAAY,CAAC,UAAmC;IAC9D,OAAO,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC;AAChC,CAAC","file":"circle.js","sourcesContent":["import type { AABBBounds, OBBBounds } from '@visactor/vutils';\nimport { transformBounds } from '@visactor/vutils';\nimport type { ICircle, ICircleGraphicAttribute } from '../interface/graphic/circle';\nimport { Graphic, GRAPHIC_UPDATE_TAG_KEY, NOWORK_ANIMATE_ATTR } from './graphic';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport { parsePadding } from '../common/utils';\nimport { getTheme } from './theme';\nimport { application } from '../application';\nimport { CIRCLE_NUMBER_TYPE } from './constants';\n\nconst CIRCLE_UPDATE_TAG_KEY = ['radius', 'startAngle', 'endAngle', ...GRAPHIC_UPDATE_TAG_KEY];\n\n/**\n * 圆形图元\n * 默认顺时针绘制\n */\nexport class Circle extends Graphic<ICircleGraphicAttribute> implements ICircle {\n type: 'circle' = 'circle';\n\n static NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;\n\n constructor(params: ICircleGraphicAttribute = { radius: 1 }) {\n super(params);\n this.numberType = CIRCLE_NUMBER_TYPE;\n }\n\n isValid(): boolean {\n return super.isValid() && this._isValid();\n }\n private _isValid(): boolean {\n const { startAngle, endAngle, radius } = this.attribute;\n return this._validNumber(startAngle) && this._validNumber(endAngle) && this._validNumber(radius);\n }\n\n protected doUpdateAABBBounds(full?: boolean): AABBBounds {\n const circleTheme = getTheme(this).circle;\n this._AABBBounds.clear();\n const attribute = this.attribute;\n const bounds = application.graphicService.updateCircleAABBBounds(\n attribute,\n getTheme(this).circle,\n this._AABBBounds,\n full,\n this\n );\n\n const { boundsPadding = circleTheme.boundsPadding } = attribute;\n const paddingArray = parsePadding(boundsPadding);\n if (paddingArray) {\n (bounds as AABBBounds).expand(paddingArray);\n }\n\n this.clearUpdateBoundTag();\n return bounds as AABBBounds;\n }\n\n protected tryUpdateOBBBounds(): OBBBounds {\n throw new Error('暂不支持');\n }\n\n getDefaultAttribute(name: string) {\n const circleTheme = getTheme(this).circle;\n return circleTheme[name];\n }\n\n protected needUpdateTags(keys: string[]): boolean {\n return super.needUpdateTags(keys, CIRCLE_UPDATE_TAG_KEY);\n }\n protected needUpdateTag(key: string): boolean {\n return super.needUpdateTag(key, CIRCLE_UPDATE_TAG_KEY);\n }\n\n toCustomPath() {\n const x = 0;\n const y = 0;\n\n const attribute = this.attribute;\n const radius = attribute.radius ?? this.getDefaultAttribute('radius');\n const startAngle = attribute.startAngle ?? this.getDefaultAttribute('startAngle');\n const endAngle = attribute.endAngle ?? this.getDefaultAttribute('endAngle');\n\n const path = new CustomPath2D();\n\n path.arc(x, y, radius, startAngle, endAngle);\n\n return path;\n }\n\n clone() {\n return new Circle({ ...this.attribute });\n }\n\n getNoWorkAnimateAttr(): Record<string, number> {\n return Circle.NOWORK_ANIMATE_ATTR;\n }\n}\n\nexport function createCircle(attributes: ICircleGraphicAttribute): ICircle {\n return new Circle(attributes);\n}\n\n// addAttributeToPrototype(DefaultCircleStyle, Circle, PURE_STYLE_KEY);\n"]}
1
+ {"version":3,"sources":["../src/graphic/circle.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,YA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EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;QAE7C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK;QACH,OAAO,IAAI,MAAM,mBAAM,IAAI,CAAC,SAAS,EAAG,CAAC;IAC3C,CAAC;IAED,oBAAoB;QAClB,OAAO,MAAM,CAAC,mBAAmB,CAAC;IACpC,CAAC;;AA3EM,0BAAmB,GAAG,mBAAmB,CAAC;AA8EnD,MAAM,UAAU,YAAY,CAAC,UAAmC;IAC9D,OAAO,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC;AAChC,CAAC","file":"circle.js","sourcesContent":["import type { AABBBounds, OBBBounds } from '@visactor/vutils';\nimport { transformBounds } from '@visactor/vutils';\nimport type { ICircle, ICircleGraphicAttribute } from '../interface/graphic/circle';\nimport { Graphic, GRAPHIC_UPDATE_TAG_KEY, NOWORK_ANIMATE_ATTR } from './graphic';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport { parsePadding } from '../common/utils';\nimport { getTheme } from './theme';\nimport { application } from '../application';\nimport { CIRCLE_NUMBER_TYPE } from './constants';\n\nconst CIRCLE_UPDATE_TAG_KEY = ['radius', 'startAngle', 'endAngle', ...GRAPHIC_UPDATE_TAG_KEY];\n\n/**\n * 圆形图元\n * 默认顺时针绘制\n */\nexport class Circle extends Graphic<ICircleGraphicAttribute> implements ICircle {\n type: 'circle' = 'circle';\n\n static NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;\n\n constructor(params: ICircleGraphicAttribute = { radius: 1 }) {\n super(params);\n this.numberType = CIRCLE_NUMBER_TYPE;\n }\n\n isValid(): boolean {\n return super.isValid() && this._isValid();\n }\n private _isValid(): boolean {\n const { startAngle, endAngle, radius } = this.attribute;\n return this._validNumber(startAngle) && this._validNumber(endAngle) && this._validNumber(radius);\n }\n\n protected doUpdateAABBBounds(full?: boolean): AABBBounds {\n const circleTheme = getTheme(this).circle;\n this._AABBBounds.clear();\n const attribute = this.attribute;\n const bounds = application.graphicService.updateCircleAABBBounds(\n attribute,\n getTheme(this).circle,\n this._AABBBounds,\n full,\n this\n );\n\n const { boundsPadding = circleTheme.boundsPadding } = attribute;\n const paddingArray = parsePadding(boundsPadding);\n if (paddingArray) {\n (bounds as AABBBounds).expand(paddingArray);\n }\n\n this.clearUpdateBoundTag();\n return bounds as AABBBounds;\n }\n\n protected tryUpdateOBBBounds(): OBBBounds {\n throw new Error('暂不支持');\n }\n\n getDefaultAttribute(name: string) {\n const circleTheme = getTheme(this).circle;\n return circleTheme[name];\n }\n\n protected needUpdateTags(keys: string[]): boolean {\n return super.needUpdateTags(keys, CIRCLE_UPDATE_TAG_KEY);\n }\n protected needUpdateTag(key: string): boolean {\n return super.needUpdateTag(key, CIRCLE_UPDATE_TAG_KEY);\n }\n\n toCustomPath() {\n const x = 0;\n const y = 0;\n\n const attribute = this.attribute;\n const radius = attribute.radius ?? this.getDefaultAttribute('radius');\n const startAngle = attribute.startAngle ?? this.getDefaultAttribute('startAngle');\n const endAngle = attribute.endAngle ?? this.getDefaultAttribute('endAngle');\n\n const path = new CustomPath2D();\n\n path.arc(x, y, radius, startAngle, endAngle);\n\n return path;\n }\n\n clone() {\n return new Circle({ ...this.attribute });\n }\n\n getNoWorkAnimateAttr(): Record<string, number> {\n return Circle.NOWORK_ANIMATE_ATTR;\n }\n}\n\nexport function createCircle(attributes: ICircleGraphicAttribute): ICircle {\n return new Circle(attributes);\n}\n\n// addAttributeToPrototype(DefaultCircleStyle, Circle, PURE_STYLE_KEY);\n"]}
@@ -48,17 +48,14 @@ const commonStroke = {
48
48
  stroke: !1
49
49
  };
50
50
 
51
- export const DefaultStrokeStyle = {
52
- outerBorder: {
53
- ...commonStroke,
51
+ export const DefaultStrokeStyle = Object.assign({
52
+ outerBorder: Object.assign(Object.assign({}, commonStroke), {
54
53
  distance: 0
55
- },
56
- innerBorder: {
57
- ...commonStroke,
54
+ }),
55
+ innerBorder: Object.assign(Object.assign({}, commonStroke), {
58
56
  distance: 0
59
- },
60
- ...commonStroke
61
- };
57
+ })
58
+ }, commonStroke);
62
59
 
63
60
  export const DefaultTextStyle = {
64
61
  text: "",
@@ -93,7 +90,7 @@ export const DefaultPickStyle = {
93
90
  pickStrokeBuffer: 0
94
91
  };
95
92
 
96
- export const DefaultStyle = {
93
+ export const DefaultStyle = Object.assign(Object.assign(Object.assign(Object.assign({
97
94
  forceBoundsWidth: void 0,
98
95
  forceBoundsHeight: void 0,
99
96
  opacity: 1,
@@ -109,12 +106,8 @@ export const DefaultStyle = {
109
106
  blur: 0,
110
107
  cursor: null,
111
108
  html: null,
112
- react: null,
113
- ...DefaultFillStyle,
114
- ...DefaultStrokeStyle,
115
- ...DefaultLayout,
116
- ...DefaultPickStyle
117
- };
109
+ react: null
110
+ }, DefaultFillStyle), DefaultStrokeStyle), DefaultLayout), DefaultPickStyle);
118
111
 
119
112
  export const DefaultConnectAttribute = {
120
113
  connectedType: "none",
@@ -127,7 +120,7 @@ export const DefaultDebugAttribute = {
127
120
  _debug_bounds: !1
128
121
  };
129
122
 
130
- export const DefaultAttribute = {
123
+ export const DefaultAttribute = Object.assign(Object.assign(Object.assign({
131
124
  strokeSeg: null,
132
125
  renderable: !0,
133
126
  pickable: !0,
@@ -147,11 +140,8 @@ export const DefaultAttribute = {
147
140
  shadowRootIdx: 1,
148
141
  globalZIndex: 1,
149
142
  globalCompositeOperation: "",
150
- overflow: "hidden",
151
- ...DefaultDebugAttribute,
152
- ...DefaultStyle,
153
- ...DefaultTransform
154
- };
143
+ overflow: "hidden"
144
+ }, DefaultDebugAttribute), DefaultStyle), DefaultTransform);
155
145
 
156
146
  export function addAttributeToPrototype(obj, c, keys) {
157
147
  keys.forEach((key => {
@@ -163,8 +153,7 @@ export function rewriteProto(obj, c) {
163
153
  Object.setPrototypeOf(obj, c);
164
154
  }
165
155
 
166
- export const DefaultArcAttribute = {
167
- ...DefaultAttribute,
156
+ export const DefaultArcAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
168
157
  startAngle: 0,
169
158
  endAngle: pi2,
170
159
  innerRadius: 0,
@@ -176,27 +165,23 @@ export const DefaultArcAttribute = {
176
165
  padAngle: 0,
177
166
  cap: !1,
178
167
  forceShowCap: !1
179
- };
168
+ });
180
169
 
181
- export const DefaultAreaAttribute = {
182
- ...DefaultAttribute,
183
- ...DefaultConnectAttribute,
170
+ export const DefaultAreaAttribute = Object.assign(Object.assign(Object.assign({}, DefaultAttribute), DefaultConnectAttribute), {
184
171
  points: [],
185
172
  segments: [],
186
173
  curveType: "linear",
187
174
  clipRange: 1,
188
175
  closePath: !1
189
- };
176
+ });
190
177
 
191
- export const DefaultCircleAttribute = {
192
- ...DefaultAttribute,
178
+ export const DefaultCircleAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
193
179
  radius: 1,
194
180
  startAngle: 0,
195
181
  endAngle: pi2
196
- };
182
+ });
197
183
 
198
- export const DefaultGroupAttribute = {
199
- ...DefaultAttribute,
184
+ export const DefaultGroupAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
200
185
  width: 0,
201
186
  height: 0,
202
187
  cornerRadius: 0,
@@ -210,80 +195,68 @@ export const DefaultGroupAttribute = {
210
195
  alignItems: "flex-start",
211
196
  alignContent: "flex-start",
212
197
  baseOpacity: 1
213
- };
198
+ });
214
199
 
215
- export const DefaultGlyphAttribute = {
216
- ...DefaultAttribute,
200
+ export const DefaultGlyphAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
217
201
  path: "",
218
202
  width: 0,
219
203
  height: 0,
220
204
  cornerRadius: 0,
221
205
  clip: !1
222
- };
206
+ });
223
207
 
224
- export const DefaultLineAttribute = {
225
- ...DefaultAttribute,
226
- ...DefaultConnectAttribute,
208
+ export const DefaultLineAttribute = Object.assign(Object.assign(Object.assign({}, DefaultAttribute), DefaultConnectAttribute), {
227
209
  points: [],
228
210
  segments: [],
229
211
  curveType: "linear",
230
212
  clipRange: 1,
231
213
  clipRangeByDimension: "default",
232
214
  closePath: !1
233
- };
215
+ });
234
216
 
235
- export const DefaultPathAttribute = {
236
- ...DefaultAttribute,
217
+ export const DefaultPathAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
237
218
  path: new CustomPath2D,
238
219
  customPath: () => {
239
220
  Logger.getInstance().warn("空函数");
240
221
  }
241
- };
222
+ });
242
223
 
243
- export const DefaultPolygonAttribute = {
244
- ...DefaultAttribute,
224
+ export const DefaultPolygonAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
245
225
  points: [],
246
226
  cornerRadius: 0,
247
227
  closePath: !0
248
- };
228
+ });
249
229
 
250
- export const DefaultRectAttribute = {
251
- ...DefaultAttribute,
230
+ export const DefaultRectAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
252
231
  width: 0,
253
232
  height: 0,
254
233
  x1: 0,
255
234
  y1: 0,
256
235
  strokeBoundsBuffer: 0,
257
236
  cornerRadius: 0
258
- };
237
+ });
259
238
 
260
- export const DefaultRect3dAttribute = {
261
- ...DefaultAttribute,
239
+ export const DefaultRect3dAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
262
240
  width: 0,
263
241
  height: 0,
264
242
  x1: 0,
265
243
  y1: 0,
266
244
  cornerRadius: 0,
267
245
  length: 0
268
- };
246
+ });
269
247
 
270
- export const DefaultSymbolAttribute = {
271
- ...DefaultAttribute,
248
+ export const DefaultSymbolAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
272
249
  symbolType: "circle",
273
250
  size: 10,
274
251
  keepDirIn3d: !0
275
- };
252
+ });
276
253
 
277
- export const DefaultTextAttribute = {
278
- ...DefaultAttribute,
279
- ...DefaultTextStyle,
254
+ export const DefaultTextAttribute = Object.assign(Object.assign(Object.assign({}, DefaultAttribute), DefaultTextStyle), {
280
255
  strokeBoundsBuffer: 0,
281
256
  keepDirIn3d: !0
282
- };
257
+ });
283
258
 
284
- export const DefaultRichTextAttribute = {
285
- ...DefaultAttribute,
286
- ...DefaultTextStyle,
259
+ export const DefaultRichTextAttribute = Object.assign(Object.assign(Object.assign({}, DefaultAttribute), DefaultTextStyle), {
287
260
  width: 300,
288
261
  height: 300,
289
262
  ellipsis: !0,
@@ -297,21 +270,20 @@ export const DefaultRichTextAttribute = {
297
270
  maxHeight: void 0,
298
271
  maxWidth: void 0,
299
272
  singleLine: !1
300
- };
273
+ });
301
274
 
302
- export const DefaultImageAttribute = {
275
+ export const DefaultImageAttribute = Object.assign(Object.assign({
303
276
  repeatX: "no-repeat",
304
277
  repeatY: "no-repeat",
305
278
  image: "",
306
279
  width: 0,
307
- height: 0,
308
- ...DefaultAttribute,
280
+ height: 0
281
+ }, DefaultAttribute), {
309
282
  fill: !0,
310
283
  cornerRadius: 0
311
- };
284
+ });
312
285
 
313
- export const DefaultRichTextIconAttribute = {
314
- ...DefaultImageAttribute,
286
+ export const DefaultRichTextIconAttribute = Object.assign(Object.assign({}, DefaultImageAttribute), {
315
287
  backgroundShowMode: "never",
316
288
  backgroundWidth: 0,
317
289
  backgroundHeight: 0,
@@ -328,5 +300,5 @@ export const DefaultRichTextIconAttribute = {
328
300
  backgroundStrokeOpacity: 1,
329
301
  backgroundRadius: 4,
330
302
  opacity: 1
331
- };
303
+ });
332
304
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAiCvD,MAAM,CAAC,MAAM,aAAa,GAAY;IACpC,SAAS,EAAE,MAAM;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAe;IAC1C,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAC;IACT,MAA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E,KAAkC;IACrD,SAAS,EAAE,MAAiC;IAC5C,YAAY,EAAE,KAAmC;IACjD,eAAe,EAAE,YAAY;IAC7B,UAAU,EAAE,EAAE;IACd,mBAAmB,EAAE,KAAK;IAC1B,SAAS,EAAE,SAAS;IACpB,QAAQ,EAAE,SAAS;IACnB,UAAU,EAAE,KAAK;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAqC;IACrE,OAAO,EAAE,WAAW;IACpB,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;IACT,GAAG,gBAAgB;IACnB,IAAI,EAAE,IAAI;IACV,YAAY,EAAE,CAAC;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAA4C;IACnF,GAAG,qBAAqB;IACxB,kBAAkB,EAAE,OAAO;IAC3B,eAAe,EAAE,CAAC;IAClB,gBAAgB,EAAE,CAAC;IACnB,SAAS,EAAE,MAAM;IACjB,YAAY,EAAE,QAAQ;IACtB,SAAS,EAAE,YAAY;IACvB,MAAM,EAAE,CAAC;IACT,EAAE,EAAE,EAAE;IAEN,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE;IACV,cAAc,EAAE,0BAA0B;IAC1C,qBAAqB,EAAE,CAAC;IACxB,gBAAgB,EAAE,KAAK;IACvB,uBAAuB,EAAE,CAAC;IAC1B,gBAAgB,EAAE,CAAC;IACnB,OAAO,EAAE,CAAC;CACX,CAAC","file":"config.js","sourcesContent":["// 存放公共属性\nimport { Logger, Matrix, pi2 } from '@visactor/vutils';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport type {\n IArcGraphicAttribute,\n IAreaGraphicAttribute,\n IGraphicAttribute,\n ICircleGraphicAttribute,\n IFillStyle,\n IGlyphGraphicAttribute,\n IGroupGraphicAttribute,\n IImageGraphicAttribute,\n ILineGraphicAttribute,\n IPathGraphicAttribute,\n IPolygonGraphicAttribute,\n IRect3dGraphicAttribute,\n IRectGraphicAttribute,\n IStrokeStyle,\n IGraphicStyle,\n ISymbolGraphicAttribute,\n ITextAttribute,\n ITextGraphicAttribute,\n IRichTextGraphicAttribute,\n ITransform,\n RichTextWordBreak,\n RichTextVerticalDirection,\n RichTextGlobalAlignType,\n RichTextGlobalBaselineType,\n IRichTextIconGraphicAttribute,\n IConnectedStyle,\n ILayout,\n IDebugType,\n IPickStyle\n} from '../interface';\n\nexport const DefaultLayout: ILayout = {\n alignSelf: 'auto'\n};\n\nexport const DefaultTransform: ITransform = {\n x: 0,\n y: 0,\n z: 0,\n dx: 0,\n dy: 0,\n dz: 0,\n scrollX: 0,\n scrollY: 0,\n scaleX: 1,\n scaleY: 1,\n scaleZ: 1,\n angle: 0,\n alpha: 0,\n beta: 0,\n scaleCenter: [0, 0],\n anchor: [0, 0],\n anchor3d: [0, 0],\n postMatrix: new Matrix()\n};\n\nexport const DefaultFillStyle: IFillStyle = {\n fillOpacity: 1,\n fill: false,\n shadowBlur: 0,\n shadowColor: 'black',\n shadowOffsetX: 0,\n shadowOffsetY: 0\n};\n\nconst commonStroke: Omit<IStrokeStyle, 'outerBorder' | 'innerBorder'> = {\n strokeOpacity: 1,\n lineDash: [],\n lineDashOffset: 0,\n lineWidth: 1,\n lineCap: 'butt',\n lineJoin: 'miter',\n miterLimit: 10,\n strokeBoundsBuffer: 2,\n stroke: false\n};\n\nexport const DefaultStrokeStyle: IStrokeStyle = {\n outerBorder: { ...commonStroke, distance: 0 },\n innerBorder: { ...commonStroke, distance: 0 },\n ...commonStroke\n};\n\nexport const DefaultTextStyle: Required<ITextAttribute> = {\n text: '',\n maxLineWidth: Infinity,\n textAlign: 'left',\n textBaseline: 'alphabetic',\n fontSize: 16,\n // @ts-ignore\n fontFamily: `PingFang SC,Microsoft Yahei,system-ui,-apple-system,segoe ui,\n Roboto,Helvetica,Arial,sans-serif, apple color emoji,segoe ui emoji,segoe ui symbol`,\n fontWeight: '',\n ellipsis: '…',\n fontVariant: '',\n fontStyle: '',\n lineHeight: undefined,\n underline: 0,\n lineThrough: 0,\n scaleIn3d: false,\n direction: 'horizontal',\n wordBreak: 'break-all',\n ignoreBuf: false,\n verticalMode: 0,\n wrap: false,\n whiteSpace: 'no-wrap',\n heightLimit: Infinity,\n lineClamp: Infinity,\n suffixPosition: 'end',\n underlineDash: [],\n underlineOffset: 0,\n disableAutoClipedPoptip: undefined\n};\n\nexport const DefaultPickStyle: IPickStyle = {\n pickStrokeBuffer: 0\n};\n\nexport const DefaultStyle: IGraphicStyle = {\n forceBoundsWidth: undefined,\n forceBoundsHeight: undefined,\n opacity: 1,\n background: null,\n backgroundOpacity: 1,\n backgroundCornerRadius: 0,\n texture: null,\n textureColor: 'black',\n textureSize: 10,\n texturePadding: 2,\n backgroundMode: 'no-repeat',\n backgroundFit: true,\n blur: 0,\n cursor: null,\n html: null,\n react: null,\n ...DefaultFillStyle,\n ...DefaultStrokeStyle,\n ...DefaultLayout,\n ...DefaultPickStyle\n};\n\nexport const DefaultConnectAttribute: Required<IConnectedStyle> = {\n connectedType: 'none',\n // connectedStyle: {\n // stroke: DefaultStrokeStyle.stroke,\n // strokeOpacity: DefaultStrokeStyle.strokeOpacity,\n // lineDash: DefaultStrokeStyle.lineDash,\n // lineDashOffset: DefaultStrokeStyle.lineDashOffset,\n // lineCap: DefaultStrokeStyle.lineCap,\n // lineJoin: DefaultStrokeStyle.lineJoin,\n // lineWidth: DefaultStrokeStyle.lineWidth,\n // fill: DefaultFillStyle.fill,\n // fillOpacity: DefaultFillStyle.fillOpacity\n // },\n connectedStyle: {}, // 默认全都继承父属性\n connectedX: NaN,\n connectedY: NaN\n} as IConnectedStyle;\n\nexport const DefaultDebugAttribute: Required<IDebugType> = {\n _debug_bounds: false\n};\n\nexport const DefaultAttribute: Required<IGraphicAttribute> = {\n strokeSeg: null,\n renderable: true,\n pickable: true,\n shadowGraphic: undefined,\n childrenPickable: true,\n fillPickable: true,\n strokePickable: true,\n visible: true,\n zIndex: 0,\n layout: null,\n boundsPadding: 0,\n renderStyle: 'default',\n pickMode: 'accurate',\n customPickShape: null,\n boundsMode: 'accurate',\n keepDirIn3d: true,\n shadowRootIdx: 1,\n globalZIndex: 1,\n globalCompositeOperation: '',\n overflow: 'hidden',\n ...DefaultDebugAttribute,\n ...DefaultStyle,\n ...DefaultTransform\n};\n\nexport function addAttributeToPrototype(obj: Record<string, any>, c: any, keys: string[]) {\n keys.forEach(key => {\n c.prototype[key] = obj[key];\n });\n}\nexport function rewriteProto(obj: Record<string, any>, c: Record<string, any>) {\n Object.setPrototypeOf(obj, c);\n}\n\nexport const DefaultArcAttribute: Required<IArcGraphicAttribute> = {\n ...DefaultAttribute,\n startAngle: 0,\n endAngle: pi2,\n innerRadius: 0,\n outerRadius: 1,\n innerPadding: 0,\n outerPadding: 0,\n cornerRadius: 0,\n padRadius: 0,\n padAngle: 0,\n cap: false,\n forceShowCap: false\n};\n\nexport const DefaultAreaAttribute: Required<IAreaGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultConnectAttribute,\n points: [],\n segments: [],\n curveType: 'linear',\n clipRange: 1,\n closePath: false\n};\n\nexport const DefaultCircleAttribute: Required<ICircleGraphicAttribute> = {\n ...DefaultAttribute,\n radius: 1,\n startAngle: 0,\n endAngle: pi2\n};\n\nexport const DefaultGroupAttribute: Required<IGroupGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n cornerRadius: 0,\n path: [],\n clip: false,\n visibleAll: true,\n display: 'relative',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'flex-start',\n alignItems: 'flex-start',\n alignContent: 'flex-start',\n baseOpacity: 1\n};\n\nexport const DefaultGlyphAttribute: Required<IGlyphGraphicAttribute> = {\n ...DefaultAttribute,\n path: '',\n width: 0,\n height: 0,\n cornerRadius: 0,\n clip: false\n};\n\nexport const DefaultLineAttribute: Required<ILineGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultConnectAttribute,\n points: [],\n segments: [],\n curveType: 'linear',\n clipRange: 1,\n clipRangeByDimension: 'default',\n closePath: false\n};\n\nexport const DefaultPathAttribute: Required<IPathGraphicAttribute> = {\n ...DefaultAttribute,\n path: new CustomPath2D(),\n customPath: () => {\n Logger.getInstance().warn('空函数');\n }\n};\n\nexport const DefaultPolygonAttribute: Required<IPolygonGraphicAttribute> = {\n ...DefaultAttribute,\n points: [],\n cornerRadius: 0,\n closePath: true\n};\n\nexport const DefaultRectAttribute: Required<IRectGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n x1: 0,\n y1: 0,\n strokeBoundsBuffer: 0,\n cornerRadius: 0\n};\n\nexport const DefaultRect3dAttribute: Required<IRect3dGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n x1: 0,\n y1: 0,\n cornerRadius: 0,\n length: 0\n};\n\nexport const DefaultSymbolAttribute: Required<ISymbolGraphicAttribute> = {\n ...DefaultAttribute,\n symbolType: 'circle',\n size: 10, // 外接**正方形**的边长\n keepDirIn3d: true\n};\n\nexport const DefaultTextAttribute: Required<ITextGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultTextStyle,\n strokeBoundsBuffer: 0,\n keepDirIn3d: true\n};\n\nexport const DefaultRichTextAttribute: Required<IRichTextGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultTextStyle,\n width: 300,\n height: 300,\n ellipsis: true,\n wordBreak: 'break-word' as RichTextWordBreak,\n verticalDirection: 'top' as RichTextVerticalDirection,\n textAlign: 'left' as RichTextGlobalAlignType,\n textBaseline: 'top' as RichTextGlobalBaselineType,\n layoutDirection: 'horizontal',\n textConfig: [],\n disableAutoWrapLine: false,\n maxHeight: undefined,\n maxWidth: undefined,\n singleLine: false\n};\n\nexport const DefaultImageAttribute: Required<IImageGraphicAttribute> = {\n repeatX: 'no-repeat',\n repeatY: 'no-repeat',\n image: '',\n width: 0,\n height: 0,\n ...DefaultAttribute,\n fill: true,\n cornerRadius: 0\n};\n\nexport const DefaultRichTextIconAttribute: Required<IRichTextIconGraphicAttribute> = {\n ...DefaultImageAttribute,\n backgroundShowMode: 'never',\n backgroundWidth: 0,\n backgroundHeight: 0,\n textAlign: 'left',\n textBaseline: 'middle',\n direction: 'horizontal',\n margin: 0,\n id: '',\n\n width: 20,\n height: 20,\n backgroundFill: 'rgba(101, 117, 168, 0.1)',\n backgroundFillOpacity: 1,\n backgroundStroke: false,\n backgroundStrokeOpacity: 1,\n backgroundRadius: 4,\n opacity: 1\n};\n"]}
1
+ {"version":3,"sources":["../src/graphic/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAiCvD,MAAM,CAAC,MAAM,aAAa,GAAY;IACpC,SAAS,EAAE,MAAM;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAe;IAC1C,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACnB,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACd,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IAChB,UAAU,EAAE,IAAI,MAAM,EAAE;CACzB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAe;IAC1C,WAAW,EAAE,CAAC;IACd,IAAI,EAAE,KAAK;IACX,UAAU,EAAE,CAAC;IACb,WAAW,EAAE,O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AEN,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,cAAc,EAAE,0BAA0B,EAC1C,qBAAqB,EAAE,CAAC,EACxB,gBAAgB,EAAE,KAAK,EACvB,uBAAuB,EAAE,CAAC,EAC1B,gBAAgB,EAAE,CAAC,EACnB,OAAO,EAAE,CAAC,GACX,CAAC","file":"config.js","sourcesContent":["// 存放公共属性\nimport { Logger, Matrix, pi2 } from '@visactor/vutils';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport type {\n IArcGraphicAttribute,\n IAreaGraphicAttribute,\n IGraphicAttribute,\n ICircleGraphicAttribute,\n IFillStyle,\n IGlyphGraphicAttribute,\n IGroupGraphicAttribute,\n IImageGraphicAttribute,\n ILineGraphicAttribute,\n IPathGraphicAttribute,\n IPolygonGraphicAttribute,\n IRect3dGraphicAttribute,\n IRectGraphicAttribute,\n IStrokeStyle,\n IGraphicStyle,\n ISymbolGraphicAttribute,\n ITextAttribute,\n ITextGraphicAttribute,\n IRichTextGraphicAttribute,\n ITransform,\n RichTextWordBreak,\n RichTextVerticalDirection,\n RichTextGlobalAlignType,\n RichTextGlobalBaselineType,\n IRichTextIconGraphicAttribute,\n IConnectedStyle,\n ILayout,\n IDebugType,\n IPickStyle\n} from '../interface';\n\nexport const DefaultLayout: ILayout = {\n alignSelf: 'auto'\n};\n\nexport const DefaultTransform: ITransform = {\n x: 0,\n y: 0,\n z: 0,\n dx: 0,\n dy: 0,\n dz: 0,\n scrollX: 0,\n scrollY: 0,\n scaleX: 1,\n scaleY: 1,\n scaleZ: 1,\n angle: 0,\n alpha: 0,\n beta: 0,\n scaleCenter: [0, 0],\n anchor: [0, 0],\n anchor3d: [0, 0],\n postMatrix: new Matrix()\n};\n\nexport const DefaultFillStyle: IFillStyle = {\n fillOpacity: 1,\n fill: false,\n shadowBlur: 0,\n shadowColor: 'black',\n shadowOffsetX: 0,\n shadowOffsetY: 0\n};\n\nconst commonStroke: Omit<IStrokeStyle, 'outerBorder' | 'innerBorder'> = {\n strokeOpacity: 1,\n lineDash: [],\n lineDashOffset: 0,\n lineWidth: 1,\n lineCap: 'butt',\n lineJoin: 'miter',\n miterLimit: 10,\n strokeBoundsBuffer: 2,\n stroke: false\n};\n\nexport const DefaultStrokeStyle: IStrokeStyle = {\n outerBorder: { ...commonStroke, distance: 0 },\n innerBorder: { ...commonStroke, distance: 0 },\n ...commonStroke\n};\n\nexport const DefaultTextStyle: Required<ITextAttribute> = {\n text: '',\n maxLineWidth: Infinity,\n textAlign: 'left',\n textBaseline: 'alphabetic',\n fontSize: 16,\n // @ts-ignore\n fontFamily: `PingFang SC,Microsoft Yahei,system-ui,-apple-system,segoe ui,\n Roboto,Helvetica,Arial,sans-serif, apple color emoji,segoe ui emoji,segoe ui symbol`,\n fontWeight: '',\n ellipsis: '…',\n fontVariant: '',\n fontStyle: '',\n lineHeight: undefined,\n underline: 0,\n lineThrough: 0,\n scaleIn3d: false,\n direction: 'horizontal',\n wordBreak: 'break-all',\n ignoreBuf: false,\n verticalMode: 0,\n wrap: false,\n whiteSpace: 'no-wrap',\n heightLimit: Infinity,\n lineClamp: Infinity,\n suffixPosition: 'end',\n underlineDash: [],\n underlineOffset: 0,\n disableAutoClipedPoptip: undefined\n};\n\nexport const DefaultPickStyle: IPickStyle = {\n pickStrokeBuffer: 0\n};\n\nexport const DefaultStyle: IGraphicStyle = {\n forceBoundsWidth: undefined,\n forceBoundsHeight: undefined,\n opacity: 1,\n background: null,\n backgroundOpacity: 1,\n backgroundCornerRadius: 0,\n texture: null,\n textureColor: 'black',\n textureSize: 10,\n texturePadding: 2,\n backgroundMode: 'no-repeat',\n backgroundFit: true,\n blur: 0,\n cursor: null,\n html: null,\n react: null,\n ...DefaultFillStyle,\n ...DefaultStrokeStyle,\n ...DefaultLayout,\n ...DefaultPickStyle\n};\n\nexport const DefaultConnectAttribute: Required<IConnectedStyle> = {\n connectedType: 'none',\n // connectedStyle: {\n // stroke: DefaultStrokeStyle.stroke,\n // strokeOpacity: DefaultStrokeStyle.strokeOpacity,\n // lineDash: DefaultStrokeStyle.lineDash,\n // lineDashOffset: DefaultStrokeStyle.lineDashOffset,\n // lineCap: DefaultStrokeStyle.lineCap,\n // lineJoin: DefaultStrokeStyle.lineJoin,\n // lineWidth: DefaultStrokeStyle.lineWidth,\n // fill: DefaultFillStyle.fill,\n // fillOpacity: DefaultFillStyle.fillOpacity\n // },\n connectedStyle: {}, // 默认全都继承父属性\n connectedX: NaN,\n connectedY: NaN\n} as IConnectedStyle;\n\nexport const DefaultDebugAttribute: Required<IDebugType> = {\n _debug_bounds: false\n};\n\nexport const DefaultAttribute: Required<IGraphicAttribute> = {\n strokeSeg: null,\n renderable: true,\n pickable: true,\n shadowGraphic: undefined,\n childrenPickable: true,\n fillPickable: true,\n strokePickable: true,\n visible: true,\n zIndex: 0,\n layout: null,\n boundsPadding: 0,\n renderStyle: 'default',\n pickMode: 'accurate',\n customPickShape: null,\n boundsMode: 'accurate',\n keepDirIn3d: true,\n shadowRootIdx: 1,\n globalZIndex: 1,\n globalCompositeOperation: '',\n overflow: 'hidden',\n ...DefaultDebugAttribute,\n ...DefaultStyle,\n ...DefaultTransform\n};\n\nexport function addAttributeToPrototype(obj: Record<string, any>, c: any, keys: string[]) {\n keys.forEach(key => {\n c.prototype[key] = obj[key];\n });\n}\nexport function rewriteProto(obj: Record<string, any>, c: Record<string, any>) {\n Object.setPrototypeOf(obj, c);\n}\n\nexport const DefaultArcAttribute: Required<IArcGraphicAttribute> = {\n ...DefaultAttribute,\n startAngle: 0,\n endAngle: pi2,\n innerRadius: 0,\n outerRadius: 1,\n innerPadding: 0,\n outerPadding: 0,\n cornerRadius: 0,\n padRadius: 0,\n padAngle: 0,\n cap: false,\n forceShowCap: false\n};\n\nexport const DefaultAreaAttribute: Required<IAreaGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultConnectAttribute,\n points: [],\n segments: [],\n curveType: 'linear',\n clipRange: 1,\n closePath: false\n};\n\nexport const DefaultCircleAttribute: Required<ICircleGraphicAttribute> = {\n ...DefaultAttribute,\n radius: 1,\n startAngle: 0,\n endAngle: pi2\n};\n\nexport const DefaultGroupAttribute: Required<IGroupGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n cornerRadius: 0,\n path: [],\n clip: false,\n visibleAll: true,\n display: 'relative',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'flex-start',\n alignItems: 'flex-start',\n alignContent: 'flex-start',\n baseOpacity: 1\n};\n\nexport const DefaultGlyphAttribute: Required<IGlyphGraphicAttribute> = {\n ...DefaultAttribute,\n path: '',\n width: 0,\n height: 0,\n cornerRadius: 0,\n clip: false\n};\n\nexport const DefaultLineAttribute: Required<ILineGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultConnectAttribute,\n points: [],\n segments: [],\n curveType: 'linear',\n clipRange: 1,\n clipRangeByDimension: 'default',\n closePath: false\n};\n\nexport const DefaultPathAttribute: Required<IPathGraphicAttribute> = {\n ...DefaultAttribute,\n path: new CustomPath2D(),\n customPath: () => {\n Logger.getInstance().warn('空函数');\n }\n};\n\nexport const DefaultPolygonAttribute: Required<IPolygonGraphicAttribute> = {\n ...DefaultAttribute,\n points: [],\n cornerRadius: 0,\n closePath: true\n};\n\nexport const DefaultRectAttribute: Required<IRectGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n x1: 0,\n y1: 0,\n strokeBoundsBuffer: 0,\n cornerRadius: 0\n};\n\nexport const DefaultRect3dAttribute: Required<IRect3dGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n x1: 0,\n y1: 0,\n cornerRadius: 0,\n length: 0\n};\n\nexport const DefaultSymbolAttribute: Required<ISymbolGraphicAttribute> = {\n ...DefaultAttribute,\n symbolType: 'circle',\n size: 10, // 外接**正方形**的边长\n keepDirIn3d: true\n};\n\nexport const DefaultTextAttribute: Required<ITextGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultTextStyle,\n strokeBoundsBuffer: 0,\n keepDirIn3d: true\n};\n\nexport const DefaultRichTextAttribute: Required<IRichTextGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultTextStyle,\n width: 300,\n height: 300,\n ellipsis: true,\n wordBreak: 'break-word' as RichTextWordBreak,\n verticalDirection: 'top' as RichTextVerticalDirection,\n textAlign: 'left' as RichTextGlobalAlignType,\n textBaseline: 'top' as RichTextGlobalBaselineType,\n layoutDirection: 'horizontal',\n textConfig: [],\n disableAutoWrapLine: false,\n maxHeight: undefined,\n maxWidth: undefined,\n singleLine: false\n};\n\nexport const DefaultImageAttribute: Required<IImageGraphicAttribute> = {\n repeatX: 'no-repeat',\n repeatY: 'no-repeat',\n image: '',\n width: 0,\n height: 0,\n ...DefaultAttribute,\n fill: true,\n cornerRadius: 0\n};\n\nexport const DefaultRichTextIconAttribute: Required<IRichTextIconGraphicAttribute> = {\n ...DefaultImageAttribute,\n backgroundShowMode: 'never',\n backgroundWidth: 0,\n backgroundHeight: 0,\n textAlign: 'left',\n textBaseline: 'middle',\n direction: 'horizontal',\n margin: 0,\n id: '',\n\n width: 20,\n height: 20,\n backgroundFill: 'rgba(101, 117, 168, 0.1)',\n backgroundFillOpacity: 1,\n backgroundStroke: false,\n backgroundStrokeOpacity: 1,\n backgroundRadius: 4,\n opacity: 1\n};\n"]}
@@ -7,11 +7,9 @@ import { application } from "../application";
7
7
  import { GLYPH_NUMBER_TYPE } from "./constants";
8
8
 
9
9
  export class Glyph extends Graphic {
10
- type="glyph";
11
- static NOWORK_ANIMATE_ATTR=NOWORK_ANIMATE_ATTR;
12
10
  constructor(params) {
13
- super(params), this.numberType = GLYPH_NUMBER_TYPE, this.subGraphic = [], this._onInit && this._onInit(this),
14
- this.valid = this.isValid();
11
+ super(params), this.type = "glyph", this.numberType = GLYPH_NUMBER_TYPE, this.subGraphic = [],
12
+ this._onInit && this._onInit(this), this.valid = this.isValid();
15
13
  }
16
14
  setSubGraphic(subGraphic) {
17
15
  this.detachSubGraphic(), this.subGraphic = subGraphic, subGraphic.forEach((g => {
@@ -90,12 +88,14 @@ export class Glyph extends Graphic {
90
88
  return !1;
91
89
  }
92
90
  useStates(states, hasAnimation) {
91
+ var _a;
93
92
  if (!states.length) return void this.clearStates(hasAnimation);
94
- if (!(this.currentStates?.length !== states.length || states.some(((stateName, index) => this.currentStates[index] !== stateName)))) return;
93
+ if (!((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) !== states.length || states.some(((stateName, index) => this.currentStates[index] !== stateName)))) return;
95
94
  const stateAttrs = {}, subAttrs = this.subGraphic.map((() => ({})));
96
95
  states.forEach((stateName => {
96
+ var _a;
97
97
  const attrs = this.glyphStateProxy ? this.glyphStateProxy(stateName, states) : this.glyphStates[stateName];
98
- attrs && (Object.assign(stateAttrs, attrs.attributes), attrs.subAttributes?.length && subAttrs.forEach(((subAttrs, index) => {
98
+ attrs && (Object.assign(stateAttrs, attrs.attributes), (null === (_a = attrs.subAttributes) || void 0 === _a ? void 0 : _a.length) && subAttrs.forEach(((subAttrs, index) => {
99
99
  Object.assign(subAttrs, attrs.subAttributes[index]);
100
100
  })));
101
101
  })), this.subGraphic.forEach(((graphic, index) => {
@@ -110,9 +110,7 @@ export class Glyph extends Graphic {
110
110
  this.normalAttrs = null, this.currentStates = []);
111
111
  }
112
112
  clone() {
113
- const glyph = new Glyph({
114
- ...this.attribute
115
- });
113
+ const glyph = new Glyph(Object.assign({}, this.attribute));
116
114
  return glyph.setSubGraphic(this.subGraphic.map((g => g.clone()))), glyph;
117
115
  }
118
116
  getNoWorkAnimateAttr() {
@@ -120,6 +118,8 @@ export class Glyph extends Graphic {
120
118
  }
121
119
  }
122
120
 
121
+ Glyph.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;
122
+
123
123
  export function createGlyph(attributes) {
124
124
  return new Glyph(attributes);
125
125
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/glyph.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAA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AC,WAAW,EAAE,IAAI,CAAC,aAAa,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;YACrF,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;QAC7B,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,aAAa,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;QAC/E,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QAExB,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;IAC1B,CAAC;IAED,KAAK;QACH,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;QAC/C,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACzD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,oBAAoB;QAClB,OAAO,KAAK,CAAC,mBAAmB,CAAC;IACnC,CAAC;;AAGH,MAAM,UAAU,WAAW,CAAC,UAAkC;IAC5D,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;AAC/B,CAAC","file":"glyph.js","sourcesContent":["import type { AABBBounds, IPointLike, OBBBounds } from '@visactor/vutils';\nimport { Graphic, NOWORK_ANIMATE_ATTR } from './graphic';\nimport type {\n GraphicType,\n IGraphic,\n IGlyph,\n IGlyphGraphicAttribute,\n IGraphicAttribute,\n ISetAttributeContext\n} from '../interface';\nimport { getTheme } from './theme';\nimport { application } from '../application';\nimport { GLYPH_NUMBER_TYPE } from './constants';\n\nexport class Glyph extends Graphic<IGlyphGraphicAttribute> implements IGlyph {\n type: GraphicType = 'glyph';\n declare _onInit: (g: IGlyph) => void;\n declare _onUpdate: (g: IGlyph) => void;\n declare glyphStates?: Record<\n string,\n {\n attributes: Partial<IGlyphGraphicAttribute>;\n subAttributes: Partial<IGraphicAttribute>[];\n }\n >;\n declare glyphStateProxy?: (\n stateName: string,\n targetStates?: string[]\n ) => {\n attributes: Partial<IGlyphGraphicAttribute>;\n subAttributes: Partial<IGraphicAttribute>[];\n };\n protected declare subGraphic: IGraphic[];\n\n static NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;\n\n constructor(params: Partial<IGlyphGraphicAttribute>) {\n super(params);\n this.numberType = GLYPH_NUMBER_TYPE;\n this.subGraphic = [];\n this._onInit && this._onInit(this);\n this.valid = this.isValid();\n }\n\n setSubGraphic(subGraphic: IGraphic[]) {\n this.detachSubGraphic();\n this.subGraphic = subGraphic;\n subGraphic.forEach(g => {\n g.glyphHost = this;\n Object.setPrototypeOf(g.attribute, this.attribute);\n });\n this.valid = this.isValid();\n this.addUpdateBoundTag();\n }\n\n protected detachSubGraphic() {\n this.subGraphic.forEach(g => {\n g.glyphHost = null;\n Object.setPrototypeOf(g.attribute, {});\n });\n }\n\n getSubGraphic() {\n return this.subGraphic;\n }\n\n onInit(cb: (g: this) => void): void {\n this._onInit = cb;\n }\n\n onUpdate(cb: (g: this) => void): void {\n this._onUpdate = cb;\n }\n\n isValid(): boolean {\n return true;\n }\n\n setAttribute(key: string, value: any, forceUpdateTag?: boolean, context?: ISetAttributeContext) {\n super.setAttribute(key, value, forceUpdateTag, context);\n this.subGraphic.forEach(g => {\n g.addUpdateShapeAndBoundsTag();\n g.addUpdatePositionTag();\n });\n }\n\n setAttributes(\n params: Partial<IGlyphGraphicAttribute>,\n forceUpdateTag: boolean = false,\n context?: ISetAttributeContext\n ) {\n super.setAttributes(params, forceUpdateTag, context);\n this.subGraphic.forEach(g => {\n g.addUpdateShapeAndBoundsTag();\n g.addUpdatePositionTag();\n });\n }\n\n translate(x: number, y: number) {\n super.translate(x, y);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n translateTo(x: number, y: number) {\n super.translateTo(x, y);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n scale(scaleX: number, scaleY: number, scaleCenter?: IPointLike) {\n super.scale(scaleX, scaleY, scaleCenter);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n scaleTo(scaleX: number, scaleY: number) {\n super.scaleTo(scaleX, scaleY);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n rotate(angle: number) {\n super.rotate(angle);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n rotateTo(angle: number) {\n super.rotate(angle);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n protected doUpdateAABBBounds(): AABBBounds {\n this._AABBBounds.clear();\n const bounds = application.graphicService.updateGlyphAABBBounds(\n this.attribute,\n getTheme(this).glyph,\n this._AABBBounds,\n this\n ) as AABBBounds;\n this.clearUpdateBoundTag();\n return bounds;\n }\n\n protected tryUpdateOBBBounds(): OBBBounds {\n throw new Error('暂不支持');\n }\n\n protected needUpdateTags(keys: string[]): boolean {\n return false;\n }\n protected needUpdateTag(key: string): boolean {\n return false;\n }\n\n useStates(states: string[], hasAnimation?: boolean): void {\n if (!states.length) {\n this.clearStates(hasAnimation);\n return;\n }\n\n const isChange =\n this.currentStates?.length !== states.length ||\n states.some((stateName, index) => this.currentStates[index] !== stateName);\n if (!isChange) {\n return;\n }\n\n const stateAttrs = {};\n const subAttrs = this.subGraphic.map(() => ({}));\n states.forEach(stateName => {\n const attrs = this.glyphStateProxy ? this.glyphStateProxy(stateName, states) : this.glyphStates[stateName];\n\n if (attrs) {\n Object.assign(stateAttrs, attrs.attributes);\n\n if (attrs.subAttributes?.length) {\n subAttrs.forEach((subAttrs, index) => {\n Object.assign(subAttrs, attrs.subAttributes[index]);\n });\n }\n }\n });\n\n this.subGraphic.forEach((graphic, index) => {\n graphic.updateNormalAttrs(subAttrs[index]);\n graphic.applyStateAttrs(subAttrs[index], states, hasAnimation);\n });\n\n this.updateNormalAttrs(stateAttrs);\n this.currentStates = states;\n this.applyStateAttrs(stateAttrs, states, hasAnimation);\n }\n\n clearStates(hasAnimation?: boolean) {\n if (!this.hasState() || !this.normalAttrs) {\n return;\n }\n\n this.subGraphic.forEach(graphic => {\n graphic.applyStateAttrs(graphic.normalAttrs, this.currentStates, hasAnimation, true);\n graphic.normalAttrs = null;\n });\n\n this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, true);\n this.normalAttrs = null;\n\n this.currentStates = [];\n }\n\n clone(): Graphic<Partial<IGlyphGraphicAttribute>> {\n const glyph = new Glyph({ ...this.attribute });\n glyph.setSubGraphic(this.subGraphic.map(g => g.clone()));\n return glyph;\n }\n\n getNoWorkAnimateAttr(): Record<string, number> {\n return Glyph.NOWORK_ANIMATE_ATTR;\n }\n}\n\nexport function createGlyph(attributes: IGlyphGraphicAttribute): IGlyph {\n return new Glyph(attributes);\n}\n"]}
1
+ {"version":3,"sources":["../src/graphic/glyph.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AASzD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,OAAO,KAAM,SAAQ,OAA+B;IAsBxD,YAAY,MAAuC;QACjD,KAAK,CAAC,MAAM,CAAC,CAAC;QAtBhB,SAAI,GAAgB,OAAO,CAAC;QAuB1B,IAAI,CAAC,UAAU,GAAG,iBAAiB,CAAC;QACpC,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QACrB,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC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AC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACzD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,oBAAoB;QAClB,OAAO,KAAK,CAAC,mBAAmB,CAAC;IACnC,CAAC;;AAlNM,yBAAmB,GAAG,mBAAmB,CAAC;AAqNnD,MAAM,UAAU,WAAW,CAAC,UAAkC;IAC5D,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;AAC/B,CAAC","file":"glyph.js","sourcesContent":["import type { AABBBounds, IPointLike, OBBBounds } from '@visactor/vutils';\nimport { Graphic, NOWORK_ANIMATE_ATTR } from './graphic';\nimport type {\n GraphicType,\n IGraphic,\n IGlyph,\n IGlyphGraphicAttribute,\n IGraphicAttribute,\n ISetAttributeContext\n} from '../interface';\nimport { getTheme } from './theme';\nimport { application } from '../application';\nimport { GLYPH_NUMBER_TYPE } from './constants';\n\nexport class Glyph extends Graphic<IGlyphGraphicAttribute> implements IGlyph {\n type: GraphicType = 'glyph';\n declare _onInit: (g: IGlyph) => void;\n declare _onUpdate: (g: IGlyph) => void;\n declare glyphStates?: Record<\n string,\n {\n attributes: Partial<IGlyphGraphicAttribute>;\n subAttributes: Partial<IGraphicAttribute>[];\n }\n >;\n declare glyphStateProxy?: (\n stateName: string,\n targetStates?: string[]\n ) => {\n attributes: Partial<IGlyphGraphicAttribute>;\n subAttributes: Partial<IGraphicAttribute>[];\n };\n protected declare subGraphic: IGraphic[];\n\n static NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;\n\n constructor(params: Partial<IGlyphGraphicAttribute>) {\n super(params);\n this.numberType = GLYPH_NUMBER_TYPE;\n this.subGraphic = [];\n this._onInit && this._onInit(this);\n this.valid = this.isValid();\n }\n\n setSubGraphic(subGraphic: IGraphic[]) {\n this.detachSubGraphic();\n this.subGraphic = subGraphic;\n subGraphic.forEach(g => {\n g.glyphHost = this;\n Object.setPrototypeOf(g.attribute, this.attribute);\n });\n this.valid = this.isValid();\n this.addUpdateBoundTag();\n }\n\n protected detachSubGraphic() {\n this.subGraphic.forEach(g => {\n g.glyphHost = null;\n Object.setPrototypeOf(g.attribute, {});\n });\n }\n\n getSubGraphic() {\n return this.subGraphic;\n }\n\n onInit(cb: (g: this) => void): void {\n this._onInit = cb;\n }\n\n onUpdate(cb: (g: this) => void): void {\n this._onUpdate = cb;\n }\n\n isValid(): boolean {\n return true;\n }\n\n setAttribute(key: string, value: any, forceUpdateTag?: boolean, context?: ISetAttributeContext) {\n super.setAttribute(key, value, forceUpdateTag, context);\n this.subGraphic.forEach(g => {\n g.addUpdateShapeAndBoundsTag();\n g.addUpdatePositionTag();\n });\n }\n\n setAttributes(\n params: Partial<IGlyphGraphicAttribute>,\n forceUpdateTag: boolean = false,\n context?: ISetAttributeContext\n ) {\n super.setAttributes(params, forceUpdateTag, context);\n this.subGraphic.forEach(g => {\n g.addUpdateShapeAndBoundsTag();\n g.addUpdatePositionTag();\n });\n }\n\n translate(x: number, y: number) {\n super.translate(x, y);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n translateTo(x: number, y: number) {\n super.translateTo(x, y);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n scale(scaleX: number, scaleY: number, scaleCenter?: IPointLike) {\n super.scale(scaleX, scaleY, scaleCenter);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n scaleTo(scaleX: number, scaleY: number) {\n super.scaleTo(scaleX, scaleY);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n rotate(angle: number) {\n super.rotate(angle);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n rotateTo(angle: number) {\n super.rotate(angle);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n protected doUpdateAABBBounds(): AABBBounds {\n this._AABBBounds.clear();\n const bounds = application.graphicService.updateGlyphAABBBounds(\n this.attribute,\n getTheme(this).glyph,\n this._AABBBounds,\n this\n ) as AABBBounds;\n this.clearUpdateBoundTag();\n return bounds;\n }\n\n protected tryUpdateOBBBounds(): OBBBounds {\n throw new Error('暂不支持');\n }\n\n protected needUpdateTags(keys: string[]): boolean {\n return false;\n }\n protected needUpdateTag(key: string): boolean {\n return false;\n }\n\n useStates(states: string[], hasAnimation?: boolean): void {\n if (!states.length) {\n this.clearStates(hasAnimation);\n return;\n }\n\n const isChange =\n this.currentStates?.length !== states.length ||\n states.some((stateName, index) => this.currentStates[index] !== stateName);\n if (!isChange) {\n return;\n }\n\n const stateAttrs = {};\n const subAttrs = this.subGraphic.map(() => ({}));\n states.forEach(stateName => {\n const attrs = this.glyphStateProxy ? this.glyphStateProxy(stateName, states) : this.glyphStates[stateName];\n\n if (attrs) {\n Object.assign(stateAttrs, attrs.attributes);\n\n if (attrs.subAttributes?.length) {\n subAttrs.forEach((subAttrs, index) => {\n Object.assign(subAttrs, attrs.subAttributes[index]);\n });\n }\n }\n });\n\n this.subGraphic.forEach((graphic, index) => {\n graphic.updateNormalAttrs(subAttrs[index]);\n graphic.applyStateAttrs(subAttrs[index], states, hasAnimation);\n });\n\n this.updateNormalAttrs(stateAttrs);\n this.currentStates = states;\n this.applyStateAttrs(stateAttrs, states, hasAnimation);\n }\n\n clearStates(hasAnimation?: boolean) {\n if (!this.hasState() || !this.normalAttrs) {\n return;\n }\n\n this.subGraphic.forEach(graphic => {\n graphic.applyStateAttrs(graphic.normalAttrs, this.currentStates, hasAnimation, true);\n graphic.normalAttrs = null;\n });\n\n this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, true);\n this.normalAttrs = null;\n\n this.currentStates = [];\n }\n\n clone(): Graphic<Partial<IGlyphGraphicAttribute>> {\n const glyph = new Glyph({ ...this.attribute });\n glyph.setSubGraphic(this.subGraphic.map(g => g.clone()));\n return glyph;\n }\n\n getNoWorkAnimateAttr(): Record<string, number> {\n return Glyph.NOWORK_ANIMATE_ATTR;\n }\n}\n\nexport function createGlyph(attributes: IGlyphGraphicAttribute): IGlyph {\n return new Glyph(attributes);\n}\n"]}
@@ -150,6 +150,7 @@ export function getExtraModelMatrix(dx, dy, graphic) {
150
150
  }
151
151
 
152
152
  export function getModelMatrix(out, graphic, theme) {
153
+ var _a;
153
154
  const {x: x = theme.x, y: y = theme.y, z: z = theme.z, dx: dx = theme.dx, dy: dy = theme.dy, dz: dz = theme.dz, scaleX: scaleX = theme.scaleX, scaleY: scaleY = theme.scaleY, scaleZ: scaleZ = theme.scaleZ, alpha: alpha = theme.alpha, beta: beta = theme.beta, angle: angle = theme.angle, anchor3d: anchor3d = graphic.attribute.anchor, anchor: anchor} = graphic.attribute, _anchor = [ 0, 0, 0 ];
154
155
  if (anchor3d) {
155
156
  if ("string" == typeof anchor3d[0]) {
@@ -160,7 +161,7 @@ export function getModelMatrix(out, graphic, theme) {
160
161
  const ratio = parseFloat(anchor3d[1]) / 100, bounds = graphic.AABBBounds;
161
162
  _anchor[1] = bounds.x1 + (bounds.x2 - bounds.x1) * ratio;
162
163
  } else _anchor[1] = anchor3d[1];
163
- _anchor[2] = anchor3d[2] ?? 0;
164
+ _anchor[2] = null !== (_a = anchor3d[2]) && void 0 !== _a ? _a : 0;
164
165
  }
165
166
  if (identity(out), translate(out, out, [ x + dx, y + dy, z + dz ]), translate(out, out, [ _anchor[0], _anchor[1], _anchor[2] ]),
166
167
  rotateX(out, out, beta), rotateY(out, out, alpha), translate(out, out, [ -_anchor[0], -_anchor[1], _anchor[2] ]),
@@ -187,14 +188,6 @@ export function shouldUseMat4(graphic) {
187
188
  }
188
189
 
189
190
  let DefaultGraphicService = class {
190
- creator;
191
- _rectBoundsContribitions;
192
- _symbolBoundsContribitions;
193
- _circleBoundsContribitions;
194
- _arcBoundsContribitions;
195
- _pathBoundsContribitions;
196
- tempAABBBounds1;
197
- tempAABBBounds2;
198
191
  constructor(creator) {
199
192
  this.creator = creator, this.hooks = {
200
193
  onAttributeUpdate: new SyncHook([ "graphic" ]),
@@ -245,7 +238,8 @@ let DefaultGraphicService = class {
245
238
  if (!this.updatePathProxyAABBBounds(aabbBounds, graphic)) {
246
239
  let {width: width, height: height} = attribute;
247
240
  const {x1: x1, y1: y1, x: x, y: y} = attribute;
248
- width = width ?? x1 - x, height = height ?? y1 - y, aabbBounds.set(0, 0, width || 0, height || 0);
241
+ width = null != width ? width : x1 - x, height = null != height ? height : y1 - y,
242
+ aabbBounds.set(0, 0, width || 0, height || 0);
249
243
  }
250
244
  const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
251
245
  return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
@@ -433,14 +427,16 @@ let DefaultGraphicService = class {
433
427
  updateAreaAABBBoundsByPoints(attribute, areaTheme, aabbBounds, graphic) {
434
428
  const {points: points = areaTheme.points} = attribute, b = aabbBounds;
435
429
  return points.forEach((p => {
436
- b.add(p.x, p.y), b.add(p.x1 ?? p.x, p.y1 ?? p.y);
430
+ var _a, _b;
431
+ b.add(p.x, p.y), b.add(null !== (_a = p.x1) && void 0 !== _a ? _a : p.x, null !== (_b = p.y1) && void 0 !== _b ? _b : p.y);
437
432
  })), b;
438
433
  }
439
434
  updateAreaAABBBoundsBySegments(attribute, areaTheme, aabbBounds, graphic) {
440
435
  const {segments: segments = areaTheme.segments} = attribute, b = aabbBounds;
441
436
  return segments.forEach((s => {
442
437
  s.points.forEach((p => {
443
- b.add(p.x, p.y), b.add(p.x1 ?? p.x, p.y1 ?? p.y);
438
+ var _a, _b;
439
+ b.add(p.x, p.y), b.add(null !== (_a = p.x1) && void 0 !== _a ? _a : p.x, null !== (_b = p.y1) && void 0 !== _b ? _b : p.y);
444
440
  }));
445
441
  })), b;
446
442
  }