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

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 (758) 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.js +51 -54
  14. package/cjs/animate/custom-animate.js.map +1 -1
  15. package/cjs/animate/easing.js +8 -19
  16. package/cjs/animate/easing.js.map +1 -1
  17. package/cjs/animate/morphing.js +23 -20
  18. package/cjs/animate/morphing.js.map +1 -1
  19. package/cjs/application.js +1 -7
  20. package/cjs/application.js.map +1 -1
  21. package/cjs/canvas/conical-gradient.js +5 -12
  22. package/cjs/canvas/conical-gradient.js.map +1 -1
  23. package/cjs/canvas/contributions/base-canvas.js +7 -19
  24. package/cjs/canvas/contributions/base-canvas.js.map +1 -1
  25. package/cjs/color-string/interpolate.js +3 -5
  26. package/cjs/color-string/interpolate.js.map +1 -1
  27. package/cjs/color-string/store.js +1 -3
  28. package/cjs/color-string/store.js.map +1 -1
  29. package/cjs/common/bounds-context.js +0 -1
  30. package/cjs/common/bounds-context.js.map +1 -1
  31. package/cjs/common/canvas-utils.js +6 -3
  32. package/cjs/common/canvas-utils.js.map +1 -1
  33. package/cjs/common/contribution-provider.js +0 -3
  34. package/cjs/common/contribution-provider.js.map +1 -1
  35. package/cjs/common/custom-path2d.js +1 -7
  36. package/cjs/common/custom-path2d.js.map +1 -1
  37. package/cjs/common/generator.js +1 -2
  38. package/cjs/common/generator.js.map +1 -1
  39. package/cjs/common/inversify/binding.js +0 -12
  40. package/cjs/common/inversify/binding.js.map +1 -1
  41. package/cjs/common/inversify/container.js +0 -4
  42. package/cjs/common/inversify/container.js.map +1 -1
  43. package/cjs/common/inversify/cotainer-module.js +0 -2
  44. package/cjs/common/inversify/cotainer-module.js.map +1 -1
  45. package/cjs/common/inversify/meta-data.js +0 -2
  46. package/cjs/common/inversify/meta-data.js.map +1 -1
  47. package/cjs/common/inversify/syntax/binding_in_syntax.js +0 -1
  48. package/cjs/common/inversify/syntax/binding_in_syntax.js.map +1 -1
  49. package/cjs/common/inversify/syntax/binding_to_syntax.js +0 -1
  50. package/cjs/common/inversify/syntax/binding_to_syntax.js.map +1 -1
  51. package/cjs/common/inversify-lite/annotation/lazy_service_identifier.js +0 -1
  52. package/cjs/common/inversify-lite/annotation/lazy_service_identifier.js.map +1 -1
  53. package/cjs/common/inversify-lite/bindings/binding.js +0 -14
  54. package/cjs/common/inversify-lite/bindings/binding.js.map +1 -1
  55. package/cjs/common/inversify-lite/container/container.js +46 -22
  56. package/cjs/common/inversify-lite/container/container.js.map +1 -1
  57. package/cjs/common/inversify-lite/container/container_module.js +0 -4
  58. package/cjs/common/inversify-lite/container/container_module.js.map +1 -1
  59. package/cjs/common/inversify-lite/container/lookup.js +0 -1
  60. package/cjs/common/inversify-lite/container/lookup.js.map +1 -1
  61. package/cjs/common/inversify-lite/planning/context.js +0 -4
  62. package/cjs/common/inversify-lite/planning/context.js.map +1 -1
  63. package/cjs/common/inversify-lite/planning/metadata.js +0 -2
  64. package/cjs/common/inversify-lite/planning/metadata.js.map +1 -1
  65. package/cjs/common/inversify-lite/planning/plan.js +0 -2
  66. package/cjs/common/inversify-lite/planning/plan.js.map +1 -1
  67. package/cjs/common/inversify-lite/planning/queryable_string.js +0 -1
  68. package/cjs/common/inversify-lite/planning/queryable_string.js.map +1 -1
  69. package/cjs/common/inversify-lite/planning/request.js +0 -8
  70. package/cjs/common/inversify-lite/planning/request.js.map +1 -1
  71. package/cjs/common/inversify-lite/planning/target.js +0 -7
  72. package/cjs/common/inversify-lite/planning/target.js.map +1 -1
  73. package/cjs/common/inversify-lite/resolution/instantiation.js +42 -16
  74. package/cjs/common/inversify-lite/resolution/instantiation.js.map +1 -1
  75. package/cjs/common/inversify-lite/scope/scope.js +29 -3
  76. package/cjs/common/inversify-lite/scope/scope.js.map +1 -1
  77. package/cjs/common/inversify-lite/syntax/binding_in_syntax.js +0 -1
  78. package/cjs/common/inversify-lite/syntax/binding_in_syntax.js.map +1 -1
  79. package/cjs/common/inversify-lite/syntax/binding_in_when_on_syntax.js +0 -3
  80. package/cjs/common/inversify-lite/syntax/binding_in_when_on_syntax.js.map +1 -1
  81. package/cjs/common/inversify-lite/syntax/binding_on_syntax.js +0 -1
  82. package/cjs/common/inversify-lite/syntax/binding_on_syntax.js.map +1 -1
  83. package/cjs/common/inversify-lite/syntax/binding_to_syntax.js +0 -1
  84. package/cjs/common/inversify-lite/syntax/binding_to_syntax.js.map +1 -1
  85. package/cjs/common/inversify-lite/syntax/binding_when_on_syntax.js +0 -2
  86. package/cjs/common/inversify-lite/syntax/binding_when_on_syntax.js.map +1 -1
  87. package/cjs/common/inversify-lite/syntax/binding_when_syntax.js +0 -1
  88. package/cjs/common/inversify-lite/syntax/binding_when_syntax.js.map +1 -1
  89. package/cjs/common/polygon.js +2 -1
  90. package/cjs/common/polygon.js.map +1 -1
  91. package/cjs/common/render-area.js +3 -2
  92. package/cjs/common/render-area.js.map +1 -1
  93. package/cjs/common/render-curve.js +8 -4
  94. package/cjs/common/render-curve.js.map +1 -1
  95. package/cjs/common/seg-context.js +3 -12
  96. package/cjs/common/seg-context.js.map +1 -1
  97. package/cjs/common/segment/basis.js +0 -13
  98. package/cjs/common/segment/basis.js.map +1 -1
  99. package/cjs/common/segment/common.js +2 -2
  100. package/cjs/common/segment/common.js.map +1 -1
  101. package/cjs/common/segment/curve/arc.js +2 -2
  102. package/cjs/common/segment/curve/arc.js.map +1 -1
  103. package/cjs/common/segment/curve/base.js +0 -4
  104. package/cjs/common/segment/curve/base.js.map +1 -1
  105. package/cjs/common/segment/curve/cubic-bezier.js +2 -2
  106. package/cjs/common/segment/curve/cubic-bezier.js.map +1 -1
  107. package/cjs/common/segment/curve/curve-context.js +0 -4
  108. package/cjs/common/segment/curve/curve-context.js.map +1 -1
  109. package/cjs/common/segment/curve/ellipse.js +3 -3
  110. package/cjs/common/segment/curve/ellipse.js.map +1 -1
  111. package/cjs/common/segment/curve/line.js +1 -2
  112. package/cjs/common/segment/curve/line.js.map +1 -1
  113. package/cjs/common/segment/curve/move.js +1 -2
  114. package/cjs/common/segment/curve/move.js.map +1 -1
  115. package/cjs/common/segment/curve/path.js +0 -2
  116. package/cjs/common/segment/curve/path.js.map +1 -1
  117. package/cjs/common/segment/curve/quadratic-bezier.js +2 -2
  118. package/cjs/common/segment/curve/quadratic-bezier.js.map +1 -1
  119. package/cjs/common/segment/linear.js +0 -10
  120. package/cjs/common/segment/linear.js.map +1 -1
  121. package/cjs/common/segment/monotone.js +0 -13
  122. package/cjs/common/segment/monotone.js.map +1 -1
  123. package/cjs/common/segment/step.js +2 -13
  124. package/cjs/common/segment/step.js.map +1 -1
  125. package/cjs/common/sort.js +34 -3
  126. package/cjs/common/sort.js.map +1 -1
  127. package/cjs/common/split-path.js +11 -4
  128. package/cjs/common/split-path.js.map +1 -1
  129. package/cjs/common/utils.js +4 -8
  130. package/cjs/common/utils.js.map +1 -1
  131. package/cjs/common/xml/parser.js +2 -3
  132. package/cjs/common/xml/parser.js.map +1 -1
  133. package/cjs/core/camera.js +4 -11
  134. package/cjs/core/camera.js.map +1 -1
  135. package/cjs/core/contributions/env/base-contribution.js +0 -6
  136. package/cjs/core/contributions/env/base-contribution.js.map +1 -1
  137. package/cjs/core/contributions/layerHandler/canvas2d-contribution.js +11 -20
  138. package/cjs/core/contributions/layerHandler/canvas2d-contribution.js.map +1 -1
  139. package/cjs/core/contributions/layerHandler/empty-contribution.js +8 -8
  140. package/cjs/core/contributions/layerHandler/empty-contribution.js.map +1 -1
  141. package/cjs/core/contributions/layerHandler/offscreen2d-contribution.js +6 -5
  142. package/cjs/core/contributions/layerHandler/offscreen2d-contribution.js.map +1 -1
  143. package/cjs/core/contributions/textMeasure/AtextMeasure.js +8 -11
  144. package/cjs/core/contributions/textMeasure/AtextMeasure.js.map +1 -1
  145. package/cjs/core/contributions/textMeasure/layout.js +0 -3
  146. package/cjs/core/contributions/textMeasure/layout.js.map +1 -1
  147. package/cjs/core/contributions/window/base-contribution.js +0 -2
  148. package/cjs/core/contributions/window/base-contribution.js.map +1 -1
  149. package/cjs/core/global.js +0 -8
  150. package/cjs/core/global.js.map +1 -1
  151. package/cjs/core/graphic-utils.js +5 -16
  152. package/cjs/core/graphic-utils.js.map +1 -1
  153. package/cjs/core/layer-service.js +7 -7
  154. package/cjs/core/layer-service.js.map +1 -1
  155. package/cjs/core/layer.js +9 -7
  156. package/cjs/core/layer.js.map +1 -1
  157. package/cjs/core/stage.js +34 -68
  158. package/cjs/core/stage.js.map +1 -1
  159. package/cjs/core/window.js +13 -16
  160. package/cjs/core/window.js.map +1 -1
  161. package/cjs/event/event-manager.js +145 -153
  162. package/cjs/event/event-manager.js.map +1 -1
  163. package/cjs/event/event-system.js +43 -60
  164. package/cjs/event/event-system.js.map +1 -1
  165. package/cjs/event/event-target.js +3 -1
  166. package/cjs/event/event-target.js.map +1 -1
  167. package/cjs/event/federated-event/base-event.js +15 -43
  168. package/cjs/event/federated-event/base-event.js.map +1 -1
  169. package/cjs/event/federated-event/mouse-event.js +18 -27
  170. package/cjs/event/federated-event/mouse-event.js.map +1 -1
  171. package/cjs/event/federated-event/pointer-event.js +8 -12
  172. package/cjs/event/federated-event/pointer-event.js.map +1 -1
  173. package/cjs/event/federated-event/wheel-event.js +10 -13
  174. package/cjs/event/federated-event/wheel-event.js.map +1 -1
  175. package/cjs/graphic/arc.js +5 -10
  176. package/cjs/graphic/arc.js.map +1 -1
  177. package/cjs/graphic/arc3d.js +4 -7
  178. package/cjs/graphic/arc3d.js.map +1 -1
  179. package/cjs/graphic/area.js +9 -14
  180. package/cjs/graphic/area.js.map +1 -1
  181. package/cjs/graphic/builtin-symbol/arrow.js +3 -2
  182. package/cjs/graphic/builtin-symbol/arrow.js.map +1 -1
  183. package/cjs/graphic/builtin-symbol/arrow2-down.js +3 -2
  184. package/cjs/graphic/builtin-symbol/arrow2-down.js.map +1 -1
  185. package/cjs/graphic/builtin-symbol/arrow2-left.js +3 -2
  186. package/cjs/graphic/builtin-symbol/arrow2-left.js.map +1 -1
  187. package/cjs/graphic/builtin-symbol/arrow2-right.js +3 -2
  188. package/cjs/graphic/builtin-symbol/arrow2-right.js.map +1 -1
  189. package/cjs/graphic/builtin-symbol/arrow2-up.js +3 -2
  190. package/cjs/graphic/builtin-symbol/arrow2-up.js.map +1 -1
  191. package/cjs/graphic/builtin-symbol/circle.js +3 -2
  192. package/cjs/graphic/builtin-symbol/circle.js.map +1 -1
  193. package/cjs/graphic/builtin-symbol/close.js +3 -2
  194. package/cjs/graphic/builtin-symbol/close.js.map +1 -1
  195. package/cjs/graphic/builtin-symbol/cross.js +3 -2
  196. package/cjs/graphic/builtin-symbol/cross.js.map +1 -1
  197. package/cjs/graphic/builtin-symbol/diamond.js +3 -2
  198. package/cjs/graphic/builtin-symbol/diamond.js.map +1 -1
  199. package/cjs/graphic/builtin-symbol/line-h.js +3 -2
  200. package/cjs/graphic/builtin-symbol/line-h.js.map +1 -1
  201. package/cjs/graphic/builtin-symbol/line-v.js +3 -2
  202. package/cjs/graphic/builtin-symbol/line-v.js.map +1 -1
  203. package/cjs/graphic/builtin-symbol/rect.js +3 -2
  204. package/cjs/graphic/builtin-symbol/rect.js.map +1 -1
  205. package/cjs/graphic/builtin-symbol/square.js +3 -2
  206. package/cjs/graphic/builtin-symbol/square.js.map +1 -1
  207. package/cjs/graphic/builtin-symbol/star.js +3 -2
  208. package/cjs/graphic/builtin-symbol/star.js.map +1 -1
  209. package/cjs/graphic/builtin-symbol/stroke.js +3 -2
  210. package/cjs/graphic/builtin-symbol/stroke.js.map +1 -1
  211. package/cjs/graphic/builtin-symbol/thin-triangle.js +3 -2
  212. package/cjs/graphic/builtin-symbol/thin-triangle.js.map +1 -1
  213. package/cjs/graphic/builtin-symbol/triangle-down.js +3 -2
  214. package/cjs/graphic/builtin-symbol/triangle-down.js.map +1 -1
  215. package/cjs/graphic/builtin-symbol/triangle-left.js +3 -2
  216. package/cjs/graphic/builtin-symbol/triangle-left.js.map +1 -1
  217. package/cjs/graphic/builtin-symbol/triangle-right.js +3 -2
  218. package/cjs/graphic/builtin-symbol/triangle-right.js.map +1 -1
  219. package/cjs/graphic/builtin-symbol/triangle-up.js +3 -2
  220. package/cjs/graphic/builtin-symbol/triangle-up.js.map +1 -1
  221. package/cjs/graphic/builtin-symbol/triangle.js +3 -1
  222. package/cjs/graphic/builtin-symbol/triangle.js.map +1 -1
  223. package/cjs/graphic/builtin-symbol/utils.js +1 -6
  224. package/cjs/graphic/builtin-symbol/utils.js.map +1 -1
  225. package/cjs/graphic/builtin-symbol/wedge.js +3 -2
  226. package/cjs/graphic/builtin-symbol/wedge.js.map +1 -1
  227. package/cjs/graphic/builtin-symbol/wye.js +3 -2
  228. package/cjs/graphic/builtin-symbol/wye.js.map +1 -1
  229. package/cjs/graphic/circle.js +6 -8
  230. package/cjs/graphic/circle.js.map +1 -1
  231. package/cjs/graphic/config.js +32 -58
  232. package/cjs/graphic/config.js.map +1 -1
  233. package/cjs/graphic/glyph.js +9 -10
  234. package/cjs/graphic/glyph.js.map +1 -1
  235. package/cjs/graphic/graphic-service/graphic-service.js +8 -12
  236. package/cjs/graphic/graphic-service/graphic-service.js.map +1 -1
  237. package/cjs/graphic/graphic.js +44 -27
  238. package/cjs/graphic/graphic.js.map +1 -1
  239. package/cjs/graphic/group.js +5 -9
  240. package/cjs/graphic/group.js.map +1 -1
  241. package/cjs/graphic/image.js +16 -18
  242. package/cjs/graphic/image.js.map +1 -1
  243. package/cjs/graphic/line.js +6 -11
  244. package/cjs/graphic/line.js.map +1 -1
  245. package/cjs/graphic/node-tree.js +44 -25
  246. package/cjs/graphic/node-tree.js.map +1 -1
  247. package/cjs/graphic/path.js +6 -12
  248. package/cjs/graphic/path.js.map +1 -1
  249. package/cjs/graphic/polygon.js +4 -7
  250. package/cjs/graphic/polygon.js.map +1 -1
  251. package/cjs/graphic/pyramid3d.js +3 -4
  252. package/cjs/graphic/pyramid3d.js.map +1 -1
  253. package/cjs/graphic/rect.js +3 -7
  254. package/cjs/graphic/rect.js.map +1 -1
  255. package/cjs/graphic/rect3d.js +4 -5
  256. package/cjs/graphic/rect3d.js.map +1 -1
  257. package/cjs/graphic/richtext/frame.js +0 -19
  258. package/cjs/graphic/richtext/frame.js.map +1 -1
  259. package/cjs/graphic/richtext/icon.js +6 -14
  260. package/cjs/graphic/richtext/icon.js.map +1 -1
  261. package/cjs/graphic/richtext/line.js +2 -14
  262. package/cjs/graphic/richtext/line.js.map +1 -1
  263. package/cjs/graphic/richtext/paragraph.js +0 -22
  264. package/cjs/graphic/richtext/paragraph.js.map +1 -1
  265. package/cjs/graphic/richtext/utils.js +2 -1
  266. package/cjs/graphic/richtext/utils.js.map +1 -1
  267. package/cjs/graphic/richtext/wrapper.js +0 -12
  268. package/cjs/graphic/richtext/wrapper.js.map +1 -1
  269. package/cjs/graphic/richtext.js +45 -38
  270. package/cjs/graphic/richtext.js.map +1 -1
  271. package/cjs/graphic/shadow-root.js +1 -2
  272. package/cjs/graphic/shadow-root.js.map +1 -1
  273. package/cjs/graphic/symbol.js +5 -12
  274. package/cjs/graphic/symbol.js.map +1 -1
  275. package/cjs/graphic/text.js +45 -45
  276. package/cjs/graphic/text.js.map +1 -1
  277. package/cjs/graphic/theme.js +0 -4
  278. package/cjs/graphic/theme.js.map +1 -1
  279. package/cjs/graphic/tools.js +44 -16
  280. package/cjs/graphic/tools.js.map +1 -1
  281. package/cjs/graphic/wrap-text.js +7 -7
  282. package/cjs/graphic/wrap-text.js.map +1 -1
  283. package/cjs/picker/global-picker-service.js +0 -1
  284. package/cjs/picker/global-picker-service.js.map +1 -1
  285. package/cjs/picker/pick-interceptor.js +15 -5
  286. package/cjs/picker/pick-interceptor.js.map +1 -1
  287. package/cjs/picker/picker-service.js +5 -5
  288. package/cjs/picker/picker-service.js.map +1 -1
  289. package/cjs/plugins/builtin-plugin/3dview-transform-plugin.js +20 -26
  290. package/cjs/plugins/builtin-plugin/3dview-transform-plugin.js.map +1 -1
  291. package/cjs/plugins/builtin-plugin/auto-render-plugin.js +4 -5
  292. package/cjs/plugins/builtin-plugin/auto-render-plugin.js.map +1 -1
  293. package/cjs/plugins/builtin-plugin/dirty-bounds-plugin.js +4 -5
  294. package/cjs/plugins/builtin-plugin/dirty-bounds-plugin.js.map +1 -1
  295. package/cjs/plugins/builtin-plugin/flex-layout-plugin.js +8 -11
  296. package/cjs/plugins/builtin-plugin/flex-layout-plugin.js.map +1 -1
  297. package/cjs/plugins/builtin-plugin/html-attribute-plugin.js +19 -28
  298. package/cjs/plugins/builtin-plugin/html-attribute-plugin.js.map +1 -1
  299. package/cjs/plugins/builtin-plugin/incremental-auto-render-plugin.js +8 -12
  300. package/cjs/plugins/builtin-plugin/incremental-auto-render-plugin.js.map +1 -1
  301. package/cjs/plugins/builtin-plugin/react-attribute-plugin.js +7 -6
  302. package/cjs/plugins/builtin-plugin/react-attribute-plugin.js.map +1 -1
  303. package/cjs/plugins/plugin-service.js +0 -1
  304. package/cjs/plugins/plugin-service.js.map +1 -1
  305. package/cjs/render/contributions/render/arc-render.js +4 -6
  306. package/cjs/render/contributions/render/arc-render.js.map +1 -1
  307. package/cjs/render/contributions/render/arc3d-render.js +7 -5
  308. package/cjs/render/contributions/render/arc3d-render.js.map +1 -1
  309. package/cjs/render/contributions/render/area-render.js +23 -21
  310. package/cjs/render/contributions/render/area-render.js.map +1 -1
  311. package/cjs/render/contributions/render/base-render.js +0 -5
  312. package/cjs/render/contributions/render/base-render.js.map +1 -1
  313. package/cjs/render/contributions/render/circle-render.js +4 -6
  314. package/cjs/render/contributions/render/circle-render.js.map +1 -1
  315. package/cjs/render/contributions/render/contributions/arc-contribution-render.js +4 -3
  316. package/cjs/render/contributions/render/contributions/arc-contribution-render.js.map +1 -1
  317. package/cjs/render/contributions/render/contributions/area-texture-contribution-render.js +9 -6
  318. package/cjs/render/contributions/render/contributions/area-texture-contribution-render.js.map +1 -1
  319. package/cjs/render/contributions/render/contributions/base-contribution-render.js +8 -10
  320. package/cjs/render/contributions/render/contributions/base-contribution-render.js.map +1 -1
  321. package/cjs/render/contributions/render/contributions/base-texture-contribution-render.js +4 -4
  322. package/cjs/render/contributions/render/contributions/base-texture-contribution-render.js.map +1 -1
  323. package/cjs/render/contributions/render/contributions/circle-contribution-render.js +4 -3
  324. package/cjs/render/contributions/render/contributions/circle-contribution-render.js.map +1 -1
  325. package/cjs/render/contributions/render/contributions/group-contribution-render.js +3 -1
  326. package/cjs/render/contributions/render/contributions/group-contribution-render.js.map +1 -1
  327. package/cjs/render/contributions/render/contributions/image-contribution-render.js +3 -1
  328. package/cjs/render/contributions/render/contributions/image-contribution-render.js.map +1 -1
  329. package/cjs/render/contributions/render/contributions/rect-contribution-render.js +14 -11
  330. package/cjs/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
  331. package/cjs/render/contributions/render/contributions/symbol-contribution-render.js +4 -3
  332. package/cjs/render/contributions/render/contributions/symbol-contribution-render.js.map +1 -1
  333. package/cjs/render/contributions/render/contributions/text-contribution-render.js +8 -6
  334. package/cjs/render/contributions/render/contributions/text-contribution-render.js.map +1 -1
  335. package/cjs/render/contributions/render/draw-contribution.js +14 -12
  336. package/cjs/render/contributions/render/draw-contribution.js.map +1 -1
  337. package/cjs/render/contributions/render/draw-interceptor.js +21 -11
  338. package/cjs/render/contributions/render/draw-interceptor.js.map +1 -1
  339. package/cjs/render/contributions/render/glyph-render.js +3 -2
  340. package/cjs/render/contributions/render/glyph-render.js.map +1 -1
  341. package/cjs/render/contributions/render/graphic-render.js +1 -4
  342. package/cjs/render/contributions/render/graphic-render.js.map +1 -1
  343. package/cjs/render/contributions/render/group-render.js +3 -7
  344. package/cjs/render/contributions/render/group-render.js.map +1 -1
  345. package/cjs/render/contributions/render/image-render.js +2 -4
  346. package/cjs/render/contributions/render/image-render.js.map +1 -1
  347. package/cjs/render/contributions/render/incremental-area-render.js +3 -1
  348. package/cjs/render/contributions/render/incremental-area-render.js.map +1 -1
  349. package/cjs/render/contributions/render/incremental-draw-contribution.js +109 -80
  350. package/cjs/render/contributions/render/incremental-draw-contribution.js.map +1 -1
  351. package/cjs/render/contributions/render/incremental-line-render.js +3 -1
  352. package/cjs/render/contributions/render/incremental-line-render.js.map +1 -1
  353. package/cjs/render/contributions/render/line-render.js +16 -12
  354. package/cjs/render/contributions/render/line-render.js.map +1 -1
  355. package/cjs/render/contributions/render/path-render.js +7 -8
  356. package/cjs/render/contributions/render/path-render.js.map +1 -1
  357. package/cjs/render/contributions/render/polygon-render.js +4 -6
  358. package/cjs/render/contributions/render/polygon-render.js.map +1 -1
  359. package/cjs/render/contributions/render/pyramid3d-render.js +5 -3
  360. package/cjs/render/contributions/render/pyramid3d-render.js.map +1 -1
  361. package/cjs/render/contributions/render/rect-render.js +7 -8
  362. package/cjs/render/contributions/render/rect-render.js.map +1 -1
  363. package/cjs/render/contributions/render/rect3d-render.js +7 -5
  364. package/cjs/render/contributions/render/rect3d-render.js.map +1 -1
  365. package/cjs/render/contributions/render/richtext-render.js +3 -4
  366. package/cjs/render/contributions/render/richtext-render.js.map +1 -1
  367. package/cjs/render/contributions/render/symbol-render.js +14 -11
  368. package/cjs/render/contributions/render/symbol-render.js.map +1 -1
  369. package/cjs/render/contributions/render/text-render.js +8 -8
  370. package/cjs/render/contributions/render/text-render.js.map +1 -1
  371. package/cjs/render/contributions/render/utils.js +1 -1
  372. package/cjs/render/contributions/render/utils.js.map +1 -1
  373. package/cjs/render/render-service.js +2 -11
  374. package/cjs/render/render-service.js.map +1 -1
  375. package/cjs/resource-loader/loader.js +16 -13
  376. package/cjs/resource-loader/loader.js.map +1 -1
  377. package/cjs/tapable/Hook.js +0 -3
  378. package/cjs/tapable/Hook.js.map +1 -1
  379. package/dist/index.es.js +1709 -2151
  380. package/es/allocator/bounds-allocate.js +1 -1
  381. package/es/allocator/bounds-allocate.js.map +1 -1
  382. package/es/allocator/canvas-allocate.js +9 -11
  383. package/es/allocator/canvas-allocate.js.map +1 -1
  384. package/es/allocator/graphic-allocate.js +9 -5
  385. package/es/allocator/graphic-allocate.js.map +1 -1
  386. package/es/allocator/matrix-allocate.js +6 -2
  387. package/es/allocator/matrix-allocate.js.map +1 -1
  388. package/es/animate/Ticker/default-ticker.js +14 -25
  389. package/es/animate/Ticker/default-ticker.js.map +1 -1
  390. package/es/animate/animate.js +8 -7
  391. package/es/animate/animate.js.map +1 -1
  392. package/es/animate/custom-animate.js +50 -52
  393. package/es/animate/custom-animate.js.map +1 -1
  394. package/es/animate/easing.js +8 -18
  395. package/es/animate/easing.js.map +1 -1
  396. package/es/animate/morphing.js +23 -20
  397. package/es/animate/morphing.js.map +1 -1
  398. package/es/application.js +1 -7
  399. package/es/application.js.map +1 -1
  400. package/es/canvas/conical-gradient.js +6 -12
  401. package/es/canvas/conical-gradient.js.map +1 -1
  402. package/es/canvas/contributions/base-canvas.js +7 -19
  403. package/es/canvas/contributions/base-canvas.js.map +1 -1
  404. package/es/color-string/interpolate.js +3 -5
  405. package/es/color-string/interpolate.js.map +1 -1
  406. package/es/color-string/store.js +2 -2
  407. package/es/color-string/store.js.map +1 -1
  408. package/es/common/bounds-context.js +0 -1
  409. package/es/common/bounds-context.js.map +1 -1
  410. package/es/common/canvas-utils.js +6 -3
  411. package/es/common/canvas-utils.js.map +1 -1
  412. package/es/common/contribution-provider.js +0 -3
  413. package/es/common/contribution-provider.js.map +1 -1
  414. package/es/common/custom-path2d.js +1 -7
  415. package/es/common/custom-path2d.js.map +1 -1
  416. package/es/common/generator.js +2 -1
  417. package/es/common/generator.js.map +1 -1
  418. package/es/common/inversify/binding.js +0 -12
  419. package/es/common/inversify/binding.js.map +1 -1
  420. package/es/common/inversify/container.js +0 -4
  421. package/es/common/inversify/container.js.map +1 -1
  422. package/es/common/inversify/cotainer-module.js +0 -2
  423. package/es/common/inversify/cotainer-module.js.map +1 -1
  424. package/es/common/inversify/meta-data.js +0 -2
  425. package/es/common/inversify/meta-data.js.map +1 -1
  426. package/es/common/inversify/syntax/binding_in_syntax.js +0 -1
  427. package/es/common/inversify/syntax/binding_in_syntax.js.map +1 -1
  428. package/es/common/inversify/syntax/binding_to_syntax.js +0 -1
  429. package/es/common/inversify/syntax/binding_to_syntax.js.map +1 -1
  430. package/es/common/inversify-lite/annotation/lazy_service_identifier.js +0 -1
  431. package/es/common/inversify-lite/annotation/lazy_service_identifier.js.map +1 -1
  432. package/es/common/inversify-lite/bindings/binding.js +0 -14
  433. package/es/common/inversify-lite/bindings/binding.js.map +1 -1
  434. package/es/common/inversify-lite/container/container.js +48 -22
  435. package/es/common/inversify-lite/container/container.js.map +1 -1
  436. package/es/common/inversify-lite/container/container_module.js +0 -4
  437. package/es/common/inversify-lite/container/container_module.js.map +1 -1
  438. package/es/common/inversify-lite/container/lookup.js +0 -1
  439. package/es/common/inversify-lite/container/lookup.js.map +1 -1
  440. package/es/common/inversify-lite/planning/context.js +0 -4
  441. package/es/common/inversify-lite/planning/context.js.map +1 -1
  442. package/es/common/inversify-lite/planning/metadata.js +0 -2
  443. package/es/common/inversify-lite/planning/metadata.js.map +1 -1
  444. package/es/common/inversify-lite/planning/plan.js +0 -2
  445. package/es/common/inversify-lite/planning/plan.js.map +1 -1
  446. package/es/common/inversify-lite/planning/queryable_string.js +0 -1
  447. package/es/common/inversify-lite/planning/queryable_string.js.map +1 -1
  448. package/es/common/inversify-lite/planning/request.js +0 -8
  449. package/es/common/inversify-lite/planning/request.js.map +1 -1
  450. package/es/common/inversify-lite/planning/target.js +0 -7
  451. package/es/common/inversify-lite/planning/target.js.map +1 -1
  452. package/es/common/inversify-lite/resolution/instantiation.js +44 -16
  453. package/es/common/inversify-lite/resolution/instantiation.js.map +1 -1
  454. package/es/common/inversify-lite/scope/scope.js +29 -3
  455. package/es/common/inversify-lite/scope/scope.js.map +1 -1
  456. package/es/common/inversify-lite/syntax/binding_in_syntax.js +0 -1
  457. package/es/common/inversify-lite/syntax/binding_in_syntax.js.map +1 -1
  458. package/es/common/inversify-lite/syntax/binding_in_when_on_syntax.js +0 -3
  459. package/es/common/inversify-lite/syntax/binding_in_when_on_syntax.js.map +1 -1
  460. package/es/common/inversify-lite/syntax/binding_on_syntax.js +0 -1
  461. package/es/common/inversify-lite/syntax/binding_on_syntax.js.map +1 -1
  462. package/es/common/inversify-lite/syntax/binding_to_syntax.js +0 -1
  463. package/es/common/inversify-lite/syntax/binding_to_syntax.js.map +1 -1
  464. package/es/common/inversify-lite/syntax/binding_when_on_syntax.js +0 -2
  465. package/es/common/inversify-lite/syntax/binding_when_on_syntax.js.map +1 -1
  466. package/es/common/inversify-lite/syntax/binding_when_syntax.js +0 -1
  467. package/es/common/inversify-lite/syntax/binding_when_syntax.js.map +1 -1
  468. package/es/common/polygon.js +2 -1
  469. package/es/common/polygon.js.map +1 -1
  470. package/es/common/render-area.js +3 -2
  471. package/es/common/render-area.js.map +1 -1
  472. package/es/common/render-curve.js +8 -4
  473. package/es/common/render-curve.js.map +1 -1
  474. package/es/common/seg-context.js +3 -12
  475. package/es/common/seg-context.js.map +1 -1
  476. package/es/common/segment/basis.js +0 -13
  477. package/es/common/segment/basis.js.map +1 -1
  478. package/es/common/segment/common.js +1 -1
  479. package/es/common/segment/common.js.map +1 -1
  480. package/es/common/segment/curve/arc.js +1 -2
  481. package/es/common/segment/curve/arc.js.map +1 -1
  482. package/es/common/segment/curve/base.js +0 -4
  483. package/es/common/segment/curve/base.js.map +1 -1
  484. package/es/common/segment/curve/cubic-bezier.js +2 -2
  485. package/es/common/segment/curve/cubic-bezier.js.map +1 -1
  486. package/es/common/segment/curve/curve-context.js +0 -4
  487. package/es/common/segment/curve/curve-context.js.map +1 -1
  488. package/es/common/segment/curve/ellipse.js +3 -3
  489. package/es/common/segment/curve/ellipse.js.map +1 -1
  490. package/es/common/segment/curve/line.js +1 -2
  491. package/es/common/segment/curve/line.js.map +1 -1
  492. package/es/common/segment/curve/move.js +1 -2
  493. package/es/common/segment/curve/move.js.map +1 -1
  494. package/es/common/segment/curve/path.js +0 -2
  495. package/es/common/segment/curve/path.js.map +1 -1
  496. package/es/common/segment/curve/quadratic-bezier.js +2 -2
  497. package/es/common/segment/curve/quadratic-bezier.js.map +1 -1
  498. package/es/common/segment/linear.js +0 -10
  499. package/es/common/segment/linear.js.map +1 -1
  500. package/es/common/segment/monotone.js +0 -13
  501. package/es/common/segment/monotone.js.map +1 -1
  502. package/es/common/segment/step.js +1 -12
  503. package/es/common/segment/step.js.map +1 -1
  504. package/es/common/sort.js +34 -3
  505. package/es/common/sort.js.map +1 -1
  506. package/es/common/split-path.js +11 -4
  507. package/es/common/split-path.js.map +1 -1
  508. package/es/common/utils.js +5 -7
  509. package/es/common/utils.js.map +1 -1
  510. package/es/common/xml/parser.js +2 -2
  511. package/es/common/xml/parser.js.map +1 -1
  512. package/es/core/camera.js +4 -11
  513. package/es/core/camera.js.map +1 -1
  514. package/es/core/contributions/env/base-contribution.js +0 -6
  515. package/es/core/contributions/env/base-contribution.js.map +1 -1
  516. package/es/core/contributions/layerHandler/canvas2d-contribution.js +11 -20
  517. package/es/core/contributions/layerHandler/canvas2d-contribution.js.map +1 -1
  518. package/es/core/contributions/layerHandler/empty-contribution.js +8 -8
  519. package/es/core/contributions/layerHandler/empty-contribution.js.map +1 -1
  520. package/es/core/contributions/layerHandler/offscreen2d-contribution.js +6 -5
  521. package/es/core/contributions/layerHandler/offscreen2d-contribution.js.map +1 -1
  522. package/es/core/contributions/textMeasure/AtextMeasure.js +8 -11
  523. package/es/core/contributions/textMeasure/AtextMeasure.js.map +1 -1
  524. package/es/core/contributions/textMeasure/layout.js +0 -3
  525. package/es/core/contributions/textMeasure/layout.js.map +1 -1
  526. package/es/core/contributions/window/base-contribution.js +0 -2
  527. package/es/core/contributions/window/base-contribution.js.map +1 -1
  528. package/es/core/global.js +0 -8
  529. package/es/core/global.js.map +1 -1
  530. package/es/core/graphic-utils.js +5 -16
  531. package/es/core/graphic-utils.js.map +1 -1
  532. package/es/core/layer-service.js +7 -7
  533. package/es/core/layer-service.js.map +1 -1
  534. package/es/core/layer.js +9 -7
  535. package/es/core/layer.js.map +1 -1
  536. package/es/core/stage.js +34 -68
  537. package/es/core/stage.js.map +1 -1
  538. package/es/core/window.js +14 -16
  539. package/es/core/window.js.map +1 -1
  540. package/es/event/event-manager.js +145 -153
  541. package/es/event/event-manager.js.map +1 -1
  542. package/es/event/event-system.js +43 -60
  543. package/es/event/event-system.js.map +1 -1
  544. package/es/event/event-target.js +3 -1
  545. package/es/event/event-target.js.map +1 -1
  546. package/es/event/federated-event/base-event.js +15 -43
  547. package/es/event/federated-event/base-event.js.map +1 -1
  548. package/es/event/federated-event/mouse-event.js +18 -27
  549. package/es/event/federated-event/mouse-event.js.map +1 -1
  550. package/es/event/federated-event/pointer-event.js +8 -12
  551. package/es/event/federated-event/pointer-event.js.map +1 -1
  552. package/es/event/federated-event/wheel-event.js +11 -12
  553. package/es/event/federated-event/wheel-event.js.map +1 -1
  554. package/es/graphic/arc.js +6 -9
  555. package/es/graphic/arc.js.map +1 -1
  556. package/es/graphic/arc3d.js +5 -6
  557. package/es/graphic/arc3d.js.map +1 -1
  558. package/es/graphic/area.js +10 -13
  559. package/es/graphic/area.js.map +1 -1
  560. package/es/graphic/builtin-symbol/arrow.js +3 -2
  561. package/es/graphic/builtin-symbol/arrow.js.map +1 -1
  562. package/es/graphic/builtin-symbol/arrow2-down.js +3 -2
  563. package/es/graphic/builtin-symbol/arrow2-down.js.map +1 -1
  564. package/es/graphic/builtin-symbol/arrow2-left.js +3 -2
  565. package/es/graphic/builtin-symbol/arrow2-left.js.map +1 -1
  566. package/es/graphic/builtin-symbol/arrow2-right.js +3 -2
  567. package/es/graphic/builtin-symbol/arrow2-right.js.map +1 -1
  568. package/es/graphic/builtin-symbol/arrow2-up.js +3 -2
  569. package/es/graphic/builtin-symbol/arrow2-up.js.map +1 -1
  570. package/es/graphic/builtin-symbol/circle.js +3 -2
  571. package/es/graphic/builtin-symbol/circle.js.map +1 -1
  572. package/es/graphic/builtin-symbol/close.js +3 -2
  573. package/es/graphic/builtin-symbol/close.js.map +1 -1
  574. package/es/graphic/builtin-symbol/cross.js +3 -2
  575. package/es/graphic/builtin-symbol/cross.js.map +1 -1
  576. package/es/graphic/builtin-symbol/diamond.js +3 -2
  577. package/es/graphic/builtin-symbol/diamond.js.map +1 -1
  578. package/es/graphic/builtin-symbol/line-h.js +3 -2
  579. package/es/graphic/builtin-symbol/line-h.js.map +1 -1
  580. package/es/graphic/builtin-symbol/line-v.js +3 -2
  581. package/es/graphic/builtin-symbol/line-v.js.map +1 -1
  582. package/es/graphic/builtin-symbol/rect.js +3 -2
  583. package/es/graphic/builtin-symbol/rect.js.map +1 -1
  584. package/es/graphic/builtin-symbol/square.js +3 -2
  585. package/es/graphic/builtin-symbol/square.js.map +1 -1
  586. package/es/graphic/builtin-symbol/star.js +3 -2
  587. package/es/graphic/builtin-symbol/star.js.map +1 -1
  588. package/es/graphic/builtin-symbol/stroke.js +3 -2
  589. package/es/graphic/builtin-symbol/stroke.js.map +1 -1
  590. package/es/graphic/builtin-symbol/thin-triangle.js +3 -2
  591. package/es/graphic/builtin-symbol/thin-triangle.js.map +1 -1
  592. package/es/graphic/builtin-symbol/triangle-down.js +3 -2
  593. package/es/graphic/builtin-symbol/triangle-down.js.map +1 -1
  594. package/es/graphic/builtin-symbol/triangle-left.js +3 -2
  595. package/es/graphic/builtin-symbol/triangle-left.js.map +1 -1
  596. package/es/graphic/builtin-symbol/triangle-right.js +3 -2
  597. package/es/graphic/builtin-symbol/triangle-right.js.map +1 -1
  598. package/es/graphic/builtin-symbol/triangle-up.js +3 -2
  599. package/es/graphic/builtin-symbol/triangle-up.js.map +1 -1
  600. package/es/graphic/builtin-symbol/triangle.js +3 -1
  601. package/es/graphic/builtin-symbol/triangle.js.map +1 -1
  602. package/es/graphic/builtin-symbol/utils.js +2 -6
  603. package/es/graphic/builtin-symbol/utils.js.map +1 -1
  604. package/es/graphic/builtin-symbol/wedge.js +3 -2
  605. package/es/graphic/builtin-symbol/wedge.js.map +1 -1
  606. package/es/graphic/builtin-symbol/wye.js +3 -2
  607. package/es/graphic/builtin-symbol/wye.js.map +1 -1
  608. package/es/graphic/circle.js +6 -7
  609. package/es/graphic/circle.js.map +1 -1
  610. package/es/graphic/config.js +44 -72
  611. package/es/graphic/config.js.map +1 -1
  612. package/es/graphic/glyph.js +9 -9
  613. package/es/graphic/glyph.js.map +1 -1
  614. package/es/graphic/graphic-service/graphic-service.js +8 -12
  615. package/es/graphic/graphic-service/graphic-service.js.map +1 -1
  616. package/es/graphic/graphic.js +44 -27
  617. package/es/graphic/graphic.js.map +1 -1
  618. package/es/graphic/group.js +5 -8
  619. package/es/graphic/group.js.map +1 -1
  620. package/es/graphic/image.js +16 -17
  621. package/es/graphic/image.js.map +1 -1
  622. package/es/graphic/line.js +7 -10
  623. package/es/graphic/line.js.map +1 -1
  624. package/es/graphic/node-tree.js +44 -25
  625. package/es/graphic/node-tree.js.map +1 -1
  626. package/es/graphic/path.js +7 -11
  627. package/es/graphic/path.js.map +1 -1
  628. package/es/graphic/polygon.js +4 -6
  629. package/es/graphic/polygon.js.map +1 -1
  630. package/es/graphic/pyramid3d.js +3 -3
  631. package/es/graphic/pyramid3d.js.map +1 -1
  632. package/es/graphic/rect.js +4 -6
  633. package/es/graphic/rect.js.map +1 -1
  634. package/es/graphic/rect3d.js +4 -4
  635. package/es/graphic/rect3d.js.map +1 -1
  636. package/es/graphic/richtext/frame.js +0 -19
  637. package/es/graphic/richtext/frame.js.map +1 -1
  638. package/es/graphic/richtext/icon.js +6 -14
  639. package/es/graphic/richtext/icon.js.map +1 -1
  640. package/es/graphic/richtext/line.js +2 -14
  641. package/es/graphic/richtext/line.js.map +1 -1
  642. package/es/graphic/richtext/paragraph.js +0 -22
  643. package/es/graphic/richtext/paragraph.js.map +1 -1
  644. package/es/graphic/richtext/utils.js +2 -1
  645. package/es/graphic/richtext/utils.js.map +1 -1
  646. package/es/graphic/richtext/wrapper.js +0 -12
  647. package/es/graphic/richtext/wrapper.js.map +1 -1
  648. package/es/graphic/richtext.js +46 -37
  649. package/es/graphic/richtext.js.map +1 -1
  650. package/es/graphic/shadow-root.js +1 -2
  651. package/es/graphic/shadow-root.js.map +1 -1
  652. package/es/graphic/symbol.js +6 -11
  653. package/es/graphic/symbol.js.map +1 -1
  654. package/es/graphic/text.js +40 -39
  655. package/es/graphic/text.js.map +1 -1
  656. package/es/graphic/theme.js +0 -4
  657. package/es/graphic/theme.js.map +1 -1
  658. package/es/graphic/tools.js +44 -16
  659. package/es/graphic/tools.js.map +1 -1
  660. package/es/graphic/wrap-text.js +6 -6
  661. package/es/graphic/wrap-text.js.map +1 -1
  662. package/es/picker/global-picker-service.js +0 -1
  663. package/es/picker/global-picker-service.js.map +1 -1
  664. package/es/picker/pick-interceptor.js +15 -5
  665. package/es/picker/pick-interceptor.js.map +1 -1
  666. package/es/picker/picker-service.js +5 -5
  667. package/es/picker/picker-service.js.map +1 -1
  668. package/es/plugins/builtin-plugin/3dview-transform-plugin.js +20 -26
  669. package/es/plugins/builtin-plugin/3dview-transform-plugin.js.map +1 -1
  670. package/es/plugins/builtin-plugin/auto-render-plugin.js +4 -5
  671. package/es/plugins/builtin-plugin/auto-render-plugin.js.map +1 -1
  672. package/es/plugins/builtin-plugin/dirty-bounds-plugin.js +4 -5
  673. package/es/plugins/builtin-plugin/dirty-bounds-plugin.js.map +1 -1
  674. package/es/plugins/builtin-plugin/flex-layout-plugin.js +8 -11
  675. package/es/plugins/builtin-plugin/flex-layout-plugin.js.map +1 -1
  676. package/es/plugins/builtin-plugin/html-attribute-plugin.js +17 -28
  677. package/es/plugins/builtin-plugin/html-attribute-plugin.js.map +1 -1
  678. package/es/plugins/builtin-plugin/incremental-auto-render-plugin.js +8 -12
  679. package/es/plugins/builtin-plugin/incremental-auto-render-plugin.js.map +1 -1
  680. package/es/plugins/builtin-plugin/react-attribute-plugin.js +6 -6
  681. package/es/plugins/builtin-plugin/react-attribute-plugin.js.map +1 -1
  682. package/es/plugins/plugin-service.js +0 -1
  683. package/es/plugins/plugin-service.js.map +1 -1
  684. package/es/render/contributions/render/arc-render.js +4 -6
  685. package/es/render/contributions/render/arc-render.js.map +1 -1
  686. package/es/render/contributions/render/arc3d-render.js +7 -5
  687. package/es/render/contributions/render/arc3d-render.js.map +1 -1
  688. package/es/render/contributions/render/area-render.js +23 -21
  689. package/es/render/contributions/render/area-render.js.map +1 -1
  690. package/es/render/contributions/render/base-render.js +0 -5
  691. package/es/render/contributions/render/base-render.js.map +1 -1
  692. package/es/render/contributions/render/circle-render.js +4 -6
  693. package/es/render/contributions/render/circle-render.js.map +1 -1
  694. package/es/render/contributions/render/contributions/arc-contribution-render.js +3 -3
  695. package/es/render/contributions/render/contributions/arc-contribution-render.js.map +1 -1
  696. package/es/render/contributions/render/contributions/area-texture-contribution-render.js +5 -2
  697. package/es/render/contributions/render/contributions/area-texture-contribution-render.js.map +1 -1
  698. package/es/render/contributions/render/contributions/base-contribution-render.js +7 -10
  699. package/es/render/contributions/render/contributions/base-contribution-render.js.map +1 -1
  700. package/es/render/contributions/render/contributions/base-texture-contribution-render.js +3 -4
  701. package/es/render/contributions/render/contributions/base-texture-contribution-render.js.map +1 -1
  702. package/es/render/contributions/render/contributions/circle-contribution-render.js +3 -3
  703. package/es/render/contributions/render/contributions/circle-contribution-render.js.map +1 -1
  704. package/es/render/contributions/render/contributions/group-contribution-render.js +3 -1
  705. package/es/render/contributions/render/contributions/group-contribution-render.js.map +1 -1
  706. package/es/render/contributions/render/contributions/image-contribution-render.js +3 -1
  707. package/es/render/contributions/render/contributions/image-contribution-render.js.map +1 -1
  708. package/es/render/contributions/render/contributions/rect-contribution-render.js +11 -11
  709. package/es/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
  710. package/es/render/contributions/render/contributions/symbol-contribution-render.js +3 -3
  711. package/es/render/contributions/render/contributions/symbol-contribution-render.js.map +1 -1
  712. package/es/render/contributions/render/contributions/text-contribution-render.js +8 -6
  713. package/es/render/contributions/render/contributions/text-contribution-render.js.map +1 -1
  714. package/es/render/contributions/render/draw-contribution.js +14 -12
  715. package/es/render/contributions/render/draw-contribution.js.map +1 -1
  716. package/es/render/contributions/render/draw-interceptor.js +21 -11
  717. package/es/render/contributions/render/draw-interceptor.js.map +1 -1
  718. package/es/render/contributions/render/glyph-render.js +3 -2
  719. package/es/render/contributions/render/glyph-render.js.map +1 -1
  720. package/es/render/contributions/render/graphic-render.js +1 -4
  721. package/es/render/contributions/render/graphic-render.js.map +1 -1
  722. package/es/render/contributions/render/group-render.js +3 -7
  723. package/es/render/contributions/render/group-render.js.map +1 -1
  724. package/es/render/contributions/render/image-render.js +2 -5
  725. package/es/render/contributions/render/image-render.js.map +1 -1
  726. package/es/render/contributions/render/incremental-area-render.js +3 -1
  727. package/es/render/contributions/render/incremental-area-render.js.map +1 -1
  728. package/es/render/contributions/render/incremental-draw-contribution.js +109 -80
  729. package/es/render/contributions/render/incremental-draw-contribution.js.map +1 -1
  730. package/es/render/contributions/render/incremental-line-render.js +3 -1
  731. package/es/render/contributions/render/incremental-line-render.js.map +1 -1
  732. package/es/render/contributions/render/line-render.js +16 -12
  733. package/es/render/contributions/render/line-render.js.map +1 -1
  734. package/es/render/contributions/render/path-render.js +6 -8
  735. package/es/render/contributions/render/path-render.js.map +1 -1
  736. package/es/render/contributions/render/polygon-render.js +4 -6
  737. package/es/render/contributions/render/polygon-render.js.map +1 -1
  738. package/es/render/contributions/render/pyramid3d-render.js +5 -3
  739. package/es/render/contributions/render/pyramid3d-render.js.map +1 -1
  740. package/es/render/contributions/render/rect-render.js +6 -8
  741. package/es/render/contributions/render/rect-render.js.map +1 -1
  742. package/es/render/contributions/render/rect3d-render.js +7 -5
  743. package/es/render/contributions/render/rect3d-render.js.map +1 -1
  744. package/es/render/contributions/render/richtext-render.js +3 -4
  745. package/es/render/contributions/render/richtext-render.js.map +1 -1
  746. package/es/render/contributions/render/symbol-render.js +14 -11
  747. package/es/render/contributions/render/symbol-render.js.map +1 -1
  748. package/es/render/contributions/render/text-render.js +8 -9
  749. package/es/render/contributions/render/text-render.js.map +1 -1
  750. package/es/render/contributions/render/utils.js +1 -1
  751. package/es/render/contributions/render/utils.js.map +1 -1
  752. package/es/render/render-service.js +2 -11
  753. package/es/render/render-service.js.map +1 -1
  754. package/es/resource-loader/loader.js +17 -12
  755. package/es/resource-loader/loader.js.map +1 -1
  756. package/es/tapable/Hook.js +0 -3
  757. package/es/tapable/Hook.js.map +1 -1
  758. package/package.json +6 -5
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/builtin-symbol/wedge.ts"],"names":[],"mappings":";;;AAEA,iCAAoC;AAiCpC,SAAgB,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;AAPD,sBAOC;AAGD,MAAa,WAAY,SAAQ,iBAAU;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;AAbD,kCAaC;AAED,kBAAe,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,iCAAoC;AAiCpC,SAAgB,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;AAPD,sBAOC;AAGD,MAAa,WAAY,SAAQ,iBAAU;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;AAbD,kCAaC;AAED,kBAAe,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"]}
@@ -20,8 +20,9 @@ function wye(ctx, r, transX, transY) {
20
20
  exports.wye = wye;
21
21
 
22
22
  class WyeSymbol extends base_1.BaseSymbol {
23
- type="wye";
24
- 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";
23
+ constructor() {
24
+ 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";
25
+ }
25
26
  draw(ctx, size, transX, transY) {
26
27
  return wye(ctx, size / 2, transX, transY);
27
28
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/builtin-symbol/wye.ts"],"names":[],"mappings":";;;AACA,6CAAwC;AAExC,iCAAoC;AAoBpC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;AACf,MAAM,CAAC,GAAG,IAAA,aAAI,EAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AACtB,MAAM,CAAC,GAAG,CAAC,GAAG,IAAA,aAAI,EAAC,EAAE,CAAC,CAAC;AACvB,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAC1B,SAAgB,GAAG,CAAC,GAAe,EAAE,CAAS,EAAE,MAAc,EAAE,MAAc;IAC5E,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IACjB,MAAM,EAA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AAC,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;AAlBD,kBAkBC;AAGD,MAAa,SAAU,SAAQ,iBAAU;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;AAlBD,8BAkBC;AAED,kBAAe,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,6CAAwC;AAExC,iCAAoC;AAoBpC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;AACf,MAAM,CAAC,GAAG,IAAA,aAAI,EAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AACtB,MAAM,CAAC,GAAG,CAAC,GAAG,IAAA,aAAI,EAAC,EAAE,CAAC,CAAC;AACvB,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAC1B,SAAgB,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,CAAC,EAAE,GAAG,MAAM,EAAE,EAAE,GAAG,MAAM,CAAC,CAAC;IACrC,GAAG,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,EAAE,EAAE,GAAG,MAAM,CAAC,CAAC;IACrC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,E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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;AAlBD,8BAkBC;AAED,kBAAe,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"]}
@@ -7,12 +7,10 @@ Object.defineProperty(exports, "__esModule", {
7
7
  const graphic_1 = require("./graphic"), custom_path2d_1 = require("../common/custom-path2d"), utils_1 = require("../common/utils"), theme_1 = require("./theme"), application_1 = require("../application"), constants_1 = require("./constants"), CIRCLE_UPDATE_TAG_KEY = [ "radius", "startAngle", "endAngle", ...graphic_1.GRAPHIC_UPDATE_TAG_KEY ];
8
8
 
9
9
  class Circle extends graphic_1.Graphic {
10
- type="circle";
11
- static NOWORK_ANIMATE_ATTR=graphic_1.NOWORK_ANIMATE_ATTR;
12
10
  constructor(params = {
13
11
  radius: 1
14
12
  }) {
15
- super(params), this.numberType = constants_1.CIRCLE_NUMBER_TYPE;
13
+ super(params), this.type = "circle", this.numberType = constants_1.CIRCLE_NUMBER_TYPE;
16
14
  }
17
15
  isValid() {
18
16
  return super.isValid() && this._isValid();
@@ -43,13 +41,12 @@ class Circle extends graphic_1.Graphic {
43
41
  return super.needUpdateTag(key, CIRCLE_UPDATE_TAG_KEY);
44
42
  }
45
43
  toCustomPath() {
46
- const attribute = this.attribute, radius = attribute.radius ?? this.getDefaultAttribute("radius"), startAngle = attribute.startAngle ?? this.getDefaultAttribute("startAngle"), endAngle = attribute.endAngle ?? this.getDefaultAttribute("endAngle"), path = new custom_path2d_1.CustomPath2D;
44
+ var _a, _b, _c;
45
+ 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 custom_path2d_1.CustomPath2D;
47
46
  return path.arc(0, 0, radius, startAngle, endAngle), path;
48
47
  }
49
48
  clone() {
50
- return new Circle({
51
- ...this.attribute
52
- });
49
+ return new Circle(Object.assign({}, this.attribute));
53
50
  }
54
51
  getNoWorkAnimateAttr() {
55
52
  return Circle.NOWORK_ANIMATE_ATTR;
@@ -60,5 +57,6 @@ function createCircle(attributes) {
60
57
  return new Circle(attributes);
61
58
  }
62
59
 
63
- exports.Circle = Circle, exports.createCircle = createCircle;
60
+ exports.Circle = Circle, Circle.NOWORK_ANIMATE_ATTR = graphic_1.NOWORK_ANIMATE_ATTR,
61
+ exports.createCircle = createCircle;
64
62
  //# sourceMappingURL=circle.js.map
@@ -1 +1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AAE,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;;AA9EH,wBA+EC;AAED,SAAgB,YAAY,CAAC,UAAmC;IAC9D,OAAO,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC;AAChC,CAAC;AAFD,oCAEC","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,uCAAiF;AACjF,2DAAuD;AACvD,2CAA+C;AAC/C,mCAAmC;AACnC,gDAA6C;AAC7C,2CAAiD;AAEjD,MAAM,qBAAqB,GAAG,CAAC,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,gCAAsB,CAAC,CAAC;AAM9F,MAAa,MAAO,SAAQ,iBAAgC;IAK1D,YAAY,SAA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AmC;IAC9D,OAAO,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC;AAChC,CAAC;AAFD,oCAEC","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"]}
@@ -58,17 +58,14 @@ function rewriteProto(obj, c) {
58
58
  Object.setPrototypeOf(obj, c);
59
59
  }
60
60
 
61
- exports.DefaultStrokeStyle = {
62
- outerBorder: {
63
- ...commonStroke,
61
+ exports.DefaultStrokeStyle = Object.assign({
62
+ outerBorder: Object.assign(Object.assign({}, commonStroke), {
64
63
  distance: 0
65
- },
66
- innerBorder: {
67
- ...commonStroke,
64
+ }),
65
+ innerBorder: Object.assign(Object.assign({}, commonStroke), {
68
66
  distance: 0
69
- },
70
- ...commonStroke
71
- }, exports.DefaultTextStyle = {
67
+ })
68
+ }, commonStroke), exports.DefaultTextStyle = {
72
69
  text: "",
73
70
  maxLineWidth: 1 / 0,
74
71
  textAlign: "left",
@@ -97,7 +94,7 @@ exports.DefaultStrokeStyle = {
97
94
  disableAutoClipedPoptip: void 0
98
95
  }, exports.DefaultPickStyle = {
99
96
  pickStrokeBuffer: 0
100
- }, exports.DefaultStyle = {
97
+ }, exports.DefaultStyle = Object.assign(Object.assign(Object.assign(Object.assign({
101
98
  forceBoundsWidth: void 0,
102
99
  forceBoundsHeight: void 0,
103
100
  opacity: 1,
@@ -113,19 +110,16 @@ exports.DefaultStrokeStyle = {
113
110
  blur: 0,
114
111
  cursor: null,
115
112
  html: null,
116
- react: null,
117
- ...exports.DefaultFillStyle,
118
- ...exports.DefaultStrokeStyle,
119
- ...exports.DefaultLayout,
120
- ...exports.DefaultPickStyle
121
- }, exports.DefaultConnectAttribute = {
113
+ react: null
114
+ }, exports.DefaultFillStyle), exports.DefaultStrokeStyle), exports.DefaultLayout), exports.DefaultPickStyle),
115
+ exports.DefaultConnectAttribute = {
122
116
  connectedType: "none",
123
117
  connectedStyle: {},
124
118
  connectedX: NaN,
125
119
  connectedY: NaN
126
120
  }, exports.DefaultDebugAttribute = {
127
121
  _debug_bounds: !1
128
- }, exports.DefaultAttribute = {
122
+ }, exports.DefaultAttribute = Object.assign(Object.assign(Object.assign({
129
123
  strokeSeg: null,
130
124
  renderable: !0,
131
125
  pickable: !0,
@@ -145,13 +139,10 @@ exports.DefaultStrokeStyle = {
145
139
  shadowRootIdx: 1,
146
140
  globalZIndex: 1,
147
141
  globalCompositeOperation: "",
148
- overflow: "hidden",
149
- ...exports.DefaultDebugAttribute,
150
- ...exports.DefaultStyle,
151
- ...exports.DefaultTransform
152
- }, exports.addAttributeToPrototype = addAttributeToPrototype, exports.rewriteProto = rewriteProto,
153
- exports.DefaultArcAttribute = {
154
- ...exports.DefaultAttribute,
142
+ overflow: "hidden"
143
+ }, exports.DefaultDebugAttribute), exports.DefaultStyle), exports.DefaultTransform),
144
+ exports.addAttributeToPrototype = addAttributeToPrototype, exports.rewriteProto = rewriteProto,
145
+ exports.DefaultArcAttribute = Object.assign(Object.assign({}, exports.DefaultAttribute), {
155
146
  startAngle: 0,
156
147
  endAngle: vutils_1.pi2,
157
148
  innerRadius: 0,
@@ -163,21 +154,17 @@ exports.DefaultArcAttribute = {
163
154
  padAngle: 0,
164
155
  cap: !1,
165
156
  forceShowCap: !1
166
- }, exports.DefaultAreaAttribute = {
167
- ...exports.DefaultAttribute,
168
- ...exports.DefaultConnectAttribute,
157
+ }), exports.DefaultAreaAttribute = Object.assign(Object.assign(Object.assign({}, exports.DefaultAttribute), exports.DefaultConnectAttribute), {
169
158
  points: [],
170
159
  segments: [],
171
160
  curveType: "linear",
172
161
  clipRange: 1,
173
162
  closePath: !1
174
- }, exports.DefaultCircleAttribute = {
175
- ...exports.DefaultAttribute,
163
+ }), exports.DefaultCircleAttribute = Object.assign(Object.assign({}, exports.DefaultAttribute), {
176
164
  radius: 1,
177
165
  startAngle: 0,
178
166
  endAngle: vutils_1.pi2
179
- }, exports.DefaultGroupAttribute = {
180
- ...exports.DefaultAttribute,
167
+ }), exports.DefaultGroupAttribute = Object.assign(Object.assign({}, exports.DefaultAttribute), {
181
168
  width: 0,
182
169
  height: 0,
183
170
  cornerRadius: 0,
@@ -191,62 +178,50 @@ exports.DefaultArcAttribute = {
191
178
  alignItems: "flex-start",
192
179
  alignContent: "flex-start",
193
180
  baseOpacity: 1
194
- }, exports.DefaultGlyphAttribute = {
195
- ...exports.DefaultAttribute,
181
+ }), exports.DefaultGlyphAttribute = Object.assign(Object.assign({}, exports.DefaultAttribute), {
196
182
  path: "",
197
183
  width: 0,
198
184
  height: 0,
199
185
  cornerRadius: 0,
200
186
  clip: !1
201
- }, exports.DefaultLineAttribute = {
202
- ...exports.DefaultAttribute,
203
- ...exports.DefaultConnectAttribute,
187
+ }), exports.DefaultLineAttribute = Object.assign(Object.assign(Object.assign({}, exports.DefaultAttribute), exports.DefaultConnectAttribute), {
204
188
  points: [],
205
189
  segments: [],
206
190
  curveType: "linear",
207
191
  clipRange: 1,
208
192
  clipRangeByDimension: "default",
209
193
  closePath: !1
210
- }, exports.DefaultPathAttribute = {
211
- ...exports.DefaultAttribute,
194
+ }), exports.DefaultPathAttribute = Object.assign(Object.assign({}, exports.DefaultAttribute), {
212
195
  path: new custom_path2d_1.CustomPath2D,
213
196
  customPath: () => {
214
197
  vutils_1.Logger.getInstance().warn("空函数");
215
198
  }
216
- }, exports.DefaultPolygonAttribute = {
217
- ...exports.DefaultAttribute,
199
+ }), exports.DefaultPolygonAttribute = Object.assign(Object.assign({}, exports.DefaultAttribute), {
218
200
  points: [],
219
201
  cornerRadius: 0,
220
202
  closePath: !0
221
- }, exports.DefaultRectAttribute = {
222
- ...exports.DefaultAttribute,
203
+ }), exports.DefaultRectAttribute = Object.assign(Object.assign({}, exports.DefaultAttribute), {
223
204
  width: 0,
224
205
  height: 0,
225
206
  x1: 0,
226
207
  y1: 0,
227
208
  strokeBoundsBuffer: 0,
228
209
  cornerRadius: 0
229
- }, exports.DefaultRect3dAttribute = {
230
- ...exports.DefaultAttribute,
210
+ }), exports.DefaultRect3dAttribute = Object.assign(Object.assign({}, exports.DefaultAttribute), {
231
211
  width: 0,
232
212
  height: 0,
233
213
  x1: 0,
234
214
  y1: 0,
235
215
  cornerRadius: 0,
236
216
  length: 0
237
- }, exports.DefaultSymbolAttribute = {
238
- ...exports.DefaultAttribute,
217
+ }), exports.DefaultSymbolAttribute = Object.assign(Object.assign({}, exports.DefaultAttribute), {
239
218
  symbolType: "circle",
240
219
  size: 10,
241
220
  keepDirIn3d: !0
242
- }, exports.DefaultTextAttribute = {
243
- ...exports.DefaultAttribute,
244
- ...exports.DefaultTextStyle,
221
+ }), exports.DefaultTextAttribute = Object.assign(Object.assign(Object.assign({}, exports.DefaultAttribute), exports.DefaultTextStyle), {
245
222
  strokeBoundsBuffer: 0,
246
223
  keepDirIn3d: !0
247
- }, exports.DefaultRichTextAttribute = {
248
- ...exports.DefaultAttribute,
249
- ...exports.DefaultTextStyle,
224
+ }), exports.DefaultRichTextAttribute = Object.assign(Object.assign(Object.assign({}, exports.DefaultAttribute), exports.DefaultTextStyle), {
250
225
  width: 300,
251
226
  height: 300,
252
227
  ellipsis: !0,
@@ -260,17 +235,16 @@ exports.DefaultArcAttribute = {
260
235
  maxHeight: void 0,
261
236
  maxWidth: void 0,
262
237
  singleLine: !1
263
- }, exports.DefaultImageAttribute = {
238
+ }), exports.DefaultImageAttribute = Object.assign(Object.assign({
264
239
  repeatX: "no-repeat",
265
240
  repeatY: "no-repeat",
266
241
  image: "",
267
242
  width: 0,
268
- height: 0,
269
- ...exports.DefaultAttribute,
243
+ height: 0
244
+ }, exports.DefaultAttribute), {
270
245
  fill: !0,
271
246
  cornerRadius: 0
272
- }, exports.DefaultRichTextIconAttribute = {
273
- ...exports.DefaultImageAttribute,
247
+ }), exports.DefaultRichTextIconAttribute = Object.assign(Object.assign({}, exports.DefaultImageAttribute), {
274
248
  backgroundShowMode: "never",
275
249
  backgroundWidth: 0,
276
250
  backgroundHeight: 0,
@@ -287,5 +261,5 @@ exports.DefaultArcAttribute = {
287
261
  backgroundStrokeOpacity: 1,
288
262
  backgroundRadius: 4,
289
263
  opacity: 1
290
- };
264
+ });
291
265
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/config.ts"],"names":[],"mappings":";;;AACA,6CAAuD;AACvD,2DAAuD;AAiC1C,QAAA,aAAa,GAAY;IACpC,SAAS,EAAE,MAAM;CAClB,CAAC;AAEW,QAAA,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,CA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AAA,4BAA4B,GAA4C;IACnF,GAAG,6BAAqB;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,6CAAuD;AACvD,2DAAuD;AAiC1C,QAAA,aAAa,GAAY;IACpC,SAAS,EAAE,MAAM;CAClB,CAAC;AAEW,QAAA,gBAAgB,GAAe;IAC1C,C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E,IAAI,EACV,YAAY,EAAE,CAAC,IACf;AAEW,QAAA,4BAA4B,mCACpC,6BAAqB,KACxB,kBAAkB,EAAE,OAAO,EAC3B,eAAe,EAAE,CAAC,EAClB,gBAAgB,EAAE,CAAC,EACnB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,QAAQ,EACtB,SAAS,EAAE,YAAY,EACvB,MAAM,EAAE,CAAC,EACT,EAAE,EAAE,EAAE,EAEN,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,IACV","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 @@ Object.defineProperty(exports, "__esModule", {
7
7
  const graphic_1 = require("./graphic"), theme_1 = require("./theme"), application_1 = require("../application"), constants_1 = require("./constants");
8
8
 
9
9
  class Glyph extends graphic_1.Graphic {
10
- type="glyph";
11
- static NOWORK_ANIMATE_ATTR=graphic_1.NOWORK_ANIMATE_ATTR;
12
10
  constructor(params) {
13
- super(params), this.numberType = constants_1.GLYPH_NUMBER_TYPE, this.subGraphic = [],
14
- this._onInit && this._onInit(this), this.valid = this.isValid();
11
+ super(params), this.type = "glyph", this.numberType = constants_1.GLYPH_NUMBER_TYPE,
12
+ this.subGraphic = [], 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 => {
@@ -91,12 +89,14 @@ class Glyph extends graphic_1.Graphic {
91
89
  return !1;
92
90
  }
93
91
  useStates(states, hasAnimation) {
92
+ var _a;
94
93
  if (!states.length) return void this.clearStates(hasAnimation);
95
- if (!(this.currentStates?.length !== states.length || states.some(((stateName, index) => this.currentStates[index] !== stateName)))) return;
94
+ if (!((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) !== states.length || states.some(((stateName, index) => this.currentStates[index] !== stateName)))) return;
96
95
  const stateAttrs = {}, subAttrs = this.subGraphic.map((() => ({})));
97
96
  states.forEach((stateName => {
97
+ var _a;
98
98
  const attrs = this.glyphStateProxy ? this.glyphStateProxy(stateName, states) : this.glyphStates[stateName];
99
- attrs && (Object.assign(stateAttrs, attrs.attributes), attrs.subAttributes?.length && subAttrs.forEach(((subAttrs, index) => {
99
+ attrs && (Object.assign(stateAttrs, attrs.attributes), (null === (_a = attrs.subAttributes) || void 0 === _a ? void 0 : _a.length) && subAttrs.forEach(((subAttrs, index) => {
100
100
  Object.assign(subAttrs, attrs.subAttributes[index]);
101
101
  })));
102
102
  })), this.subGraphic.forEach(((graphic, index) => {
@@ -111,9 +111,7 @@ class Glyph extends graphic_1.Graphic {
111
111
  this.normalAttrs = null, this.currentStates = []);
112
112
  }
113
113
  clone() {
114
- const glyph = new Glyph({
115
- ...this.attribute
116
- });
114
+ const glyph = new Glyph(Object.assign({}, this.attribute));
117
115
  return glyph.setSubGraphic(this.subGraphic.map((g => g.clone()))), glyph;
118
116
  }
119
117
  getNoWorkAnimateAttr() {
@@ -125,5 +123,6 @@ function createGlyph(attributes) {
125
123
  return new Glyph(attributes);
126
124
  }
127
125
 
128
- exports.Glyph = Glyph, exports.createGlyph = createGlyph;
126
+ exports.Glyph = Glyph, Glyph.NOWORK_ANIMATE_ATTR = graphic_1.NOWORK_ANIMATE_ATTR,
127
+ exports.createGlyph = createGlyph;
129
128
  //# sourceMappingURL=glyph.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/glyph.ts"],"names":[],"mappings":";;;AACA,uCAAyD;AASzD,mCAAmC;AACnC,gDAA6C;AAC7C,2CAAgD;AAEhD,MAAa,KAAM,SAAQ,iBAA+B;IACxD,IAAI,GAAgB,OAAO,CAAC;IAmB5B,MAAM,CAAC,mBAAmB,GAAG,6BAAmB,CAAC;IAEjD,YAAY,MAAuC;QACjD,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,UAAU,GAAG,6BAAiB,CAAC;QACpC,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QACrB,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;IAC9B,CAAC;IAED,aAAa,CAAC,UAAsB;QAClC,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YACrB,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;YACnB,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QACrD,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAC5B,IAAI,CA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,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;IACzD,CAAC;IAED,WAAW,CAAC,YAAsB;QAChC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACzC,OAAO;SACR;QAED,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;YAChC,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,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;;AAtOH,sBAuOC;AAED,SAAgB,WAAW,CAAC,UAAkC;IAC5D,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;AAC/B,CAAC;AAFD,kCAEC","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,uCAAyD;AASzD,mCAAmC;AACnC,gDAA6C;AAC7C,2CAAgD;AAEhD,MAAa,KAAM,SAAQ,iBAA+B;IAsBxD,YAAY,MAAuC;QACjD,KAAK,CAAC,MAAM,CAAC,CAAC;QAtBhB,SAAI,GAAgB,OAAO,CAAC;QAuB1B,I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CAAC;IAED,KAAK;QACH,MAAM,KAAK,GAAG,IAAI,KAAK,mBAAM,IAAI,CAAC,SAAS,EAAG,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;;AAtOH,sBAuOC;AAnNQ,yBAAmB,GAAG,6BAAmB,CAAC;AAqNnD,SAAgB,WAAW,CAAC,UAAkC;IAC5D,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;AAC/B,CAAC;AAFD,kCAEC","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"]}
@@ -134,6 +134,7 @@ function getExtraModelMatrix(dx, dy, graphic) {
134
134
  }
135
135
 
136
136
  function getModelMatrix(out, graphic, theme) {
137
+ var _a;
137
138
  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 ];
138
139
  if (anchor3d) {
139
140
  if ("string" == typeof anchor3d[0]) {
@@ -144,7 +145,7 @@ function getModelMatrix(out, graphic, theme) {
144
145
  const ratio = parseFloat(anchor3d[1]) / 100, bounds = graphic.AABBBounds;
145
146
  _anchor[1] = bounds.x1 + (bounds.x2 - bounds.x1) * ratio;
146
147
  } else _anchor[1] = anchor3d[1];
147
- _anchor[2] = anchor3d[2] ?? 0;
148
+ _anchor[2] = null !== (_a = anchor3d[2]) && void 0 !== _a ? _a : 0;
148
149
  }
149
150
  if (identity(out), translate(out, out, [ x + dx, y + dy, z + dz ]), translate(out, out, [ _anchor[0], _anchor[1], _anchor[2] ]),
150
151
  rotateX(out, out, beta), rotateY(out, out, alpha), translate(out, out, [ -_anchor[0], -_anchor[1], _anchor[2] ]),
@@ -176,14 +177,6 @@ exports.getExtraModelMatrix = getExtraModelMatrix, exports.getModelMatrix = getM
176
177
  exports.shouldUseMat4 = shouldUseMat4;
177
178
 
178
179
  let DefaultGraphicService = class {
179
- creator;
180
- _rectBoundsContribitions;
181
- _symbolBoundsContribitions;
182
- _circleBoundsContribitions;
183
- _arcBoundsContribitions;
184
- _pathBoundsContribitions;
185
- tempAABBBounds1;
186
- tempAABBBounds2;
187
180
  constructor(creator) {
188
181
  this.creator = creator, this.hooks = {
189
182
  onAttributeUpdate: new tapable_1.SyncHook([ "graphic" ]),
@@ -237,7 +230,8 @@ let DefaultGraphicService = class {
237
230
  if (!this.updatePathProxyAABBBounds(aabbBounds, graphic)) {
238
231
  let {width: width, height: height} = attribute;
239
232
  const {x1: x1, y1: y1, x: x, y: y} = attribute;
240
- width = width ?? x1 - x, height = height ?? y1 - y, aabbBounds.set(0, 0, width || 0, height || 0);
233
+ width = null != width ? width : x1 - x, height = null != height ? height : y1 - y,
234
+ aabbBounds.set(0, 0, width || 0, height || 0);
241
235
  }
242
236
  const tb1 = this.tempAABBBounds1, tb2 = this.tempAABBBounds2;
243
237
  return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2),
@@ -428,14 +422,16 @@ let DefaultGraphicService = class {
428
422
  updateAreaAABBBoundsByPoints(attribute, areaTheme, aabbBounds, graphic) {
429
423
  const {points: points = areaTheme.points} = attribute, b = aabbBounds;
430
424
  return points.forEach((p => {
431
- b.add(p.x, p.y), b.add(p.x1 ?? p.x, p.y1 ?? p.y);
425
+ var _a, _b;
426
+ 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);
432
427
  })), b;
433
428
  }
434
429
  updateAreaAABBBoundsBySegments(attribute, areaTheme, aabbBounds, graphic) {
435
430
  const {segments: segments = areaTheme.segments} = attribute, b = aabbBounds;
436
431
  return segments.forEach((s => {
437
432
  s.points.forEach((p => {
438
- b.add(p.x, p.y), b.add(p.x1 ?? p.x, p.y1 ?? p.y);
433
+ var _a, _b;
434
+ 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);
439
435
  }));
440
436
  })), b;
441
437
  }