@visactor/vrender 0.15.0-alpha.14 → 0.15.0-alpha.16

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 (303) hide show
  1. package/cjs/animate/animate.d.ts +0 -1
  2. package/cjs/animate/animate.js +0 -3
  3. package/cjs/animate/animate.js.map +1 -1
  4. package/cjs/animate/timeline.d.ts +1 -1
  5. package/cjs/animate/timeline.js +2 -2
  6. package/cjs/animate/timeline.js.map +1 -1
  7. package/cjs/canvas/contributions/browser/context.d.ts +0 -1
  8. package/cjs/common/contribution-provider.d.ts +0 -1
  9. package/cjs/common/contribution-provider.js +2 -7
  10. package/cjs/common/contribution-provider.js.map +1 -1
  11. package/cjs/common/enums.d.ts +2 -4
  12. package/cjs/common/enums.js +2 -3
  13. package/cjs/common/enums.js.map +1 -1
  14. package/cjs/core/contributions/env/base-contribution.d.ts +1 -11
  15. package/cjs/core/contributions/env/base-contribution.js +1 -22
  16. package/cjs/core/contributions/env/base-contribution.js.map +1 -1
  17. package/cjs/core/contributions/env/browser-contribution.d.ts +2 -11
  18. package/cjs/core/contributions/env/browser-contribution.js +0 -66
  19. package/cjs/core/contributions/env/browser-contribution.js.map +1 -1
  20. package/cjs/core/contributions/textMeasure/layout.js +1 -1
  21. package/cjs/core/contributions/textMeasure/layout.js.map +1 -1
  22. package/cjs/core/contributions/window/base-contribution.d.ts +5 -11
  23. package/cjs/core/contributions/window/base-contribution.js +0 -10
  24. package/cjs/core/contributions/window/base-contribution.js.map +1 -1
  25. package/cjs/core/contributions/window/browser-contribution.d.ts +0 -11
  26. package/cjs/core/contributions/window/browser-contribution.js +2 -33
  27. package/cjs/core/contributions/window/browser-contribution.js.map +1 -1
  28. package/cjs/core/global.d.ts +1 -11
  29. package/cjs/core/global.js +0 -18
  30. package/cjs/core/global.js.map +1 -1
  31. package/cjs/core/layer.js +6 -6
  32. package/cjs/core/layer.js.map +1 -1
  33. package/cjs/core/stage.d.ts +4 -13
  34. package/cjs/core/stage.js +25 -54
  35. package/cjs/core/stage.js.map +1 -1
  36. package/cjs/core/window.d.ts +0 -6
  37. package/cjs/core/window.js +1 -10
  38. package/cjs/core/window.js.map +1 -1
  39. package/cjs/graphic/builtin-symbol/arrow2-left.js +1 -1
  40. package/cjs/graphic/builtin-symbol/arrow2-left.js.map +1 -1
  41. package/cjs/graphic/builtin-symbol/arrow2-right.js +1 -1
  42. package/cjs/graphic/builtin-symbol/arrow2-right.js.map +1 -1
  43. package/cjs/graphic/builtin-symbol/index.d.ts +1 -1
  44. package/cjs/graphic/builtin-symbol/index.js +2 -2
  45. package/cjs/graphic/builtin-symbol/index.js.map +1 -1
  46. package/cjs/graphic/builtin-symbol/utils.d.ts +5 -13
  47. package/cjs/graphic/builtin-symbol/utils.js +9 -23
  48. package/cjs/graphic/builtin-symbol/utils.js.map +1 -1
  49. package/cjs/graphic/config.js +6 -7
  50. package/cjs/graphic/config.js.map +1 -1
  51. package/cjs/graphic/constants.d.ts +0 -22
  52. package/cjs/graphic/constants.js +2 -20
  53. package/cjs/graphic/constants.js.map +1 -1
  54. package/cjs/graphic/graphic.d.ts +0 -3
  55. package/cjs/graphic/graphic.js +26 -40
  56. package/cjs/graphic/graphic.js.map +1 -1
  57. package/cjs/graphic/group.js +1 -1
  58. package/cjs/graphic/group.js.map +1 -1
  59. package/cjs/graphic/index.d.ts +0 -1
  60. package/cjs/graphic/index.js +13 -13
  61. package/cjs/graphic/index.js.map +1 -1
  62. package/cjs/graphic/richtext/utils.d.ts +1 -1
  63. package/cjs/graphic/richtext/utils.js +1 -1
  64. package/cjs/graphic/richtext/utils.js.map +1 -1
  65. package/cjs/graphic/symbol.d.ts +1 -2
  66. package/cjs/graphic/symbol.js +4 -27
  67. package/cjs/graphic/symbol.js.map +1 -1
  68. package/cjs/graphic/text.js +23 -33
  69. package/cjs/graphic/text.js.map +1 -1
  70. package/cjs/graphic/tools.d.ts +2 -3
  71. package/cjs/graphic/tools.js +3 -58
  72. package/cjs/graphic/tools.js.map +1 -1
  73. package/cjs/graphic/wrap-text.js +8 -10
  74. package/cjs/graphic/wrap-text.js.map +1 -1
  75. package/cjs/index.d.ts +1 -2
  76. package/cjs/index.js +2 -2
  77. package/cjs/index.js.map +1 -1
  78. package/cjs/interface/animate.d.ts +1 -3
  79. package/cjs/interface/animate.js.map +1 -1
  80. package/cjs/interface/global.d.ts +1 -25
  81. package/cjs/interface/global.js.map +1 -1
  82. package/cjs/interface/graphic/image.d.ts +0 -1
  83. package/cjs/interface/graphic/image.js.map +1 -1
  84. package/cjs/interface/graphic/line.d.ts +1 -0
  85. package/cjs/interface/graphic/line.js.map +1 -1
  86. package/cjs/interface/graphic/symbol.d.ts +2 -3
  87. package/cjs/interface/graphic/symbol.js.map +1 -1
  88. package/cjs/interface/graphic/text.d.ts +0 -1
  89. package/cjs/interface/graphic/text.js.map +1 -1
  90. package/cjs/interface/graphic.d.ts +3 -25
  91. package/cjs/interface/graphic.js.map +1 -1
  92. package/cjs/interface/render.d.ts +0 -1
  93. package/cjs/interface/render.js.map +1 -1
  94. package/cjs/interface/stage.d.ts +3 -10
  95. package/cjs/interface/stage.js.map +1 -1
  96. package/cjs/interface/window.d.ts +0 -12
  97. package/cjs/interface/window.js.map +1 -1
  98. package/cjs/picker/contributions/canvas-picker/symbol-picker.js +2 -4
  99. package/cjs/picker/contributions/canvas-picker/symbol-picker.js.map +1 -1
  100. package/cjs/picker/pick-interceptor.js +3 -2
  101. package/cjs/picker/pick-interceptor.js.map +1 -1
  102. package/cjs/plugins/builtin-plugin/flex-layout-plugin.d.ts +0 -2
  103. package/cjs/plugins/builtin-plugin/flex-layout-plugin.js +21 -42
  104. package/cjs/plugins/builtin-plugin/flex-layout-plugin.js.map +1 -1
  105. package/cjs/plugins/plugin-modules.js +1 -1
  106. package/cjs/plugins/plugin-modules.js.map +1 -1
  107. package/cjs/render/contributions/render/area-render.js +31 -21
  108. package/cjs/render/contributions/render/area-render.js.map +1 -1
  109. package/cjs/render/contributions/render/contributions/image-contribution-render.js +1 -23
  110. package/cjs/render/contributions/render/contributions/image-contribution-render.js.map +1 -1
  111. package/cjs/render/contributions/render/draw-contribution.d.ts +1 -3
  112. package/cjs/render/contributions/render/draw-contribution.js +1 -3
  113. package/cjs/render/contributions/render/draw-contribution.js.map +1 -1
  114. package/cjs/render/contributions/render/image-render.js +3 -7
  115. package/cjs/render/contributions/render/image-render.js.map +1 -1
  116. package/cjs/render/contributions/render/line-render.js +50 -23
  117. package/cjs/render/contributions/render/line-render.js.map +1 -1
  118. package/cjs/render/contributions/render/symbol-render.js +5 -12
  119. package/cjs/render/contributions/render/symbol-render.js.map +1 -1
  120. package/cjs/render/contributions/render/utils.d.ts +2 -2
  121. package/cjs/render/contributions/render/utils.js.map +1 -1
  122. package/cjs/render/render-service.js +1 -3
  123. package/cjs/render/render-service.js.map +1 -1
  124. package/dist/index.js +318 -3342
  125. package/dist/index.min.js +1 -1
  126. package/es/animate/animate.d.ts +0 -1
  127. package/es/animate/animate.js +0 -3
  128. package/es/animate/animate.js.map +1 -1
  129. package/es/animate/timeline.d.ts +1 -1
  130. package/es/animate/timeline.js +2 -2
  131. package/es/animate/timeline.js.map +1 -1
  132. package/es/canvas/contributions/browser/context.d.ts +0 -1
  133. package/es/common/contribution-provider.d.ts +0 -1
  134. package/es/common/contribution-provider.js +0 -4
  135. package/es/common/contribution-provider.js.map +1 -1
  136. package/es/common/enums.d.ts +2 -4
  137. package/es/common/enums.js +2 -3
  138. package/es/common/enums.js.map +1 -1
  139. package/es/core/contributions/env/base-contribution.d.ts +1 -11
  140. package/es/core/contributions/env/base-contribution.js +0 -23
  141. package/es/core/contributions/env/base-contribution.js.map +1 -1
  142. package/es/core/contributions/env/browser-contribution.d.ts +2 -11
  143. package/es/core/contributions/env/browser-contribution.js +1 -67
  144. package/es/core/contributions/env/browser-contribution.js.map +1 -1
  145. package/es/core/contributions/textMeasure/layout.js +1 -1
  146. package/es/core/contributions/textMeasure/layout.js.map +1 -1
  147. package/es/core/contributions/window/base-contribution.d.ts +5 -11
  148. package/es/core/contributions/window/base-contribution.js +0 -10
  149. package/es/core/contributions/window/base-contribution.js.map +1 -1
  150. package/es/core/contributions/window/browser-contribution.d.ts +0 -11
  151. package/es/core/contributions/window/browser-contribution.js +2 -33
  152. package/es/core/contributions/window/browser-contribution.js.map +1 -1
  153. package/es/core/global.d.ts +1 -11
  154. package/es/core/global.js +0 -18
  155. package/es/core/global.js.map +1 -1
  156. package/es/core/layer.js +6 -6
  157. package/es/core/layer.js.map +1 -1
  158. package/es/core/stage.d.ts +4 -13
  159. package/es/core/stage.js +24 -57
  160. package/es/core/stage.js.map +1 -1
  161. package/es/core/window.d.ts +0 -6
  162. package/es/core/window.js +1 -10
  163. package/es/core/window.js.map +1 -1
  164. package/es/graphic/builtin-symbol/arrow2-left.js +1 -1
  165. package/es/graphic/builtin-symbol/arrow2-left.js.map +1 -1
  166. package/es/graphic/builtin-symbol/arrow2-right.js +1 -1
  167. package/es/graphic/builtin-symbol/arrow2-right.js.map +1 -1
  168. package/es/graphic/builtin-symbol/index.d.ts +1 -1
  169. package/es/graphic/builtin-symbol/index.js +1 -11
  170. package/es/graphic/builtin-symbol/index.js.map +1 -1
  171. package/es/graphic/builtin-symbol/utils.d.ts +5 -13
  172. package/es/graphic/builtin-symbol/utils.js +7 -25
  173. package/es/graphic/builtin-symbol/utils.js.map +1 -1
  174. package/es/graphic/config.js +6 -7
  175. package/es/graphic/config.js.map +1 -1
  176. package/es/graphic/constants.d.ts +0 -22
  177. package/es/graphic/constants.js +0 -26
  178. package/es/graphic/constants.js.map +1 -1
  179. package/es/graphic/graphic.d.ts +0 -3
  180. package/es/graphic/graphic.js +26 -40
  181. package/es/graphic/graphic.js.map +1 -1
  182. package/es/graphic/group.js +1 -1
  183. package/es/graphic/group.js.map +1 -1
  184. package/es/graphic/index.d.ts +0 -1
  185. package/es/graphic/index.js +0 -2
  186. package/es/graphic/index.js.map +1 -1
  187. package/es/graphic/richtext/utils.d.ts +1 -1
  188. package/es/graphic/richtext/utils.js +1 -1
  189. package/es/graphic/richtext/utils.js.map +1 -1
  190. package/es/graphic/symbol.d.ts +1 -2
  191. package/es/graphic/symbol.js +1 -28
  192. package/es/graphic/symbol.js.map +1 -1
  193. package/es/graphic/text.js +23 -33
  194. package/es/graphic/text.js.map +1 -1
  195. package/es/graphic/tools.d.ts +2 -3
  196. package/es/graphic/tools.js +0 -59
  197. package/es/graphic/tools.js.map +1 -1
  198. package/es/graphic/wrap-text.js +8 -10
  199. package/es/graphic/wrap-text.js.map +1 -1
  200. package/es/index.d.ts +1 -2
  201. package/es/index.js +1 -3
  202. package/es/index.js.map +1 -1
  203. package/es/interface/animate.d.ts +1 -3
  204. package/es/interface/animate.js.map +1 -1
  205. package/es/interface/global.d.ts +1 -25
  206. package/es/interface/global.js.map +1 -1
  207. package/es/interface/graphic/image.d.ts +0 -1
  208. package/es/interface/graphic/image.js.map +1 -1
  209. package/es/interface/graphic/line.d.ts +1 -0
  210. package/es/interface/graphic/line.js.map +1 -1
  211. package/es/interface/graphic/symbol.d.ts +2 -3
  212. package/es/interface/graphic/symbol.js.map +1 -1
  213. package/es/interface/graphic/text.d.ts +0 -1
  214. package/es/interface/graphic/text.js.map +1 -1
  215. package/es/interface/graphic.d.ts +3 -25
  216. package/es/interface/graphic.js.map +1 -1
  217. package/es/interface/render.d.ts +0 -1
  218. package/es/interface/render.js.map +1 -1
  219. package/es/interface/stage.d.ts +3 -10
  220. package/es/interface/stage.js.map +1 -1
  221. package/es/interface/window.d.ts +0 -12
  222. package/es/interface/window.js.map +1 -1
  223. package/es/picker/contributions/canvas-picker/symbol-picker.js +1 -6
  224. package/es/picker/contributions/canvas-picker/symbol-picker.js.map +1 -1
  225. package/es/picker/pick-interceptor.js +3 -2
  226. package/es/picker/pick-interceptor.js.map +1 -1
  227. package/es/plugins/builtin-plugin/flex-layout-plugin.d.ts +0 -2
  228. package/es/plugins/builtin-plugin/flex-layout-plugin.js +20 -47
  229. package/es/plugins/builtin-plugin/flex-layout-plugin.js.map +1 -1
  230. package/es/plugins/plugin-modules.js +2 -2
  231. package/es/plugins/plugin-modules.js.map +1 -1
  232. package/es/render/contributions/render/area-render.js +30 -20
  233. package/es/render/contributions/render/area-render.js.map +1 -1
  234. package/es/render/contributions/render/contributions/image-contribution-render.js +0 -27
  235. package/es/render/contributions/render/contributions/image-contribution-render.js.map +1 -1
  236. package/es/render/contributions/render/draw-contribution.d.ts +1 -3
  237. package/es/render/contributions/render/draw-contribution.js +0 -4
  238. package/es/render/contributions/render/draw-contribution.js.map +1 -1
  239. package/es/render/contributions/render/image-render.js +2 -10
  240. package/es/render/contributions/render/image-render.js.map +1 -1
  241. package/es/render/contributions/render/line-render.js +49 -22
  242. package/es/render/contributions/render/line-render.js.map +1 -1
  243. package/es/render/contributions/render/symbol-render.js +5 -12
  244. package/es/render/contributions/render/symbol-render.js.map +1 -1
  245. package/es/render/contributions/render/utils.d.ts +2 -2
  246. package/es/render/contributions/render/utils.js.map +1 -1
  247. package/es/render/render-service.js +1 -3
  248. package/es/render/render-service.js.map +1 -1
  249. package/package.json +13 -10
  250. package/cjs/graphic/builtin-symbol/arrow2-down.d.ts +0 -12
  251. package/cjs/graphic/builtin-symbol/arrow2-down.js +0 -30
  252. package/cjs/graphic/builtin-symbol/arrow2-down.js.map +0 -1
  253. package/cjs/graphic/builtin-symbol/arrow2-up.d.ts +0 -12
  254. package/cjs/graphic/builtin-symbol/arrow2-up.js +0 -30
  255. package/cjs/graphic/builtin-symbol/arrow2-up.js.map +0 -1
  256. package/cjs/graphic/builtin-symbol/close.d.ts +0 -13
  257. package/cjs/graphic/builtin-symbol/close.js +0 -33
  258. package/cjs/graphic/builtin-symbol/close.js.map +0 -1
  259. package/cjs/graphic/builtin-symbol/line-h.d.ts +0 -13
  260. package/cjs/graphic/builtin-symbol/line-h.js +0 -32
  261. package/cjs/graphic/builtin-symbol/line-h.js.map +0 -1
  262. package/cjs/graphic/builtin-symbol/line-v.d.ts +0 -13
  263. package/cjs/graphic/builtin-symbol/line-v.js +0 -32
  264. package/cjs/graphic/builtin-symbol/line-v.js.map +0 -1
  265. package/cjs/jsx/graphicType.d.ts +0 -172
  266. package/cjs/jsx/graphicType.js +0 -133
  267. package/cjs/jsx/graphicType.js.map +0 -1
  268. package/cjs/jsx/index.d.ts +0 -2
  269. package/cjs/jsx/index.js +0 -21
  270. package/cjs/jsx/index.js.map +0 -1
  271. package/cjs/jsx/jsx-classic.d.ts +0 -3
  272. package/cjs/jsx/jsx-classic.js +0 -58
  273. package/cjs/jsx/jsx-classic.js.map +0 -1
  274. package/cjs/plugins/builtin-plugin/html-attribute-plugin.d.ts +0 -13
  275. package/cjs/plugins/builtin-plugin/html-attribute-plugin.js +0 -79
  276. package/cjs/plugins/builtin-plugin/html-attribute-plugin.js.map +0 -1
  277. package/es/graphic/builtin-symbol/arrow2-down.d.ts +0 -12
  278. package/es/graphic/builtin-symbol/arrow2-down.js +0 -24
  279. package/es/graphic/builtin-symbol/arrow2-down.js.map +0 -1
  280. package/es/graphic/builtin-symbol/arrow2-up.d.ts +0 -12
  281. package/es/graphic/builtin-symbol/arrow2-up.js +0 -24
  282. package/es/graphic/builtin-symbol/arrow2-up.js.map +0 -1
  283. package/es/graphic/builtin-symbol/close.d.ts +0 -13
  284. package/es/graphic/builtin-symbol/close.js +0 -27
  285. package/es/graphic/builtin-symbol/close.js.map +0 -1
  286. package/es/graphic/builtin-symbol/line-h.d.ts +0 -13
  287. package/es/graphic/builtin-symbol/line-h.js +0 -26
  288. package/es/graphic/builtin-symbol/line-h.js.map +0 -1
  289. package/es/graphic/builtin-symbol/line-v.d.ts +0 -13
  290. package/es/graphic/builtin-symbol/line-v.js +0 -26
  291. package/es/graphic/builtin-symbol/line-v.js.map +0 -1
  292. package/es/jsx/graphicType.d.ts +0 -172
  293. package/es/jsx/graphicType.js +0 -126
  294. package/es/jsx/graphicType.js.map +0 -1
  295. package/es/jsx/index.d.ts +0 -2
  296. package/es/jsx/index.js +0 -4
  297. package/es/jsx/index.js.map +0 -1
  298. package/es/jsx/jsx-classic.d.ts +0 -3
  299. package/es/jsx/jsx-classic.js +0 -56
  300. package/es/jsx/jsx-classic.js.map +0 -1
  301. package/es/plugins/builtin-plugin/html-attribute-plugin.d.ts +0 -13
  302. package/es/plugins/builtin-plugin/html-attribute-plugin.js +0 -75
  303. package/es/plugins/builtin-plugin/html-attribute-plugin.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/builtin-symbol/arrow2-left.ts"],"names":[],"mappings":"AAiCA,MAAM,UAAU,UAAU,CAAC,GAAe,EAAE,CAAS,EAAE,MAAc,EAAE,MAAc;IACnF,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IACjB,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,EAAE,MAAM,GAAG,EAAE,CAAC,CAAC;IACpC,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;IAC/B,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,EAAE,EAAE,GAAG,MAAM,CAAC,CAAC;IAEpC,OAAO,IAAI,CAAC;AACd,CAAC;AAGD,MAAM,OAAO,gBAAgB;IAA7B;QACE,SAAI,GAAe,YAAY,CAAC;QAEhC,YAAO,GAAW,kCAAkC,CAAC;IAmBvD,CAAC;IAjBC,IAAI,CAAC,GAAe,EAAE,IAAY,EAAE,MAAc,EAAE,MAAc;QAChE,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC;QACnB,OAAO,UAAU,CAAC,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,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,UAAU,CAAC,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,CAAC,IAAY,EAAE,MAAe;QAClC,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC;QACnB,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;QACf,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;QACf,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC;IAChB,CAAC;CACF;AAED,eAAe,IAAI,gBAAgB,EAAE,CAAC","file":"arrow2-left.js","sourcesContent":["import type { IBounds } from '@visactor/vutils';\nimport type { IContext2d, SymbolType, ISymbolClass } from '../../interface';\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 arrow2Left(ctx: IContext2d, r: number, transX: number, transY: number) {\n const r2 = r * 2;\n ctx.moveTo(r + transX, transY - r2);\n ctx.lineTo(transX - r, transY);\n ctx.lineTo(r + transX, r2 + transY);\n\n return true;\n}\n\n// 以中心为锚点,size为circle外接正方形的面积\nexport class Arrow2LeftSymbol implements ISymbolClass {\n type: SymbolType = 'arrow2Left';\n /* eslint-disable max-len */\n pathStr: string = 'M 0.25 -0.5 L -0.25 0 l 0.25 0.5';\n\n draw(ctx: IContext2d, size: number, transX: number, transY: number) {\n const r = size / 4;\n return arrow2Left(ctx, r, transX, transY);\n }\n\n drawOffset(ctx: IContext2d, size: number, transX: number, transY: number, offset: number) {\n const r = size / 4 + offset;\n return arrow2Left(ctx, r, transX, transY);\n }\n\n bounds(size: number, bounds: IBounds) {\n const r = size / 2;\n bounds.x1 = -r;\n bounds.x2 = r;\n bounds.y1 = -r;\n bounds.y2 = r;\n }\n}\n\nexport default new Arrow2LeftSymbol();\n"]}
1
+ {"version":3,"sources":["../src/graphic/builtin-symbol/arrow2-left.ts"],"names":[],"mappings":"AAiCA,MAAM,UAAU,UAAU,CAAC,GAAe,EAAE,CAAS,EAAE,MAAc,EAAE,MAAc;IACnF,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IACjB,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,EAAE,MAAM,GAAG,EAAE,CAAC,CAAC;IACpC,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;IAC/B,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,EAAE,EAAE,GAAG,MAAM,CAAC,CAAC;IAEpC,OAAO,IAAI,CAAC;AACd,CAAC;AAGD,MAAM,OAAO,gBAAgB;IAA7B;QACE,SAAI,GAAe,YAAY,CAAC;QAEhC,YAAO,GAAW,iCAAiC,CAAC;IAmBtD,CAAC;IAjBC,IAAI,CAAC,GAAe,EAAE,IAAY,EAAE,MAAc,EAAE,MAAc;QAChE,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC;QACnB,OAAO,UAAU,CAAC,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,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,UAAU,CAAC,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,CAAC,IAAY,EAAE,MAAe;QAClC,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC;QACnB,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;QACf,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;QACf,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC;IAChB,CAAC;CACF;AAED,eAAe,IAAI,gBAAgB,EAAE,CAAC","file":"arrow2-left.js","sourcesContent":["import type { IBounds } from '@visactor/vutils';\nimport type { IContext2d, SymbolType, ISymbolClass } from '../../interface';\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 arrow2Left(ctx: IContext2d, r: number, transX: number, transY: number) {\n const r2 = r * 2;\n ctx.moveTo(r + transX, transY - r2);\n ctx.lineTo(transX - r, transY);\n ctx.lineTo(r + transX, r2 + transY);\n\n return true;\n}\n\n// 以中心为锚点,size为circle外接正方形的面积\nexport class Arrow2LeftSymbol implements ISymbolClass {\n type: SymbolType = 'arrow2Left';\n /* eslint-disable max-len */\n pathStr: string = 'M 0.25 -0.5 L -0.25 0 l 0.5 0.5';\n\n draw(ctx: IContext2d, size: number, transX: number, transY: number) {\n const r = size / 4;\n return arrow2Left(ctx, r, transX, transY);\n }\n\n drawOffset(ctx: IContext2d, size: number, transX: number, transY: number, offset: number) {\n const r = size / 4 + offset;\n return arrow2Left(ctx, r, transX, transY);\n }\n\n bounds(size: number, bounds: IBounds) {\n const r = size / 2;\n bounds.x1 = -r;\n bounds.x2 = r;\n bounds.y1 = -r;\n bounds.y2 = r;\n }\n}\n\nexport default new Arrow2LeftSymbol();\n"]}
@@ -6,7 +6,7 @@ export function arrow2Right(ctx, r, transX, transY) {
6
6
 
7
7
  export class Arrow2RightSymbol {
8
8
  constructor() {
9
- this.type = "arrow2Right", this.pathStr = "M -0.25 -0.5 l 0.25 0 l -0.25 0.5";
9
+ this.type = "arrow2Right", this.pathStr = "M -0.25 -0.5 l 0.5 0.5 l -0.5 0.5";
10
10
  }
11
11
  draw(ctx, size, transX, transY) {
12
12
  return arrow2Right(ctx, size / 4, transX, transY);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/builtin-symbol/arrow2-right.ts"],"names":[],"mappings":"AAiCA,MAAM,UAAU,WAAW,CAAC,GAAe,EAAE,CAAS,EAAE,MAAc,EAAE,MAAc;IACpF,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IACjB,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC,CAAC;IACpC,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;IAC/B,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,EAAE,GAAG,MAAM,CAAC,CAAC;IAEpC,OAAO,IAAI,CAAC;AACd,CAAC;AAGD,MAAM,OAAO,iBAAiB;IAA9B;QACE,SAAI,GAAe,aAAa,CAAC;QAEjC,YAAO,GAAW,mCAAmC,CAAC;IAmBxD,CAAC;IAjBC,IAAI,CAAC,GAAe,EAAE,IAAY,EAAE,MAAc,EAAE,MAAc;QAChE,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC;QACnB,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,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,WAAW,CAAC,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,CAAC,IAAY,EAAE,MAAe;QAClC,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC;QACnB,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;QACf,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;QACf,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC;IAChB,CAAC;CACF;AAED,eAAe,IAAI,iBAAiB,EAAE,CAAC","file":"arrow2-right.js","sourcesContent":["import type { IBounds } from '@visactor/vutils';\nimport type { IContext2d, SymbolType, ISymbolClass } from '../../interface';\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 arrow2Right(ctx: IContext2d, r: number, transX: number, transY: number) {\n const r2 = r * 2;\n ctx.moveTo(transX - r, transY - r2);\n ctx.lineTo(transX + r, transY);\n ctx.lineTo(transX - r, r2 + transY);\n\n return true;\n}\n\n// 以中心为锚点,size为circle外接正方形的面积\nexport class Arrow2RightSymbol implements ISymbolClass {\n type: SymbolType = 'arrow2Right';\n /* eslint-disable max-len */\n pathStr: string = 'M -0.25 -0.5 l 0.25 0 l -0.25 0.5';\n\n draw(ctx: IContext2d, size: number, transX: number, transY: number) {\n const r = size / 4;\n return arrow2Right(ctx, r, transX, transY);\n }\n\n drawOffset(ctx: IContext2d, size: number, transX: number, transY: number, offset: number) {\n const r = size / 4 + offset;\n return arrow2Right(ctx, r, transX, transY);\n }\n\n bounds(size: number, bounds: IBounds) {\n const r = size / 2;\n bounds.x1 = -r;\n bounds.x2 = r;\n bounds.y1 = -r;\n bounds.y2 = r;\n }\n}\n\nexport default new Arrow2RightSymbol();\n"]}
1
+ {"version":3,"sources":["../src/graphic/builtin-symbol/arrow2-right.ts"],"names":[],"mappings":"AAiCA,MAAM,UAAU,WAAW,CAAC,GAAe,EAAE,CAAS,EAAE,MAAc,EAAE,MAAc;IACpF,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IACjB,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC,CAAC;IACpC,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;IAC/B,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,EAAE,GAAG,MAAM,CAAC,CAAC;IAEpC,OAAO,IAAI,CAAC;AACd,CAAC;AAGD,MAAM,OAAO,iBAAiB;IAA9B;QACE,SAAI,GAAe,aAAa,CAAC;QAEjC,YAAO,GAAW,mCAAmC,CAAC;IAmBxD,CAAC;IAjBC,IAAI,CAAC,GAAe,EAAE,IAAY,EAAE,MAAc,EAAE,MAAc;QAChE,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC;QACnB,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,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,WAAW,CAAC,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,CAAC,IAAY,EAAE,MAAe;QAClC,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC;QACnB,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;QACf,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;QACf,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC;IAChB,CAAC;CACF;AAED,eAAe,IAAI,iBAAiB,EAAE,CAAC","file":"arrow2-right.js","sourcesContent":["import type { IBounds } from '@visactor/vutils';\nimport type { IContext2d, SymbolType, ISymbolClass } from '../../interface';\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 arrow2Right(ctx: IContext2d, r: number, transX: number, transY: number) {\n const r2 = r * 2;\n ctx.moveTo(transX - r, transY - r2);\n ctx.lineTo(transX + r, transY);\n ctx.lineTo(transX - r, r2 + transY);\n\n return true;\n}\n\n// 以中心为锚点,size为circle外接正方形的面积\nexport class Arrow2RightSymbol implements ISymbolClass {\n type: SymbolType = 'arrow2Right';\n /* eslint-disable max-len */\n pathStr: string = 'M -0.25 -0.5 l 0.5 0.5 l -0.5 0.5';\n\n draw(ctx: IContext2d, size: number, transX: number, transY: number) {\n const r = size / 4;\n return arrow2Right(ctx, r, transX, transY);\n }\n\n drawOffset(ctx: IContext2d, size: number, transX: number, transY: number, offset: number) {\n const r = size / 4 + offset;\n return arrow2Right(ctx, r, transX, transY);\n }\n\n bounds(size: number, bounds: IBounds) {\n const r = size / 2;\n bounds.x1 = -r;\n bounds.x2 = r;\n bounds.y1 = -r;\n bounds.y2 = r;\n }\n}\n\nexport default new Arrow2RightSymbol();\n"]}
@@ -1,4 +1,4 @@
1
1
  import type { ISymbolClass } from '../../interface';
2
- export declare const builtinSymbols: (import("./circle").CircleSymbol | import("./cross").CrossSymbol | import("./diamond").DiamondSymbol | import("./square").SquareSymbol | import("./triangle-up").TriangleUpSymbol | import("./star").StarSymbol | import("./arrow").ArrowSymbol | import("./wedge").WedgeSymbol | import("./stroke").StrokeSymbol | import("./wye").WyeSymbol | import("./triangle-left").TriangleLeftSymbol | import("./triangle-right").TriangleRightSymbol | import("./triangle-down").TriangleDownSymbol | import("./arrow2-left").Arrow2LeftSymbol | import("./arrow2-right").Arrow2RightSymbol | import("./arrow2-up").Arrow2UpSymbol | import("./arrow2-down").Arrow2DownSymbol | import("./line-v").LineVSymbol | import("./line-h").LineHSymbol | import("./close").CloseSymbol | import("./rect").RectSymbol)[];
2
+ export declare const builtinSymbols: (import("./circle").CircleSymbol | import("./cross").CrossSymbol | import("./diamond").DiamondSymbol | import("./square").SquareSymbol | import("./triangle-up").TriangleUpSymbol | import("./star").StarSymbol | import("./arrow").ArrowSymbol | import("./wedge").WedgeSymbol | import("./stroke").StrokeSymbol | import("./wye").WyeSymbol | import("./triangle-left").TriangleLeftSymbol | import("./triangle-right").TriangleRightSymbol | import("./triangle-down").TriangleDownSymbol | import("./arrow2-left").Arrow2LeftSymbol | import("./arrow2-right").Arrow2RightSymbol | import("./rect").RectSymbol)[];
3
3
  export declare const builtinSymbolsMap: Record<string, ISymbolClass>;
4
4
  export * from './utils';
@@ -32,19 +32,9 @@ import arrow2Left from "./arrow2-left";
32
32
 
33
33
  import arrow2Right from "./arrow2-right";
34
34
 
35
- import arrow2Up from "./arrow2-up";
36
-
37
- import arrow2Down from "./arrow2-down";
38
-
39
- import lineV from "./line-v";
40
-
41
- import lineH from "./line-h";
42
-
43
- import close from "./close";
44
-
45
35
  import rect from "./rect";
46
36
 
47
- export const builtinSymbols = [ circle, cross, diamond, square, thinTriangle, triangle, star, arrow, wedge, stroke, wye, triangleLeft, triangleRight, triangleUp, triangleDown, arrow2Left, arrow2Right, arrow2Up, arrow2Down, rect, lineV, lineH, close ];
37
+ export const builtinSymbols = [ circle, cross, diamond, square, thinTriangle, triangle, star, arrow, wedge, stroke, wye, triangleLeft, triangleRight, triangleUp, triangleDown, arrow2Left, arrow2Right, rect ];
48
38
 
49
39
  export const builtinSymbolsMap = {};
50
40
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/builtin-symbol/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,IAAI,MAAM,QAAQ,CAAC;AAG1B,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM;IACN,KAAK;IACL,OAAO;IACP,MAAM;IACN,YAAY;IACZ,QAAQ;IACR,IAAI;IACJ,KAAK;IACL,KAAK;IACL,MAAM;IACN,GAAG;IACH,YAAY;IACZ,aAAa;IACb,UAAU;IACV,YAAY;IACZ,UAAU;IACV,WAAW;IACX,QAAQ;IACR,UAAU;IACV,IAAI;IACJ,KAAK;IACL,KAAK;IACL,KAAK;CACN,CAAC;AACF,MAAM,CAAC,MAAM,iBAAiB,GAAiC,EAAE,CAAC;AAElE,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;IAC9B,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC1C,CAAC,CAAC,CAAC;AAEH,cAAc,SAAS,CAAC","file":"index.js","sourcesContent":["import circle from './circle';\nimport cross from './cross';\nimport diamond from './diamond';\nimport square from './square';\nimport triangle from './triangle';\nimport star from './star';\nimport arrow from './arrow';\nimport wedge from './wedge';\nimport stroke from './stroke';\nimport wye from './wye';\nimport triangleLeft from './triangle-left';\nimport triangleRight from './triangle-right';\nimport triangleUp from './triangle-up';\nimport triangleDown from './triangle-down';\nimport thinTriangle from './thin-triangle';\nimport arrow2Left from './arrow2-left';\nimport arrow2Right from './arrow2-right';\nimport arrow2Up from './arrow2-up';\nimport arrow2Down from './arrow2-down';\nimport lineV from './line-v';\nimport lineH from './line-h';\nimport close from './close';\nimport rect from './rect';\nimport type { ISymbolClass } from '../../interface';\n\nexport const builtinSymbols = [\n circle,\n cross,\n diamond,\n square,\n thinTriangle,\n triangle,\n star,\n arrow,\n wedge,\n stroke,\n wye,\n triangleLeft,\n triangleRight,\n triangleUp,\n triangleDown,\n arrow2Left,\n arrow2Right,\n arrow2Up,\n arrow2Down,\n rect,\n lineV,\n lineH,\n close\n];\nexport const builtinSymbolsMap: Record<string, ISymbolClass> = {};\n\nbuiltinSymbols.forEach(symbol => {\n builtinSymbolsMap[symbol.type] = symbol;\n});\n\nexport * from './utils';\n"]}
1
+ {"version":3,"sources":["../src/graphic/builtin-symbol/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAG1B,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM;IACN,KAAK;IACL,OAAO;IACP,MAAM;IACN,YAAY;IACZ,QAAQ;IACR,IAAI;IACJ,KAAK;IACL,KAAK;IACL,MAAM;IACN,GAAG;IACH,YAAY;IACZ,aAAa;IACb,UAAU;IACV,YAAY;IACZ,UAAU;IACV,WAAW;IACX,IAAI;CACL,CAAC;AACF,MAAM,CAAC,MAAM,iBAAiB,GAAiC,EAAE,CAAC;AAElE,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;IAC9B,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC1C,CAAC,CAAC,CAAC;AAEH,cAAc,SAAS,CAAC","file":"index.js","sourcesContent":["import circle from './circle';\nimport cross from './cross';\nimport diamond from './diamond';\nimport square from './square';\nimport triangle from './triangle';\nimport star from './star';\nimport arrow from './arrow';\nimport wedge from './wedge';\nimport stroke from './stroke';\nimport wye from './wye';\nimport triangleLeft from './triangle-left';\nimport triangleRight from './triangle-right';\nimport triangleUp from './triangle-up';\nimport triangleDown from './triangle-down';\nimport thinTriangle from './thin-triangle';\nimport arrow2Left from './arrow2-left';\nimport arrow2Right from './arrow2-right';\nimport rect from './rect';\nimport type { ISymbolClass } from '../../interface';\n\nexport const builtinSymbols = [\n circle,\n cross,\n diamond,\n square,\n thinTriangle,\n triangle,\n star,\n arrow,\n wedge,\n stroke,\n wye,\n triangleLeft,\n triangleRight,\n triangleUp,\n triangleDown,\n arrow2Left,\n arrow2Right,\n rect\n];\nexport const builtinSymbolsMap: Record<string, ISymbolClass> = {};\n\nbuiltinSymbols.forEach(symbol => {\n builtinSymbolsMap[symbol.type] = symbol;\n});\n\nexport * from './utils';\n"]}
@@ -1,19 +1,11 @@
1
- import { type IBounds } from '@visactor/vutils';
2
- import type { IContext2d, ICustomPath2D, IGraphicAttribute, ISymbolClass } from '../../interface';
1
+ import type { IBounds } from '@visactor/vutils';
2
+ import type { IContext2d, ICustomPath2D, ISymbolClass } from '../../interface';
3
3
  export declare class CustomSymbolClass implements ISymbolClass {
4
4
  type: string;
5
5
  path: ICustomPath2D;
6
6
  pathStr: string;
7
- isSvg: boolean;
8
- svgCache?: {
9
- path: ICustomPath2D;
10
- attribute: Partial<IGraphicAttribute>;
11
- }[];
12
- constructor(type: string, path: ICustomPath2D | {
13
- path: ICustomPath2D;
14
- attribute: Partial<IGraphicAttribute>;
15
- }[], isSvg?: boolean);
16
- drawOffset(ctx: IContext2d, size: number, x: number, y: number, offset: number, z?: number, cb?: (path: ICustomPath2D, attribute?: Record<string, any>) => void): boolean;
17
- draw(ctx: IContext2d, size: number, x: number, y: number, z?: number, cb?: (path: ICustomPath2D, attribute?: Record<string, any>) => void): boolean;
7
+ constructor(type: string, path: ICustomPath2D);
8
+ drawOffset(ctx: IContext2d, size: number, x: number, y: number, offset: number): boolean;
9
+ draw(ctx: IContext2d, size: number, x: number, y: number): boolean;
18
10
  bounds(size: number, bounds: IBounds): void;
19
11
  }
@@ -1,35 +1,17 @@
1
- import { isArray, AABBBounds } from "@visactor/vutils";
2
-
3
1
  import { renderCommandList } from "../../common/render-command-list";
4
2
 
5
- const tempBounds = new AABBBounds;
6
-
7
3
  export class CustomSymbolClass {
8
- constructor(type, path, isSvg = !1) {
9
- this.pathStr = "", this.type = type, isArray(path) ? this.svgCache = path : this.path = path,
10
- this.isSvg = isSvg;
4
+ constructor(type, path) {
5
+ this.pathStr = "", this.type = type, this.path = path;
11
6
  }
12
- drawOffset(ctx, size, x, y, offset, z, cb) {
13
- return this.isSvg ? !!this.svgCache && (this.svgCache.forEach((item => {
14
- ctx.beginPath(), renderCommandList(item.path.commandList, ctx, x, y, size, size),
15
- cb && cb(item.path, item.attribute);
16
- })), !1) : (renderCommandList(this.path.commandList, ctx, x, y, size + offset, size + offset),
17
- !1);
7
+ drawOffset(ctx, size, x, y, offset) {
8
+ return renderCommandList(this.path.commandList, ctx, x, y, size + offset, size + offset),
9
+ !1;
18
10
  }
19
- draw(ctx, size, x, y, z, cb) {
20
- return this.isSvg ? !!this.svgCache && (this.svgCache.forEach((item => {
21
- ctx.beginPath(), renderCommandList(item.path.commandList, ctx, x, y, size, size),
22
- cb && cb(item.path, item.attribute);
23
- })), !1) : (renderCommandList(this.path.commandList, ctx, x, y, size, size), !1);
11
+ draw(ctx, size, x, y) {
12
+ return renderCommandList(this.path.commandList, ctx, x, y, size, size), !1;
24
13
  }
25
14
  bounds(size, bounds) {
26
- if (this.isSvg) {
27
- if (!this.svgCache) return;
28
- return bounds.clear(), void this.svgCache.forEach((({path: path}) => {
29
- tempBounds.x1 = path.bounds.x1 * size, tempBounds.y1 = path.bounds.y1 * size, tempBounds.x2 = path.bounds.x2 * size,
30
- tempBounds.y2 = path.bounds.y2 * size, bounds.union(tempBounds);
31
- }));
32
- }
33
15
  this.path.bounds && (bounds.x1 = this.path.bounds.x1 * size, bounds.y1 = this.path.bounds.y1 * size,
34
16
  bounds.x2 = this.path.bounds.x2 * size, bounds.y2 = this.path.bounds.y2 * size);
35
17
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/builtin-symbol/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAgB,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAGrE,MAAM,UAAU,GAAG,IAAI,UAAU,EAAE,CAAC;AACpC,MAAM,OAAO,iBAAiB;IAO5B,YACE,IAAY,EACZ,IAAsF,EACtF,QAAiB,KAAK;QAPxB,YAAO,GAAW,EAAE,CAAC;QASnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE;YACjB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;SACtB;aAAM;YACL,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;SAClB;QACD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,UAAU,CACR,GAAe,EACf,IAAY,EACZ,CAAS,EACT,CAAS,EACT,MAAc,EACd,CAAU,EACV,EAAmE;QAEnE,IAAI,IAAI,CAAC,KAAK,EAAE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or/vutils';\nimport { renderCommandList } from '../../common/render-command-list';\nimport type { IContext2d, ICustomPath2D, IGraphicAttribute, ISymbolClass } from '../../interface';\n\nconst tempBounds = new AABBBounds();\nexport class CustomSymbolClass implements ISymbolClass {\n type: string;\n path: ICustomPath2D;\n pathStr: string = '';\n isSvg: boolean;\n svgCache?: { path: ICustomPath2D; attribute: Partial<IGraphicAttribute> }[];\n\n constructor(\n type: string,\n path: ICustomPath2D | { path: ICustomPath2D; attribute: Partial<IGraphicAttribute> }[],\n isSvg: boolean = false\n ) {\n this.type = type;\n if (isArray(path)) {\n this.svgCache = path;\n } else {\n this.path = path;\n }\n this.isSvg = isSvg;\n }\n\n drawOffset(\n ctx: IContext2d,\n size: number,\n x: number,\n y: number,\n offset: number,\n z?: number,\n cb?: (path: ICustomPath2D, attribute?: Record<string, any>) => void\n ) {\n if (this.isSvg) {\n if (!this.svgCache) {\n return false;\n }\n this.svgCache.forEach(item => {\n ctx.beginPath();\n renderCommandList(item.path.commandList, ctx, x, y, size, size);\n cb && cb(item.path, item.attribute);\n });\n return false;\n }\n renderCommandList(this.path.commandList, ctx, x, y, size + offset, size + offset);\n return false;\n }\n\n draw(\n ctx: IContext2d,\n size: number,\n x: number,\n y: number,\n z?: number,\n cb?: (path: ICustomPath2D, attribute?: Record<string, any>) => void\n ) {\n if (this.isSvg) {\n if (!this.svgCache) {\n return false;\n }\n this.svgCache.forEach(item => {\n ctx.beginPath();\n renderCommandList(item.path.commandList, ctx, x, y, size, size);\n cb && cb(item.path, item.attribute);\n });\n return false;\n }\n renderCommandList(this.path.commandList, ctx, x, y, size, size);\n return false;\n }\n\n bounds(size: number, bounds: IBounds) {\n if (this.isSvg) {\n if (!this.svgCache) {\n return;\n }\n bounds.clear();\n this.svgCache.forEach(({ path }) => {\n tempBounds.x1 = path.bounds.x1 * size;\n tempBounds.y1 = path.bounds.y1 * size;\n tempBounds.x2 = path.bounds.x2 * size;\n tempBounds.y2 = path.bounds.y2 * size;\n bounds.union(tempBounds);\n });\n return;\n }\n if (!this.path.bounds) {\n return;\n }\n bounds.x1 = this.path.bounds.x1 * size;\n bounds.y1 = this.path.bounds.y1 * size;\n bounds.x2 = this.path.bounds.x2 * size;\n bounds.y2 = this.path.bounds.y2 * size;\n }\n}\n\n// export function CustomSymbol(): ISymbolClass {\n\n// }\n"]}
1
+ {"version":3,"sources":["../src/graphic/builtin-symbol/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAGrE,MAAM,OAAO,iBAAiB;IAK5B,YAAY,IAAY,EAAE,IAAmB;QAF7C,YAAO,GAAW,EAAE,CAAC;QAGnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,UAAU,CAAC,GAAe,EAAE,IAAY,EAAE,CAAS,EAAE,CAAS,EAAE,MAAc;QAC5E,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,GAAG,MAAM,EAAE,IAAI,GAAG,MAAM,CAAC,CAAC;QAClF,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,CAAC,GAAe,EAAE,IAAY,EAAE,CAAS,EAAE,CAAS;QACtD,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAChE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,CAAC,IAAY,EAAE,MAAe;QAClC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YACrB,OAAO;SACR;QACD,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC;QACvC,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC;QACvC,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC;QACvC,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC;IACzC,CAAC;CACF","file":"utils.js","sourcesContent":["import type { IBounds } from '@visactor/vutils';\nimport { renderCommandList } from '../../common/render-command-list';\nimport type { IContext2d, ICustomPath2D, ISymbolClass } from '../../interface';\n\nexport class CustomSymbolClass implements ISymbolClass {\n type: string;\n path: ICustomPath2D;\n pathStr: string = '';\n\n constructor(type: string, path: ICustomPath2D) {\n this.type = type;\n this.path = path;\n }\n\n drawOffset(ctx: IContext2d, size: number, x: number, y: number, offset: number) {\n renderCommandList(this.path.commandList, ctx, x, y, size + offset, size + offset);\n return false;\n }\n\n draw(ctx: IContext2d, size: number, x: number, y: number) {\n renderCommandList(this.path.commandList, ctx, x, y, size, size);\n return false;\n }\n\n bounds(size: number, bounds: IBounds) {\n if (!this.path.bounds) {\n return;\n }\n bounds.x1 = this.path.bounds.x1 * size;\n bounds.y1 = this.path.bounds.y1 * size;\n bounds.x2 = this.path.bounds.x2 * size;\n bounds.y2 = this.path.bounds.y2 * size;\n }\n}\n\n// export function CustomSymbol(): ISymbolClass {\n\n// }\n"]}
@@ -21,6 +21,7 @@ export const DefaultTransform = {
21
21
  angle: 0,
22
22
  alpha: 0,
23
23
  beta: 0,
24
+ scaleCenter: [ 0, 0 ],
24
25
  anchor: [ 0, 0 ],
25
26
  anchor3d: [ 0, 0 ],
26
27
  postMatrix: new Matrix
@@ -72,8 +73,7 @@ export const DefaultTextStyle = {
72
73
  lineThrough: 0,
73
74
  scaleIn3d: !1,
74
75
  direction: "horizontal",
75
- wordBreak: "break-all",
76
- ignoreBuf: !1
76
+ wordBreak: "break-all"
77
77
  };
78
78
 
79
79
  export const DefaultStyle = Object.assign(Object.assign(Object.assign({
@@ -85,8 +85,7 @@ export const DefaultStyle = Object.assign(Object.assign(Object.assign({
85
85
  texturePadding: 2,
86
86
  backgroundMode: 0,
87
87
  blur: 0,
88
- cursor: null,
89
- html: null
88
+ cursor: null
90
89
  }, DefaultFillStyle), DefaultStrokeStyle), DefaultLayout);
91
90
 
92
91
  export const DefaultConnectAttribute = {
@@ -173,7 +172,8 @@ export const DefaultLineAttribute = Object.assign(Object.assign(Object.assign({}
173
172
  segments: [],
174
173
  curveType: "linear",
175
174
  clipRange: 1,
176
- clipRangeByDimension: "default"
175
+ clipRangeByDimension: "default",
176
+ closePath: !1
177
177
  });
178
178
 
179
179
  export const DefaultPathAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
@@ -235,8 +235,7 @@ export const DefaultImageAttribute = Object.assign(Object.assign({
235
235
  width: 0,
236
236
  height: 0
237
237
  }, DefaultAttribute), {
238
- fill: !0,
239
- cornerRadius: 0
238
+ fill: !0
240
239
  });
241
240
 
242
241
  export const DefaultRichTextIconAttribute = Object.assign(Object.assign({}, DefaultImageAttribute), {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AA+BvD,MAAM,CAAC,MAAM,aAAa,GAAY;IACpC,SAAS,EAAE,MAAM;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAe;IAC1C,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;IACR,KA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EF,MAAM,CAAC,MAAM,qBAAqB,iCAChC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,EAAE,EACT,KAAK,EAAE,CAAC,EACR,MAAM,EAAE,CAAC,IACN,gBAAgB,KACnB,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,CAAC,GAChB,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,mCACpC,qBAAqB,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,GACX,CAAC","file":"config.js","sourcesContent":["// 存放公共属性\nimport { 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} 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 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};\n\nexport const DefaultStyle: IGraphicStyle = {\n opacity: 1,\n background: null,\n texture: null,\n textureColor: 'black',\n textureSize: 10,\n texturePadding: 2,\n backgroundMode: 0,\n blur: 0,\n cursor: null,\n html: null,\n ...DefaultFillStyle,\n ...DefaultStrokeStyle,\n ...DefaultLayout\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 DefaultAttribute: Required<IGraphicAttribute> = {\n strokeSeg: null,\n pickable: true,\n childrenPickable: true,\n visible: true,\n zIndex: 0,\n layout: null,\n boundsPadding: 0,\n pickMode: 'accurate',\n customPickShape: null,\n boundsMode: 'accurate',\n keepDirIn3d: true,\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 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};\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};\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};\n\nexport const DefaultPathAttribute: Required<IPathGraphicAttribute> = {\n ...DefaultAttribute,\n path: new CustomPath2D(),\n customPath: () => {\n console.warn('空函数');\n }\n};\n\nexport const DefaultPolygonAttribute: Required<IPolygonGraphicAttribute> = {\n ...DefaultAttribute,\n points: [],\n cornerRadius: 0\n};\n\nexport const DefaultRectAttribute: Required<IRectGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n strokeBoundsBuffer: 0,\n cornerRadius: 0\n};\n\nexport const DefaultRect3dAttribute: Required<IRect3dGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 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 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 maxHeight: undefined,\n maxWidth: undefined,\n singleLine: false\n};\n\nexport const DefaultImageAttribute: Required<IImageGraphicAttribute> = {\n repeatX: 'no-repeat',\n repeatY: 'no-repeat',\n image: '',\n width: 0,\n height: 0,\n ...DefaultAttribute,\n fill: true,\n cornerRadius: 0\n};\n\nexport const DefaultRichTextIconAttribute: Required<IRichTextIconGraphicAttribute> = {\n ...DefaultImageAttribute,\n backgroundShowMode: 'never',\n backgroundWidth: 0,\n backgroundHeight: 0,\n textAlign: 'left',\n textBaseline: 'middle',\n direction: 'horizontal',\n margin: 0,\n id: '',\n\n width: 20,\n height: 20,\n backgroundFill: 'rgba(101, 117, 168, 0.1)',\n backgroundFillOpacity: 1,\n backgroundStroke: false,\n backgroundStrokeOpacity: 1,\n backgroundRadius: 4,\n opacity: 1\n};\n"]}
1
+ {"version":3,"sources":["../src/graphic/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AA+BvD,MAAM,CAAC,MAAM,aAAa,GAAY;IACpC,SAAS,EAAE,MAAM;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAe;IAC1C,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;I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OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,EAAE,EACT,KAAK,EAAE,CAAC,EACR,MAAM,EAAE,CAAC,IACN,gBAAgB,KACnB,IAAI,EAAE,IAAI,GACX,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,mCACpC,qBAAqB,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,GACX,CAAC","file":"config.js","sourcesContent":["// 存放公共属性\nimport { 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} 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};\n\nexport const DefaultStyle: IGraphicStyle = {\n opacity: 1,\n background: null,\n texture: null,\n textureColor: 'black',\n textureSize: 10,\n texturePadding: 2,\n backgroundMode: 0,\n blur: 0,\n cursor: null,\n ...DefaultFillStyle,\n ...DefaultStrokeStyle,\n ...DefaultLayout\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 DefaultAttribute: Required<IGraphicAttribute> = {\n strokeSeg: null,\n pickable: true,\n childrenPickable: true,\n visible: true,\n zIndex: 0,\n layout: null,\n boundsPadding: 0,\n pickMode: 'accurate',\n customPickShape: null,\n boundsMode: 'accurate',\n keepDirIn3d: true,\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 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};\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};\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 console.warn('空函数');\n }\n};\n\nexport const DefaultPolygonAttribute: Required<IPolygonGraphicAttribute> = {\n ...DefaultAttribute,\n points: [],\n cornerRadius: 0\n};\n\nexport const DefaultRectAttribute: Required<IRectGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n strokeBoundsBuffer: 0,\n cornerRadius: 0\n};\n\nexport const DefaultRect3dAttribute: Required<IRect3dGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 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 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 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};\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"]}
@@ -16,25 +16,3 @@ export declare const SYMBOL_NUMBER_TYPE: number;
16
16
  export declare const TEXT_NUMBER_TYPE: number;
17
17
  export declare const GraphicService: unique symbol;
18
18
  export declare const GraphicCreator: unique symbol;
19
- export declare const SVG_ATTRIBUTE_MAP: {
20
- 'stroke-linecap': string;
21
- 'stroke-linejoin': string;
22
- 'stroke-dasharray': string;
23
- 'stroke-dashoffset': string;
24
- 'stroke-width': string;
25
- 'fill-opacity': string;
26
- 'stroke-opacity': string;
27
- };
28
- export declare const SVG_ATTRIBUTE_MAP_KEYS: string[];
29
- export declare const SVG_PARSE_ATTRIBUTE_MAP: {
30
- '@_stroke-linecap': string;
31
- '@_stroke-linejoin': string;
32
- '@_stroke-dasharray': string;
33
- '@_stroke-dashoffset': string;
34
- '@_stroke-width': string;
35
- '@_fill-opacity': string;
36
- '@_stroke-opacity': string;
37
- '@_stroke': string;
38
- '@_fill': string;
39
- };
40
- export declare const SVG_PARSE_ATTRIBUTE_MAP_KEYS: string[];
@@ -35,30 +35,4 @@ export const TEXT_NUMBER_TYPE = genNumberType();
35
35
  export const GraphicService = Symbol.for("GraphicService");
36
36
 
37
37
  export const GraphicCreator = Symbol.for("GraphicCreator");
38
-
39
- export const SVG_ATTRIBUTE_MAP = {
40
- "stroke-linecap": "lineCap",
41
- "stroke-linejoin": "lineJoin",
42
- "stroke-dasharray": "lineDash",
43
- "stroke-dashoffset": "lineDashOffset",
44
- "stroke-width": "lineWidth",
45
- "fill-opacity": "fillOpacity",
46
- "stroke-opacity": "strokeOpacity"
47
- };
48
-
49
- export const SVG_ATTRIBUTE_MAP_KEYS = Object.keys(SVG_ATTRIBUTE_MAP);
50
-
51
- export const SVG_PARSE_ATTRIBUTE_MAP = {
52
- "@_stroke-linecap": "lineCap",
53
- "@_stroke-linejoin": "lineJoin",
54
- "@_stroke-dasharray": "lineDash",
55
- "@_stroke-dashoffset": "lineDashOffset",
56
- "@_stroke-width": "lineWidth",
57
- "@_fill-opacity": "fillOpacity",
58
- "@_stroke-opacity": "strokeOpacity",
59
- "@_stroke": "stroke",
60
- "@_fill": "fill"
61
- };
62
-
63
- export const SVG_PARSE_ATTRIBUTE_MAP_KEYS = Object.keys(SVG_PARSE_ATTRIBUTE_MAP);
64
38
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,EAAE,CAAC;AAC/C,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,EAAE,CAAC;AACjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,EAAE,CAAC;AAChD,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,EAAE,CAAC;AAClD,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,EAAE,CAAC;AACjD,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,EAAE,CAAC;AACjD,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,EAAE,CAAC;AACjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,EAAE,CAAC;AA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AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC","file":"constants.js","sourcesContent":["import { genNumberType } from './tools';\n\nexport const ARC_NUMBER_TYPE = genNumberType();\nexport const ARC3D_NUMBER_TYPE = genNumberType();\nexport const AREA_NUMBER_TYPE = genNumberType();\nexport const CIRCLE_NUMBER_TYPE = genNumberType();\nexport const GLYPH_NUMBER_TYPE = genNumberType();\nexport const GROUP_NUMBER_TYPE = genNumberType();\nexport const IMAGE_NUMBER_TYPE = genNumberType();\nexport const LINE_NUMBER_TYPE = genNumberType();\nexport const PATH_NUMBER_TYPE = genNumberType();\nexport const POLYGON_NUMBER_TYPE = genNumberType();\nexport const PYRAMID3D_NUMBER_TYPE = genNumberType();\nexport const RECT_NUMBER_TYPE = genNumberType();\nexport const RECT3D_NUMBER_TYPE = genNumberType();\nexport const RICHTEXT_NUMBER_TYPE = genNumberType();\nexport const SYMBOL_NUMBER_TYPE = genNumberType();\nexport const TEXT_NUMBER_TYPE = genNumberType();\n\nexport const GraphicService = Symbol.for('GraphicService');\nexport const GraphicCreator = Symbol.for('GraphicCreator');\n\nexport const SVG_ATTRIBUTE_MAP = {\n 'stroke-linecap': 'lineCap',\n 'stroke-linejoin': 'lineJoin',\n 'stroke-dasharray': 'lineDash',\n 'stroke-dashoffset': 'lineDashOffset',\n 'stroke-width': 'lineWidth',\n 'fill-opacity': 'fillOpacity',\n 'stroke-opacity': 'strokeOpacity'\n};\n\nexport const SVG_ATTRIBUTE_MAP_KEYS = Object.keys(SVG_ATTRIBUTE_MAP);\n\nexport const SVG_PARSE_ATTRIBUTE_MAP = {\n '@_stroke-linecap': 'lineCap',\n '@_stroke-linejoin': 'lineJoin',\n '@_stroke-dasharray': 'lineDash',\n '@_stroke-dashoffset': 'lineDashOffset',\n '@_stroke-width': 'lineWidth',\n '@_fill-opacity': 'fillOpacity',\n '@_stroke-opacity': 'strokeOpacity',\n '@_stroke': 'stroke',\n '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AAG,CAAC,gBAAgB,CAAC,CAAC","file":"constants.js","sourcesContent":["import { genNumberType } from './tools';\n\nexport const ARC_NUMBER_TYPE = genNumberType();\nexport const ARC3D_NUMBER_TYPE = genNumberType();\nexport const AREA_NUMBER_TYPE = genNumberType();\nexport const CIRCLE_NUMBER_TYPE = genNumberType();\nexport const GLYPH_NUMBER_TYPE = genNumberType();\nexport const GROUP_NUMBER_TYPE = genNumberType();\nexport const IMAGE_NUMBER_TYPE = genNumberType();\nexport const LINE_NUMBER_TYPE = genNumberType();\nexport const PATH_NUMBER_TYPE = genNumberType();\nexport const POLYGON_NUMBER_TYPE = genNumberType();\nexport const PYRAMID3D_NUMBER_TYPE = genNumberType();\nexport const RECT_NUMBER_TYPE = genNumberType();\nexport const RECT3D_NUMBER_TYPE = genNumberType();\nexport const RICHTEXT_NUMBER_TYPE = genNumberType();\nexport const SYMBOL_NUMBER_TYPE = genNumberType();\nexport const TEXT_NUMBER_TYPE = genNumberType();\n\nexport const GraphicService = Symbol.for('GraphicService');\nexport const GraphicCreator = Symbol.for('GraphicCreator');\n"]}
@@ -114,9 +114,6 @@ export declare abstract class Graphic<T extends Partial<IGraphicAttribute> = Par
114
114
  addUpdateGlobalPositionTag(): void;
115
115
  protected clearUpdateLocalPositionTag(): void;
116
116
  protected clearUpdateGlobalPositionTag(): void;
117
- addUpdateLayoutTag(): void;
118
- protected clearUpdateLayoutTag(): void;
119
- protected needUpdateLayout(): boolean;
120
117
  protected doUpdateLocalMatrix(): void;
121
118
  protected doUpdateGlobalMatrix(): void;
122
119
  setStage(stage?: IStage, layer?: ILayer): void;
@@ -80,7 +80,7 @@ export class Graphic extends Node {
80
80
  if (!this.valid) return this._AABBBounds.clear(), this._AABBBounds;
81
81
  application.graphicService.beforeUpdateAABBBounds(this, this.stage, !0, this._AABBBounds);
82
82
  const bounds = this.doUpdateAABBBounds(full);
83
- return this.addUpdateLayoutTag(), application.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, !0),
83
+ return application.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, !0),
84
84
  bounds;
85
85
  }
86
86
  combindShadowAABBBounds(bounds) {
@@ -156,7 +156,7 @@ export class Graphic extends Node {
156
156
  this.attribute[key] = params[key];
157
157
  }
158
158
  this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTags(keys) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(),
159
- this.addUpdatePositionTag(), this.addUpdateLayoutTag(), this.onAttributeUpdate(context);
159
+ this.addUpdatePositionTag(), this.onAttributeUpdate(context);
160
160
  }
161
161
  setAttribute(key, value, forceUpdateTag, context) {
162
162
  var _a;
@@ -165,7 +165,7 @@ export class Graphic extends Node {
165
165
  }, this.attribute, key, context);
166
166
  params ? this._setAttributes(params, forceUpdateTag, context) : isNil(null === (_a = this.normalAttrs) || void 0 === _a ? void 0 : _a[key]) ? (this.attribute[key] = value,
167
167
  this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTag(key) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(),
168
- this.addUpdatePositionTag(), this.addUpdateLayoutTag(), this.onAttributeUpdate(context)) : this.normalAttrs[key] = value,
168
+ this.addUpdatePositionTag(), this.onAttributeUpdate(context)) : this.normalAttrs[key] = value,
169
169
  "background" === key && this.loadImage(value, !0);
170
170
  }
171
171
  needUpdateTags(keys) {
@@ -202,8 +202,8 @@ export class Graphic extends Node {
202
202
  const attribute = this.attribute, postMatrix = attribute.postMatrix;
203
203
  return postMatrix ? application.transformUtil.fromMatrix(postMatrix, postMatrix).translate(x, y) : (attribute.x = (null !== (_a = attribute.x) && void 0 !== _a ? _a : DefaultTransform.x) + x,
204
204
  attribute.y = (null !== (_b = attribute.y) && void 0 !== _b ? _b : DefaultTransform.y) + y),
205
- this.addUpdatePositionTag(), this.addUpdateBoundTag(), this.addUpdateLayoutTag(),
206
- this.onAttributeUpdate(context), this;
205
+ this.addUpdatePositionTag(), this.addUpdateBoundTag(), this.onAttributeUpdate(context),
206
+ this;
207
207
  }
208
208
  translateTo(x, y) {
209
209
  const attribute = this.attribute;
@@ -215,8 +215,8 @@ export class Graphic extends Node {
215
215
  y: y
216
216
  }, this.attribute, tempConstantXYKey, context);
217
217
  return params ? (this._setAttributes(params, !1, context), this) : (attribute.x = x,
218
- attribute.y = y, this.addUpdatePositionTag(), this.addUpdateBoundTag(), this.addUpdateLayoutTag(),
219
- this.onAttributeUpdate(context), this);
218
+ attribute.y = y, this.addUpdatePositionTag(), this.addUpdateBoundTag(), this.onAttributeUpdate(context),
219
+ this);
220
220
  }
221
221
  scale(scaleX, scaleY, scaleCenter) {
222
222
  var _a, _b;
@@ -236,8 +236,8 @@ export class Graphic extends Node {
236
236
  postMatrix || (postMatrix = new Matrix, attribute.postMatrix = postMatrix), application.transformUtil.fromMatrix(postMatrix, postMatrix).scale(scaleX, scaleY, scaleCenter);
237
237
  } else attribute.scaleX = (null !== (_a = attribute.scaleX) && void 0 !== _a ? _a : DefaultTransform.scaleX) * scaleX,
238
238
  attribute.scaleY = (null !== (_b = attribute.scaleY) && void 0 !== _b ? _b : DefaultTransform.scaleY) * scaleY;
239
- return this.addUpdatePositionTag(), this.addUpdateBoundTag(), this.addUpdateLayoutTag(),
240
- this.onAttributeUpdate(context), this;
239
+ return this.addUpdatePositionTag(), this.addUpdateBoundTag(), this.onAttributeUpdate(context),
240
+ this;
241
241
  }
242
242
  scaleTo(scaleX, scaleY) {
243
243
  const attribute = this.attribute;
@@ -250,7 +250,7 @@ export class Graphic extends Node {
250
250
  }, this.attribute, tempConstantScaleXYKey, context);
251
251
  return params ? (this._setAttributes(params, !1, context), this) : (attribute.scaleX = scaleX,
252
252
  attribute.scaleY = scaleY, this.addUpdatePositionTag(), this.addUpdateBoundTag(),
253
- this.addUpdateLayoutTag(), this.onAttributeUpdate(context), this);
253
+ this.onAttributeUpdate(context), this);
254
254
  }
255
255
  rotate(angle) {
256
256
  var _a;
@@ -261,8 +261,8 @@ export class Graphic extends Node {
261
261
  if (params) return this._setAttributes(params, !1, context), this;
262
262
  const attribute = this.attribute;
263
263
  return attribute.angle = (null !== (_a = attribute.angle) && void 0 !== _a ? _a : DefaultTransform.angle) + angle,
264
- this.addUpdatePositionTag(), this.addUpdateBoundTag(), this.addUpdateLayoutTag(),
265
- this.onAttributeUpdate(context), this;
264
+ this.addUpdatePositionTag(), this.addUpdateBoundTag(), this.onAttributeUpdate(context),
265
+ this;
266
266
  }
267
267
  rotateTo(angle) {
268
268
  const attribute = this.attribute;
@@ -271,8 +271,8 @@ export class Graphic extends Node {
271
271
  type: AttributeUpdateType.ROTATE_TO
272
272
  }, params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(angle, this.attribute, tempConstantAngleKey, context);
273
273
  return params ? (this._setAttributes(params, !1, context), this) : (attribute.angle = angle,
274
- this.addUpdatePositionTag(), this.addUpdateBoundTag(), this.addUpdateLayoutTag(),
275
- this.onAttributeUpdate(context), this);
274
+ this.addUpdatePositionTag(), this.addUpdateBoundTag(), this.onAttributeUpdate(context),
275
+ this);
276
276
  }
277
277
  skewTo(b, c) {
278
278
  return this;
@@ -398,17 +398,8 @@ export class Graphic extends Node {
398
398
  clearUpdateGlobalPositionTag() {
399
399
  this._updateTag &= UpdateTag.CLEAR_GLOBAL_MATRIX;
400
400
  }
401
- addUpdateLayoutTag() {
402
- this._updateTag |= UpdateTag.UPDATE_LAYOUT;
403
- }
404
- clearUpdateLayoutTag() {
405
- this._updateTag &= UpdateTag.CLEAR_LAYOUT;
406
- }
407
- needUpdateLayout() {
408
- return !!(this._updateTag & UpdateTag.UPDATE_LAYOUT);
409
- }
410
401
  doUpdateLocalMatrix() {
411
- const {x: x = DefaultTransform.x, y: y = DefaultTransform.y, scaleX: scaleX = DefaultTransform.scaleX, scaleY: scaleY = DefaultTransform.scaleY, angle: angle = DefaultTransform.angle, anchor: anchor, postMatrix: postMatrix} = this.attribute, _anchor = [ 0, 0 ];
402
+ const {x: x = DefaultTransform.x, y: y = DefaultTransform.y, scaleX: scaleX = DefaultTransform.scaleX, scaleY: scaleY = DefaultTransform.scaleY, angle: angle = DefaultTransform.angle, scaleCenter: scaleCenter, anchor: anchor, postMatrix: postMatrix} = this.attribute, _anchor = [ 0, 0 ];
412
403
  if (anchor) {
413
404
  if ("string" == typeof anchor[0]) {
414
405
  const ratio = parseFloat(anchor[0]) / 100, bounds = this.AABBBounds;
@@ -419,7 +410,14 @@ export class Graphic extends Node {
419
410
  _anchor[1] = bounds.x1 + (bounds.x2 - bounds.x1) * ratio;
420
411
  } else _anchor[1] = anchor[1];
421
412
  }
422
- normalTransform(this._transMatrix, this._transMatrix.reset(), x, y, scaleX, scaleY, angle, anchor && _anchor);
413
+ if (!scaleCenter || 1 === scaleX && 1 === scaleY) normalTransform(this._transMatrix, this._transMatrix.reset(), x, y, scaleX, scaleY, angle, anchor && _anchor); else {
414
+ const m = this._transMatrix;
415
+ m.reset(), m.translate(_anchor[0], _anchor[1]), m.rotate(angle), m.translate(-_anchor[0], -_anchor[1]),
416
+ m.translate(x, y), application.transformUtil.fromMatrix(m, m).scale(scaleX, scaleY, {
417
+ x: scaleCenter[0],
418
+ y: scaleCenter[1]
419
+ });
420
+ }
423
421
  const p = this.getOffsetXY(DefaultTransform);
424
422
  if (this._transMatrix.e += p.x, this._transMatrix.f += p.y, postMatrix) {
425
423
  const m1 = tempMatrix.setValue(postMatrix.a, postMatrix.b, postMatrix.c, postMatrix.d, postMatrix.e, postMatrix.f), m2 = this._transMatrix;
@@ -434,16 +432,8 @@ export class Graphic extends Node {
434
432
  }
435
433
  }
436
434
  setStage(stage, layer) {
437
- if (this.stage !== stage) {
438
- if (this.stage = stage, this.layer = layer, this.setStageToShadowRoot(stage, layer),
439
- this.animates && this.animates.size) {
440
- const timeline = stage.getTimeline();
441
- this.animates.forEach((a => {
442
- a.setTimeline(timeline);
443
- }));
444
- }
445
- this._onSetStage && this._onSetStage(this, stage, layer), application.graphicService.onSetStage(this, stage);
446
- }
435
+ this.stage !== stage && (this.stage = stage, this.layer = layer, this.setStageToShadowRoot(stage, layer),
436
+ this._onSetStage && this._onSetStage(this, stage, layer), application.graphicService.onSetStage(this, stage));
447
437
  }
448
438
  setStageToShadowRoot(stage, layer) {
449
439
  this.shadowRoot && this.shadowRoot.setStage(stage, layer);
@@ -541,7 +531,7 @@ export class Graphic extends Node {
541
531
  this.pathProxy;
542
532
  }
543
533
  loadImage(image, background = !1) {
544
- if (!image || background && backgroundNotImage(image)) return;
534
+ if (!image) return;
545
535
  const url = image;
546
536
  this.resources || (this.resources = new Map);
547
537
  const cache = {
@@ -588,9 +578,5 @@ export class Graphic extends Node {
588
578
  }
589
579
  }
590
580
 
591
- function backgroundNotImage(image) {
592
- return !(!image.fill && !image.stroke);
593
- }
594
-
595
581
  Graphic.mixin(EventTarget);
596
582
  //# sourceMappingURL=graphic.js.map