dcim-topology2d 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (512) hide show
  1. package/activity-diagram/index.d.ts +5 -0
  2. package/activity-diagram/index.js +6 -0
  3. package/activity-diagram/index.js.map +1 -0
  4. package/activity-diagram/src/final/final.d.ts +2 -0
  5. package/activity-diagram/src/final/final.js +10 -0
  6. package/activity-diagram/src/final/final.js.map +1 -0
  7. package/activity-diagram/src/final/final.rect.d.ts +3 -0
  8. package/activity-diagram/src/final/final.rect.js +11 -0
  9. package/activity-diagram/src/final/final.rect.js.map +1 -0
  10. package/activity-diagram/src/final/index.d.ts +2 -0
  11. package/activity-diagram/src/final/index.js +3 -0
  12. package/activity-diagram/src/final/index.js.map +1 -0
  13. package/activity-diagram/src/fork/fork.anchor.d.ts +3 -0
  14. package/activity-diagram/src/fork/fork.anchor.js +28 -0
  15. package/activity-diagram/src/fork/fork.anchor.js.map +1 -0
  16. package/activity-diagram/src/fork/fork.d.ts +2 -0
  17. package/activity-diagram/src/fork/fork.js +25 -0
  18. package/activity-diagram/src/fork/fork.js.map +1 -0
  19. package/activity-diagram/src/fork/fork.rect.d.ts +3 -0
  20. package/activity-diagram/src/fork/fork.rect.js +9 -0
  21. package/activity-diagram/src/fork/fork.rect.js.map +1 -0
  22. package/activity-diagram/src/fork/index.d.ts +3 -0
  23. package/activity-diagram/src/fork/index.js +4 -0
  24. package/activity-diagram/src/fork/index.js.map +1 -0
  25. package/activity-diagram/src/register.d.ts +1 -0
  26. package/activity-diagram/src/register.js +13 -0
  27. package/activity-diagram/src/register.js.map +1 -0
  28. package/activity-diagram/src/swimlaneH/index.d.ts +2 -0
  29. package/activity-diagram/src/swimlaneH/index.js +3 -0
  30. package/activity-diagram/src/swimlaneH/index.js.map +1 -0
  31. package/activity-diagram/src/swimlaneH/swimlaneH.d.ts +2 -0
  32. package/activity-diagram/src/swimlaneH/swimlaneH.js +27 -0
  33. package/activity-diagram/src/swimlaneH/swimlaneH.js.map +1 -0
  34. package/activity-diagram/src/swimlaneH/swimlaneH.rect.d.ts +3 -0
  35. package/activity-diagram/src/swimlaneH/swimlaneH.rect.js +9 -0
  36. package/activity-diagram/src/swimlaneH/swimlaneH.rect.js.map +1 -0
  37. package/activity-diagram/src/swimlaneV/index.d.ts +2 -0
  38. package/activity-diagram/src/swimlaneV/index.js +3 -0
  39. package/activity-diagram/src/swimlaneV/index.js.map +1 -0
  40. package/activity-diagram/src/swimlaneV/swimlaneV.d.ts +2 -0
  41. package/activity-diagram/src/swimlaneV/swimlaneV.js +27 -0
  42. package/activity-diagram/src/swimlaneV/swimlaneV.js.map +1 -0
  43. package/activity-diagram/src/swimlaneV/swimlaneV.rect.d.ts +3 -0
  44. package/activity-diagram/src/swimlaneV/swimlaneV.rect.js +9 -0
  45. package/activity-diagram/src/swimlaneV/swimlaneV.rect.js.map +1 -0
  46. package/chart-diagram/index.d.ts +3 -0
  47. package/chart-diagram/index.js +4 -0
  48. package/chart-diagram/index.js.map +1 -0
  49. package/chart-diagram/src/echarts/echarts.min.js +22 -0
  50. package/chart-diagram/src/echarts/index.d.ts +4 -0
  51. package/chart-diagram/src/echarts/index.js +104 -0
  52. package/chart-diagram/src/echarts/index.js.map +1 -0
  53. package/chart-diagram/src/register.d.ts +1 -0
  54. package/chart-diagram/src/register.js +12 -0
  55. package/chart-diagram/src/register.js.map +1 -0
  56. package/class-diagram/index.d.ts +2 -0
  57. package/class-diagram/index.js +3 -0
  58. package/class-diagram/index.js.map +1 -0
  59. package/class-diagram/src/class/class.d.ts +3 -0
  60. package/class-diagram/src/class/class.js +56 -0
  61. package/class-diagram/src/class/class.js.map +1 -0
  62. package/class-diagram/src/class/class.rect.d.ts +5 -0
  63. package/class-diagram/src/class/class.rect.js +16 -0
  64. package/class-diagram/src/class/class.rect.js.map +1 -0
  65. package/class-diagram/src/class/index.d.ts +2 -0
  66. package/class-diagram/src/class/index.js +3 -0
  67. package/class-diagram/src/class/index.js.map +1 -0
  68. package/class-diagram/src/register.d.ts +1 -0
  69. package/class-diagram/src/register.js +7 -0
  70. package/class-diagram/src/register.js.map +1 -0
  71. package/core/index.d.ts +8 -0
  72. package/core/index.js +26 -0
  73. package/core/index.js.map +1 -0
  74. package/core/src/activeLayer.d.ts +55 -0
  75. package/core/src/activeLayer.js +679 -0
  76. package/core/src/activeLayer.js.map +1 -0
  77. package/core/src/animateLayer.d.ts +23 -0
  78. package/core/src/animateLayer.js +227 -0
  79. package/core/src/animateLayer.js.map +1 -0
  80. package/core/src/calling.d.ts +37 -0
  81. package/core/src/calling.js +253 -0
  82. package/core/src/canvas.d.ts +19 -0
  83. package/core/src/canvas.js +81 -0
  84. package/core/src/canvas.js.map +1 -0
  85. package/core/src/common.d.ts +102 -0
  86. package/core/src/common.js +1254 -0
  87. package/core/src/core.d.ts +104 -0
  88. package/core/src/core.js +2281 -0
  89. package/core/src/core.js.map +1 -0
  90. package/core/src/divLayer.d.ts +61 -0
  91. package/core/src/divLayer.js +485 -0
  92. package/core/src/divLayer.js.map +1 -0
  93. package/core/src/healps/changeData.d.ts +8 -0
  94. package/core/src/healps/changeData.js +205 -0
  95. package/core/src/healps/index.d.ts +1 -0
  96. package/core/src/healps/index.js +1 -0
  97. package/core/src/hoverLayer.d.ts +32 -0
  98. package/core/src/hoverLayer.js +199 -0
  99. package/core/src/hoverLayer.js.map +1 -0
  100. package/core/src/layer.d.ts +5 -0
  101. package/core/src/layer.js +11 -0
  102. package/core/src/layer.js.map +1 -0
  103. package/core/src/middles/arrows/circle.d.ts +3 -0
  104. package/core/src/middles/arrows/circle.js +20 -0
  105. package/core/src/middles/arrows/circle.js.map +1 -0
  106. package/core/src/middles/arrows/diamond.d.ts +3 -0
  107. package/core/src/middles/arrows/diamond.js +28 -0
  108. package/core/src/middles/arrows/diamond.js.map +1 -0
  109. package/core/src/middles/arrows/line.d.ts +4 -0
  110. package/core/src/middles/arrows/line.js +42 -0
  111. package/core/src/middles/arrows/line.js.map +1 -0
  112. package/core/src/middles/arrows/triangle.d.ts +3 -0
  113. package/core/src/middles/arrows/triangle.js +25 -0
  114. package/core/src/middles/arrows/triangle.js.map +1 -0
  115. package/core/src/middles/default.anchor.d.ts +2 -0
  116. package/core/src/middles/default.anchor.js +9 -0
  117. package/core/src/middles/default.anchor.js.map +1 -0
  118. package/core/src/middles/default.d.ts +12 -0
  119. package/core/src/middles/default.js +257 -0
  120. package/core/src/middles/default.js.map +1 -0
  121. package/core/src/middles/default.rect.d.ts +3 -0
  122. package/core/src/middles/default.rect.js +19 -0
  123. package/core/src/middles/default.rect.js.map +1 -0
  124. package/core/src/middles/index.d.ts +3 -0
  125. package/core/src/middles/index.js +4 -0
  126. package/core/src/middles/index.js.map +1 -0
  127. package/core/src/middles/lines/curve.d.ts +10 -0
  128. package/core/src/middles/lines/curve.js +127 -0
  129. package/core/src/middles/lines/curve.js.map +1 -0
  130. package/core/src/middles/lines/line.d.ts +4 -0
  131. package/core/src/middles/lines/line.js +11 -0
  132. package/core/src/middles/lines/line.js.map +1 -0
  133. package/core/src/middles/lines/mind.d.ts +6 -0
  134. package/core/src/middles/lines/mind.js +90 -0
  135. package/core/src/middles/lines/mind.js.map +1 -0
  136. package/core/src/middles/lines/polyline.d.ts +7 -0
  137. package/core/src/middles/lines/polyline.js +309 -0
  138. package/core/src/middles/lines/polyline.js.map +1 -0
  139. package/core/src/middles/nodes/arbitrarygraph.anchor.d.ts +2 -0
  140. package/core/src/middles/nodes/arbitrarygraph.anchor.js +18 -0
  141. package/core/src/middles/nodes/arbitrarygraph.d.ts +2 -0
  142. package/core/src/middles/nodes/arbitrarygraph.js +17 -0
  143. package/core/src/middles/nodes/arrow.anchor.d.ts +2 -0
  144. package/core/src/middles/nodes/arrow.anchor.js +7 -0
  145. package/core/src/middles/nodes/arrow.anchor.js.map +1 -0
  146. package/core/src/middles/nodes/arrow.d.ts +4 -0
  147. package/core/src/middles/nodes/arrow.js +44 -0
  148. package/core/src/middles/nodes/arrow.js.map +1 -0
  149. package/core/src/middles/nodes/arrow.rect.d.ts +7 -0
  150. package/core/src/middles/nodes/arrow.rect.js +23 -0
  151. package/core/src/middles/nodes/arrow.rect.js.map +1 -0
  152. package/core/src/middles/nodes/circle.anchor.d.ts +2 -0
  153. package/core/src/middles/nodes/circle.anchor.js +18 -0
  154. package/core/src/middles/nodes/circle.anchor.js.map +1 -0
  155. package/core/src/middles/nodes/circle.d.ts +2 -0
  156. package/core/src/middles/nodes/circle.js +7 -0
  157. package/core/src/middles/nodes/circle.js.map +1 -0
  158. package/core/src/middles/nodes/circle.rect.d.ts +3 -0
  159. package/core/src/middles/nodes/circle.rect.js +27 -0
  160. package/core/src/middles/nodes/circle.rect.js.map +1 -0
  161. package/core/src/middles/nodes/cloud.anchor.d.ts +2 -0
  162. package/core/src/middles/nodes/cloud.anchor.js +9 -0
  163. package/core/src/middles/nodes/cloud.anchor.js.map +1 -0
  164. package/core/src/middles/nodes/cloud.d.ts +2 -0
  165. package/core/src/middles/nodes/cloud.js +11 -0
  166. package/core/src/middles/nodes/cloud.js.map +1 -0
  167. package/core/src/middles/nodes/cloud.rect.d.ts +3 -0
  168. package/core/src/middles/nodes/cloud.rect.js +9 -0
  169. package/core/src/middles/nodes/cloud.rect.js.map +1 -0
  170. package/core/src/middles/nodes/cube.anchor.d.ts +2 -0
  171. package/core/src/middles/nodes/cube.anchor.js +10 -0
  172. package/core/src/middles/nodes/cube.anchor.js.map +1 -0
  173. package/core/src/middles/nodes/cube.d.ts +2 -0
  174. package/core/src/middles/nodes/cube.js +5 -0
  175. package/core/src/middles/nodes/cube.js.map +1 -0
  176. package/core/src/middles/nodes/cube.model.d.ts +14 -0
  177. package/core/src/middles/nodes/cube.model.js +64 -0
  178. package/core/src/middles/nodes/cube.model.js.map +1 -0
  179. package/core/src/middles/nodes/cube.rect.d.ts +3 -0
  180. package/core/src/middles/nodes/cube.rect.js +11 -0
  181. package/core/src/middles/nodes/cube.rect.js.map +1 -0
  182. package/core/src/middles/nodes/diamond.d.ts +2 -0
  183. package/core/src/middles/nodes/diamond.js +11 -0
  184. package/core/src/middles/nodes/diamond.js.map +1 -0
  185. package/core/src/middles/nodes/diamond.rect.d.ts +3 -0
  186. package/core/src/middles/nodes/diamond.rect.js +27 -0
  187. package/core/src/middles/nodes/diamond.rect.js.map +1 -0
  188. package/core/src/middles/nodes/file.d.ts +2 -0
  189. package/core/src/middles/nodes/file.js +16 -0
  190. package/core/src/middles/nodes/file.js.map +1 -0
  191. package/core/src/middles/nodes/formtable.d.ts +2 -0
  192. package/core/src/middles/nodes/formtable.js +100 -0
  193. package/core/src/middles/nodes/hexagon.anchor.d.ts +2 -0
  194. package/core/src/middles/nodes/hexagon.anchor.js +21 -0
  195. package/core/src/middles/nodes/hexagon.anchor.js.map +1 -0
  196. package/core/src/middles/nodes/hexagon.d.ts +2 -0
  197. package/core/src/middles/nodes/hexagon.js +14 -0
  198. package/core/src/middles/nodes/hexagon.js.map +1 -0
  199. package/core/src/middles/nodes/hexagon.rect.d.ts +3 -0
  200. package/core/src/middles/nodes/hexagon.rect.js +14 -0
  201. package/core/src/middles/nodes/hexagon.rect.js.map +1 -0
  202. package/core/src/middles/nodes/image.anchor.d.ts +2 -0
  203. package/core/src/middles/nodes/image.anchor.js +12 -0
  204. package/core/src/middles/nodes/image.anchor.js.map +1 -0
  205. package/core/src/middles/nodes/image.rect.d.ts +3 -0
  206. package/core/src/middles/nodes/image.rect.js +65 -0
  207. package/core/src/middles/nodes/image.rect.js.map +1 -0
  208. package/core/src/middles/nodes/line.anchor.d.ts +2 -0
  209. package/core/src/middles/nodes/line.anchor.js +13 -0
  210. package/core/src/middles/nodes/line.anchor.js.map +1 -0
  211. package/core/src/middles/nodes/line.d.ts +2 -0
  212. package/core/src/middles/nodes/line.js +9 -0
  213. package/core/src/middles/nodes/line.js.map +1 -0
  214. package/core/src/middles/nodes/line.rect.d.ts +3 -0
  215. package/core/src/middles/nodes/line.rect.js +9 -0
  216. package/core/src/middles/nodes/line.rect.js.map +1 -0
  217. package/core/src/middles/nodes/message.anchor.d.ts +2 -0
  218. package/core/src/middles/nodes/message.anchor.js +9 -0
  219. package/core/src/middles/nodes/message.anchor.js.map +1 -0
  220. package/core/src/middles/nodes/message.d.ts +2 -0
  221. package/core/src/middles/nodes/message.js +14 -0
  222. package/core/src/middles/nodes/message.js.map +1 -0
  223. package/core/src/middles/nodes/message.rect.d.ts +3 -0
  224. package/core/src/middles/nodes/message.rect.js +10 -0
  225. package/core/src/middles/nodes/message.rect.js.map +1 -0
  226. package/core/src/middles/nodes/pentagon.anchor.d.ts +2 -0
  227. package/core/src/middles/nodes/pentagon.anchor.js +10 -0
  228. package/core/src/middles/nodes/pentagon.anchor.js.map +1 -0
  229. package/core/src/middles/nodes/pentagon.d.ts +2 -0
  230. package/core/src/middles/nodes/pentagon.js +12 -0
  231. package/core/src/middles/nodes/pentagon.js.map +1 -0
  232. package/core/src/middles/nodes/pentagon.rect.d.ts +3 -0
  233. package/core/src/middles/nodes/pentagon.rect.js +23 -0
  234. package/core/src/middles/nodes/pentagon.rect.js.map +1 -0
  235. package/core/src/middles/nodes/pentagram.anchor.d.ts +2 -0
  236. package/core/src/middles/nodes/pentagram.anchor.js +10 -0
  237. package/core/src/middles/nodes/pentagram.anchor.js.map +1 -0
  238. package/core/src/middles/nodes/pentagram.d.ts +2 -0
  239. package/core/src/middles/nodes/pentagram.js +11 -0
  240. package/core/src/middles/nodes/pentagram.js.map +1 -0
  241. package/core/src/middles/nodes/pentagram.rect.d.ts +3 -0
  242. package/core/src/middles/nodes/pentagram.rect.js +11 -0
  243. package/core/src/middles/nodes/pentagram.rect.js.map +1 -0
  244. package/core/src/middles/nodes/people.d.ts +2 -0
  245. package/core/src/middles/nodes/people.js +17 -0
  246. package/core/src/middles/nodes/people.js.map +1 -0
  247. package/core/src/middles/nodes/people.rect.d.ts +3 -0
  248. package/core/src/middles/nodes/people.rect.js +9 -0
  249. package/core/src/middles/nodes/people.rect.js.map +1 -0
  250. package/core/src/middles/nodes/rectangle.d.ts +2 -0
  251. package/core/src/middles/nodes/rectangle.js +25 -0
  252. package/core/src/middles/nodes/rectangle.js.map +1 -0
  253. package/core/src/middles/nodes/rectangle.rect.d.ts +3 -0
  254. package/core/src/middles/nodes/rectangle.rect.js +11 -0
  255. package/core/src/middles/nodes/rectangle.rect.js.map +1 -0
  256. package/core/src/middles/nodes/tablePagination.d.ts +2 -0
  257. package/core/src/middles/nodes/tablePagination.js +106 -0
  258. package/core/src/middles/nodes/text.d.ts +8 -0
  259. package/core/src/middles/nodes/text.js +295 -0
  260. package/core/src/middles/nodes/text.js.map +1 -0
  261. package/core/src/middles/nodes/triangle.anchor.d.ts +2 -0
  262. package/core/src/middles/nodes/triangle.anchor.js +9 -0
  263. package/core/src/middles/nodes/triangle.anchor.js.map +1 -0
  264. package/core/src/middles/nodes/triangle.d.ts +2 -0
  265. package/core/src/middles/nodes/triangle.js +10 -0
  266. package/core/src/middles/nodes/triangle.js.map +1 -0
  267. package/core/src/middles/nodes/triangle.rect.d.ts +3 -0
  268. package/core/src/middles/nodes/triangle.rect.js +23 -0
  269. package/core/src/middles/nodes/triangle.rect.js.map +1 -0
  270. package/core/src/models/data.d.ts +26 -0
  271. package/core/src/models/data.js +77 -0
  272. package/core/src/models/data.js.map +1 -0
  273. package/core/src/models/direction.d.ts +7 -0
  274. package/core/src/models/direction.js +9 -0
  275. package/core/src/models/direction.js.map +1 -0
  276. package/core/src/models/event.d.ts +13 -0
  277. package/core/src/models/event.js +16 -0
  278. package/core/src/models/event.js.map +1 -0
  279. package/core/src/models/index.d.ts +9 -0
  280. package/core/src/models/index.js +10 -0
  281. package/core/src/models/index.js.map +1 -0
  282. package/core/src/models/line.d.ts +53 -0
  283. package/core/src/models/line.js +442 -0
  284. package/core/src/models/line.js.map +1 -0
  285. package/core/src/models/node.d.ts +95 -0
  286. package/core/src/models/node.js +944 -0
  287. package/core/src/models/node.js.map +1 -0
  288. package/core/src/models/pen.d.ts +122 -0
  289. package/core/src/models/pen.js +362 -0
  290. package/core/src/models/pen.js.map +1 -0
  291. package/core/src/models/point.d.ts +25 -0
  292. package/core/src/models/point.js +59 -0
  293. package/core/src/models/point.js.map +1 -0
  294. package/core/src/models/rect.d.ts +22 -0
  295. package/core/src/models/rect.js +93 -0
  296. package/core/src/models/rect.js.map +1 -0
  297. package/core/src/models/status.d.ts +10 -0
  298. package/core/src/models/status.js +13 -0
  299. package/core/src/models/status.js.map +1 -0
  300. package/core/src/mqtt.d.ts +14 -0
  301. package/core/src/mqtt.js +82 -0
  302. package/core/src/mqtt.js.map +1 -0
  303. package/core/src/mqtt.min.d.ts +2 -0
  304. package/core/src/mqtt.min.js +2447 -0
  305. package/core/src/mqtt.min.js.map +1 -0
  306. package/core/src/offscreen.d.ts +16 -0
  307. package/core/src/offscreen.js +70 -0
  308. package/core/src/offscreen.js.map +1 -0
  309. package/core/src/options.d.ts +66 -0
  310. package/core/src/options.js +42 -0
  311. package/core/src/options.js.map +1 -0
  312. package/core/src/poll.js +39 -0
  313. package/core/src/preview.d.ts +29 -0
  314. package/core/src/preview.js +247 -0
  315. package/core/src/renderLayer.d.ts +36 -0
  316. package/core/src/renderLayer.js +187 -0
  317. package/core/src/renderLayer.js.map +1 -0
  318. package/core/src/socket.d.ts +10 -0
  319. package/core/src/socket.js +51 -0
  320. package/core/src/socket.js.map +1 -0
  321. package/core/src/utils/browser.d.ts +1 -0
  322. package/core/src/utils/browser.js +4 -0
  323. package/core/src/utils/browser.js.map +1 -0
  324. package/core/src/utils/canvas.d.ts +13 -0
  325. package/core/src/utils/canvas.js +84 -0
  326. package/core/src/utils/canvas.js.map +1 -0
  327. package/core/src/utils/construction.d.ts +41 -0
  328. package/core/src/utils/construction.js +36 -0
  329. package/core/src/utils/conversion.d.ts +0 -0
  330. package/core/src/utils/conversion.js +0 -0
  331. package/core/src/utils/dom.d.ts +8 -0
  332. package/core/src/utils/dom.js +67 -0
  333. package/core/src/utils/dom.js.map +1 -0
  334. package/core/src/utils/index.d.ts +9 -0
  335. package/core/src/utils/index.js +10 -0
  336. package/core/src/utils/index.js.map +1 -0
  337. package/core/src/utils/math.d.ts +3 -0
  338. package/core/src/utils/math.js +118 -0
  339. package/core/src/utils/math.js.map +1 -0
  340. package/core/src/utils/onmousevent.d.ts +5 -0
  341. package/core/src/utils/onmousevent.js +57 -0
  342. package/core/src/utils/padding.d.ts +7 -0
  343. package/core/src/utils/padding.js +47 -0
  344. package/core/src/utils/padding.js.map +1 -0
  345. package/core/src/utils/rect.d.ts +7 -0
  346. package/core/src/utils/rect.js +72 -0
  347. package/core/src/utils/rect.js.map +1 -0
  348. package/core/src/utils/uuid.d.ts +4 -0
  349. package/core/src/utils/uuid.js +13 -0
  350. package/core/src/utils/uuid.js.map +1 -0
  351. package/flow-diagram/index.d.ts +12 -0
  352. package/flow-diagram/index.js +13 -0
  353. package/flow-diagram/index.js.map +1 -0
  354. package/flow-diagram/src/comment/comment.anchor.d.ts +2 -0
  355. package/flow-diagram/src/comment/comment.anchor.js +5 -0
  356. package/flow-diagram/src/comment/comment.anchor.js.map +1 -0
  357. package/flow-diagram/src/comment/comment.d.ts +2 -0
  358. package/flow-diagram/src/comment/comment.js +10 -0
  359. package/flow-diagram/src/comment/comment.js.map +1 -0
  360. package/flow-diagram/src/comment/index.d.ts +2 -0
  361. package/flow-diagram/src/comment/index.js +3 -0
  362. package/flow-diagram/src/comment/index.js.map +1 -0
  363. package/flow-diagram/src/data/data.anchor.d.ts +2 -0
  364. package/flow-diagram/src/data/data.anchor.js +8 -0
  365. package/flow-diagram/src/data/data.anchor.js.map +1 -0
  366. package/flow-diagram/src/data/data.d.ts +2 -0
  367. package/flow-diagram/src/data/data.js +12 -0
  368. package/flow-diagram/src/data/data.js.map +1 -0
  369. package/flow-diagram/src/data/data.rect.d.ts +3 -0
  370. package/flow-diagram/src/data/data.rect.js +9 -0
  371. package/flow-diagram/src/data/data.rect.js.map +1 -0
  372. package/flow-diagram/src/data/index.d.ts +3 -0
  373. package/flow-diagram/src/data/index.js +4 -0
  374. package/flow-diagram/src/data/index.js.map +1 -0
  375. package/flow-diagram/src/db/db.d.ts +2 -0
  376. package/flow-diagram/src/db/db.js +14 -0
  377. package/flow-diagram/src/db/db.js.map +1 -0
  378. package/flow-diagram/src/db/db.rect.d.ts +4 -0
  379. package/flow-diagram/src/db/db.rect.js +9 -0
  380. package/flow-diagram/src/db/db.rect.js.map +1 -0
  381. package/flow-diagram/src/db/index.d.ts +2 -0
  382. package/flow-diagram/src/db/index.js +3 -0
  383. package/flow-diagram/src/db/index.js.map +1 -0
  384. package/flow-diagram/src/display/display.anchor.d.ts +2 -0
  385. package/flow-diagram/src/display/display.anchor.js +8 -0
  386. package/flow-diagram/src/display/display.anchor.js.map +1 -0
  387. package/flow-diagram/src/display/display.d.ts +2 -0
  388. package/flow-diagram/src/display/display.js +13 -0
  389. package/flow-diagram/src/display/display.js.map +1 -0
  390. package/flow-diagram/src/display/display.rect.d.ts +3 -0
  391. package/flow-diagram/src/display/display.rect.js +9 -0
  392. package/flow-diagram/src/display/display.rect.js.map +1 -0
  393. package/flow-diagram/src/display/index.d.ts +3 -0
  394. package/flow-diagram/src/display/index.js +4 -0
  395. package/flow-diagram/src/display/index.js.map +1 -0
  396. package/flow-diagram/src/document/document.anchor.d.ts +2 -0
  397. package/flow-diagram/src/document/document.anchor.js +8 -0
  398. package/flow-diagram/src/document/document.anchor.js.map +1 -0
  399. package/flow-diagram/src/document/document.d.ts +2 -0
  400. package/flow-diagram/src/document/document.js +15 -0
  401. package/flow-diagram/src/document/document.js.map +1 -0
  402. package/flow-diagram/src/document/document.rect.d.ts +3 -0
  403. package/flow-diagram/src/document/document.rect.js +9 -0
  404. package/flow-diagram/src/document/document.rect.js.map +1 -0
  405. package/flow-diagram/src/document/index.d.ts +3 -0
  406. package/flow-diagram/src/document/index.js +4 -0
  407. package/flow-diagram/src/document/index.js.map +1 -0
  408. package/flow-diagram/src/externStorage/externStorage.anchor.d.ts +2 -0
  409. package/flow-diagram/src/externStorage/externStorage.anchor.js +8 -0
  410. package/flow-diagram/src/externStorage/externStorage.anchor.js.map +1 -0
  411. package/flow-diagram/src/externStorage/externStorage.d.ts +2 -0
  412. package/flow-diagram/src/externStorage/externStorage.js +12 -0
  413. package/flow-diagram/src/externStorage/externStorage.js.map +1 -0
  414. package/flow-diagram/src/externStorage/externStorage.rect.d.ts +3 -0
  415. package/flow-diagram/src/externStorage/externStorage.rect.js +9 -0
  416. package/flow-diagram/src/externStorage/externStorage.rect.js.map +1 -0
  417. package/flow-diagram/src/externStorage/index.d.ts +3 -0
  418. package/flow-diagram/src/externStorage/index.js +4 -0
  419. package/flow-diagram/src/externStorage/index.js.map +1 -0
  420. package/flow-diagram/src/internalStorage/index.d.ts +2 -0
  421. package/flow-diagram/src/internalStorage/index.js +3 -0
  422. package/flow-diagram/src/internalStorage/index.js.map +1 -0
  423. package/flow-diagram/src/internalStorage/internalStorage.d.ts +2 -0
  424. package/flow-diagram/src/internalStorage/internalStorage.js +16 -0
  425. package/flow-diagram/src/internalStorage/internalStorage.js.map +1 -0
  426. package/flow-diagram/src/internalStorage/internalStorage.rect.d.ts +3 -0
  427. package/flow-diagram/src/internalStorage/internalStorage.rect.js +10 -0
  428. package/flow-diagram/src/internalStorage/internalStorage.rect.js.map +1 -0
  429. package/flow-diagram/src/manually/index.d.ts +3 -0
  430. package/flow-diagram/src/manually/index.js +4 -0
  431. package/flow-diagram/src/manually/index.js.map +1 -0
  432. package/flow-diagram/src/manually/manually.anchor.d.ts +2 -0
  433. package/flow-diagram/src/manually/manually.anchor.js +8 -0
  434. package/flow-diagram/src/manually/manually.anchor.js.map +1 -0
  435. package/flow-diagram/src/manually/manually.d.ts +2 -0
  436. package/flow-diagram/src/manually/manually.js +12 -0
  437. package/flow-diagram/src/manually/manually.js.map +1 -0
  438. package/flow-diagram/src/manually/manually.rect.d.ts +3 -0
  439. package/flow-diagram/src/manually/manually.rect.js +9 -0
  440. package/flow-diagram/src/manually/manually.rect.js.map +1 -0
  441. package/flow-diagram/src/parallel/index.d.ts +2 -0
  442. package/flow-diagram/src/parallel/index.js +3 -0
  443. package/flow-diagram/src/parallel/index.js.map +1 -0
  444. package/flow-diagram/src/parallel/parallel.anchor.d.ts +2 -0
  445. package/flow-diagram/src/parallel/parallel.anchor.js +6 -0
  446. package/flow-diagram/src/parallel/parallel.anchor.js.map +1 -0
  447. package/flow-diagram/src/parallel/parallel.d.ts +2 -0
  448. package/flow-diagram/src/parallel/parallel.js +9 -0
  449. package/flow-diagram/src/parallel/parallel.js.map +1 -0
  450. package/flow-diagram/src/queue/index.d.ts +2 -0
  451. package/flow-diagram/src/queue/index.js +3 -0
  452. package/flow-diagram/src/queue/index.js.map +1 -0
  453. package/flow-diagram/src/queue/queue.d.ts +2 -0
  454. package/flow-diagram/src/queue/queue.js +9 -0
  455. package/flow-diagram/src/queue/queue.js.map +1 -0
  456. package/flow-diagram/src/queue/queue.rect.d.ts +3 -0
  457. package/flow-diagram/src/queue/queue.rect.js +11 -0
  458. package/flow-diagram/src/queue/queue.rect.js.map +1 -0
  459. package/flow-diagram/src/register.d.ts +1 -0
  460. package/flow-diagram/src/register.js +26 -0
  461. package/flow-diagram/src/register.js.map +1 -0
  462. package/flow-diagram/src/subprocess/index.d.ts +2 -0
  463. package/flow-diagram/src/subprocess/index.js +3 -0
  464. package/flow-diagram/src/subprocess/index.js.map +1 -0
  465. package/flow-diagram/src/subprocess/subprocess.d.ts +2 -0
  466. package/flow-diagram/src/subprocess/subprocess.js +16 -0
  467. package/flow-diagram/src/subprocess/subprocess.js.map +1 -0
  468. package/flow-diagram/src/subprocess/subprocess.rect.d.ts +3 -0
  469. package/flow-diagram/src/subprocess/subprocess.rect.js +9 -0
  470. package/flow-diagram/src/subprocess/subprocess.rect.js.map +1 -0
  471. package/layout/index.d.ts +2 -0
  472. package/layout/index.js +3 -0
  473. package/layout/index.js.map +1 -0
  474. package/layout/src/align.d.ts +3 -0
  475. package/layout/src/align.js +67 -0
  476. package/layout/src/align.js.map +1 -0
  477. package/layout/src/layout.d.ts +9 -0
  478. package/layout/src/layout.js +50 -0
  479. package/layout/src/layout.js.map +1 -0
  480. package/myShape-diagram/myShape.js +196 -0
  481. package/myShape-diagram/myShape.ts +1 -0
  482. package/package.json +15 -0
  483. package/sequence-diagram/index.d.ts +3 -0
  484. package/sequence-diagram/index.js +4 -0
  485. package/sequence-diagram/index.js.map +1 -0
  486. package/sequence-diagram/src/focus/focus.anchor.d.ts +2 -0
  487. package/sequence-diagram/src/focus/focus.anchor.js +15 -0
  488. package/sequence-diagram/src/focus/focus.anchor.js.map +1 -0
  489. package/sequence-diagram/src/focus/focus.d.ts +2 -0
  490. package/sequence-diagram/src/focus/focus.js +13 -0
  491. package/sequence-diagram/src/focus/focus.js.map +1 -0
  492. package/sequence-diagram/src/focus/focus.rect.d.ts +3 -0
  493. package/sequence-diagram/src/focus/focus.rect.js +9 -0
  494. package/sequence-diagram/src/focus/focus.rect.js.map +1 -0
  495. package/sequence-diagram/src/focus/index.d.ts +3 -0
  496. package/sequence-diagram/src/focus/index.js +4 -0
  497. package/sequence-diagram/src/focus/index.js.map +1 -0
  498. package/sequence-diagram/src/lifeline/index.d.ts +3 -0
  499. package/sequence-diagram/src/lifeline/index.js +4 -0
  500. package/sequence-diagram/src/lifeline/index.js.map +1 -0
  501. package/sequence-diagram/src/lifeline/lifeline.anchor.d.ts +2 -0
  502. package/sequence-diagram/src/lifeline/lifeline.anchor.js +9 -0
  503. package/sequence-diagram/src/lifeline/lifeline.anchor.js.map +1 -0
  504. package/sequence-diagram/src/lifeline/lifeline.d.ts +2 -0
  505. package/sequence-diagram/src/lifeline/lifeline.js +35 -0
  506. package/sequence-diagram/src/lifeline/lifeline.js.map +1 -0
  507. package/sequence-diagram/src/lifeline/lifeline.rect.d.ts +3 -0
  508. package/sequence-diagram/src/lifeline/lifeline.rect.js +9 -0
  509. package/sequence-diagram/src/lifeline/lifeline.rect.js.map +1 -0
  510. package/sequence-diagram/src/register.d.ts +1 -0
  511. package/sequence-diagram/src/register.js +8 -0
  512. package/sequence-diagram/src/register.js.map +1 -0
@@ -0,0 +1,442 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
14
+ import { Pen, PenType } from './pen';
15
+ import { Point } from './point';
16
+ import { drawLineFns, drawArrowFns } from '../middles';
17
+ import { getBezierPoint } from '../middles/lines/curve';
18
+ import { Store } from 'le5le-store';
19
+ import { lineLen, curveLen } from '../utils/canvas';
20
+ import { text } from '../middles/nodes/text';
21
+ import { Rect } from './rect';
22
+ import { abs } from '../utils/math';
23
+ var Line = /** @class */ (function (_super) {
24
+ __extends(Line, _super);
25
+ function Line(json) {
26
+ var _this = _super.call(this, json) || this;
27
+ _this.controlPoints = [];
28
+ _this.fromArrowSize = 5;
29
+ _this.toArrowSize = 5;
30
+ _this.borderWidth = 0;
31
+ _this.borderColor = '#000000';
32
+ _this.animateColor = '';
33
+ _this.animateSpan = 1;
34
+ _this.animatePos = 0;
35
+ _this.isAnimate = false;
36
+ _this.animateFromSize = 0;
37
+ _this.animateToSize = 0;
38
+ _this.animateDotSize = 3;
39
+ _this.type = PenType.Line;
40
+ if (json) {
41
+ if (json.from) {
42
+ _this.from = new Point(json.from.x, json.from.y, json.from.direction, json.from.anchorIndex, json.from.id);
43
+ }
44
+ if (json.to) {
45
+ _this.to = new Point(json.to.x, json.to.y, json.to.direction, json.to.anchorIndex, json.to.id);
46
+ }
47
+ _this.fromArrow = json.fromArrow || '';
48
+ _this.toArrow = json.toArrow || '';
49
+ _this.fromArrowSize = json.fromArrowSize || 5;
50
+ _this.toArrowSize = json.toArrowSize || 5;
51
+ _this.fromArrowColor = json.fromArrowColor;
52
+ _this.toArrowColor = json.toArrowColor;
53
+ if (json.animateColor) {
54
+ _this.animateColor = json.animateColor;
55
+ }
56
+ if (json.animateSpan) {
57
+ _this.animateSpan = json.animateSpan;
58
+ }
59
+ if (json.animateLineDash) {
60
+ _this.animateLineDash = json.animateLineDash;
61
+ }
62
+ if (json.length) {
63
+ _this.length = json.length;
64
+ }
65
+ if (json.borderWidth) {
66
+ _this.borderColor = json.borderColor;
67
+ _this.borderWidth = json.borderWidth;
68
+ }
69
+ _this.animateDotSize = json.animateDotSize || 3;
70
+ _this.manualCps = json.manualCps;
71
+ _this.disableEmptyLine = json.disableEmptyLine;
72
+ if (json.lineJoin) {
73
+ _this.lineJoin = json.lineJoin;
74
+ }
75
+ }
76
+ else {
77
+ _this.name = 'curve';
78
+ _this.fromArrow = 'triangleSolid';
79
+ }
80
+ if (!_this.font.background) {
81
+ _this.font.background = '#fff';
82
+ }
83
+ // 暂时兼容老数据
84
+ if (json.name === 'mind' && json.controlPoints && json.controlPoints.length < 3) {
85
+ json.controlPoints = null;
86
+ _this.calcControlPoints();
87
+ }
88
+ //
89
+ if (json.controlPoints) {
90
+ for (var _i = 0, _a = json.controlPoints; _i < _a.length; _i++) {
91
+ var item = _a[_i];
92
+ _this.controlPoints.push(new Point(item.x, item.y, item.direction, item.anchorIndex, item.id));
93
+ }
94
+ }
95
+ return _this;
96
+ }
97
+ Line.prototype.setFrom = function (from, fromArrow) {
98
+ if (fromArrow === void 0) { fromArrow = ''; }
99
+ this.from = from;
100
+ this.fromArrow = fromArrow;
101
+ this.textRect = null;
102
+ };
103
+ Line.prototype.setTo = function (to, toArrow) {
104
+ if (toArrow === void 0) { toArrow = 'triangleSolid'; }
105
+ this.to = to;
106
+ this.toArrow = toArrow;
107
+ this.textRect = null;
108
+ };
109
+ Line.prototype.calcControlPoints = function (force) {
110
+ if (this.manualCps && !force) {
111
+ return;
112
+ }
113
+ this.textRect = null;
114
+ if (this.from && this.to && drawLineFns[this.name]) {
115
+ drawLineFns[this.name].controlPointsFn(this);
116
+ }
117
+ };
118
+ Line.prototype.draw = function (ctx) {
119
+ if (this.animateDot) {
120
+ //console.log('lineDraw01=====', ctx)
121
+ ctx.fillStyle = this.strokeStyle;
122
+ if (this.animateType === 'dot') {
123
+ ctx.beginPath();
124
+ ctx.arc(this.animateDot.x, this.animateDot.y, this.animateDotSize, 0, 2 * Math.PI, false);
125
+ ctx.fill();
126
+ //console.log('lineDraw01-dot=====', ctx)
127
+ return;
128
+ }
129
+ else if (this.animateType === 'comet') {
130
+ var bulles = this.getBubbles();
131
+ ctx.save();
132
+ for (var _i = 0, bulles_1 = bulles; _i < bulles_1.length; _i++) {
133
+ var item = bulles_1[_i];
134
+ ctx.globalAlpha = item.a;
135
+ ctx.beginPath();
136
+ ctx.arc(item.pos.x, item.pos.y, item.r, 0, 2 * Math.PI, false);
137
+ ctx.fill();
138
+ }
139
+ ctx.restore();
140
+ //console.log('lineDraw01-comet=====', ctx)
141
+ }
142
+ }
143
+ if (!this.isAnimate && this.borderWidth > 0 && this.borderColor) {
144
+ //console.log('lineDraw02=====', ctx)
145
+ ctx.save();
146
+ if (this.lineJoin) {
147
+ ctx.lineJoin = this.lineJoin;
148
+ }
149
+ ctx.lineWidth = this.lineWidth + this.borderWidth;
150
+ ctx.strokeStyle = this.borderColor;
151
+ if (drawLineFns[this.name]) {
152
+ drawLineFns[this.name].drawFn(ctx, this);
153
+ }
154
+ ctx.restore();
155
+ }
156
+ if ((!this.isAnimate || this.animateType !== 'comet') && drawLineFns[this.name]) {
157
+ //console.log('lineDraw03=====', ctx)
158
+ if (this.lineJoin) {
159
+ ctx.lineJoin = this.lineJoin;
160
+ }
161
+ drawLineFns[this.name].drawFn(ctx, this);
162
+ }
163
+ var scale = Store.get(this.generateStoreKey('LT:scale')) || 1;
164
+ if (this.fromArrow && drawArrowFns[this.fromArrow]) {
165
+ ctx.save();
166
+ ctx.beginPath();
167
+ ctx.lineDashOffset = 0;
168
+ ctx.setLineDash([]);
169
+ ctx.fillStyle = this.fromArrowColor || this.strokeStyle || ctx.strokeStyle;
170
+ ctx.strokeStyle = ctx.fillStyle;
171
+ var f = this.to;
172
+ if (this.name === 'curve') {
173
+ f = getBezierPoint(0.95 - this.lineWidth / 100, this.to, this.controlPoints[1], this.controlPoints[0], this.from);
174
+ }
175
+ else if (this.name !== 'line' && this.controlPoints.length) {
176
+ f = this.controlPoints[0];
177
+ }
178
+ drawArrowFns[this.fromArrow](ctx, f, this.from, this.fromArrowSize * scale);
179
+ ctx.restore();
180
+ //console.log('lineDraw04=====', ctx)
181
+ }
182
+ if (this.toArrow && drawArrowFns[this.toArrow]) {
183
+ ctx.save();
184
+ ctx.beginPath();
185
+ ctx.lineDashOffset = 0;
186
+ ctx.setLineDash([]);
187
+ ctx.fillStyle = this.toArrowColor || this.strokeStyle || ctx.strokeStyle;
188
+ ctx.strokeStyle = ctx.fillStyle;
189
+ var f = this.from;
190
+ if (this.name === 'curve') {
191
+ f = getBezierPoint(0.95 - this.lineWidth / 100, this.from, this.controlPoints[0], this.controlPoints[1], this.to);
192
+ }
193
+ else if (this.name === 'mind') {
194
+ f = getBezierPoint(0.96 - this.lineWidth / 100, this.from, this.controlPoints[0], this.controlPoints[1], this.controlPoints[2]);
195
+ }
196
+ else if (this.name !== 'line' && this.controlPoints.length) {
197
+ f = this.controlPoints[this.controlPoints.length - 1];
198
+ }
199
+ drawArrowFns[this.toArrow](ctx, f, this.to, this.toArrowSize * scale);
200
+ ctx.restore();
201
+ //console.log('lineDraw05=====', ctx)
202
+ }
203
+ if (this.text && !this.isAnimate) {
204
+ if (!this.textRect) {
205
+ this.calcTextRect();
206
+ }
207
+ text(ctx, this);
208
+ //console.log('lineDraw06=====', ctx)
209
+ }
210
+ };
211
+ Line.prototype.pointIn = function (pt) {
212
+ return drawLineFns[this.name].pointIn(pt, this);
213
+ };
214
+ Line.prototype.getLen = function () {
215
+ switch (this.name) {
216
+ case 'line':
217
+ return lineLen(this.from, this.to);
218
+ case 'polyline':
219
+ if (!this.controlPoints || !this.controlPoints.length) {
220
+ return lineLen(this.from, this.to);
221
+ }
222
+ var len = 0;
223
+ var curPt = this.from;
224
+ for (var _i = 0, _a = this.controlPoints; _i < _a.length; _i++) {
225
+ var pt = _a[_i];
226
+ len += lineLen(curPt, pt);
227
+ curPt = pt;
228
+ }
229
+ len += lineLen(curPt, this.to);
230
+ return len | 0;
231
+ case 'curve':
232
+ return curveLen(this.from, this.controlPoints[0], this.controlPoints[1], this.to);
233
+ }
234
+ return 0;
235
+ };
236
+ Line.prototype.calcTextRect = function () {
237
+ var center = this.getCenter();
238
+ var width = Math.abs(this.from.x - this.to.x);
239
+ if (width < 100) {
240
+ width = 100;
241
+ }
242
+ var height = this.font.lineHeight *
243
+ this.font.fontSize *
244
+ (this.textMaxLine || (this.text && this.text.split('\n').length) || 1);
245
+ this.textRect = new Rect(center.x - width / 2, center.y - height / 2, width, height);
246
+ };
247
+ Line.prototype.getTextRect = function () {
248
+ // calc every time just in case text line is changed.
249
+ this.calcTextRect();
250
+ return this.textRect;
251
+ };
252
+ Line.prototype.getCenter = function () {
253
+ var center = new Point(this.from.x, this.from.y);
254
+ switch (this.name) {
255
+ case 'line':
256
+ center = this.getLineCenter(this.from, this.to);
257
+ break;
258
+ case 'polyline':
259
+ var i = Math.floor(this.controlPoints.length / 2);
260
+ center = this.getLineCenter(this.controlPoints[i - 1] || this.from, this.controlPoints[i] || this.to);
261
+ break;
262
+ case 'curve':
263
+ center = getBezierPoint(0.5, this.to, this.controlPoints[1], this.controlPoints[0], this.from);
264
+ }
265
+ return center;
266
+ };
267
+ Line.prototype.getLineCenter = function (from, to) {
268
+ return new Point((from.x + to.x) / 2, (from.y + to.y) / 2);
269
+ };
270
+ Line.prototype.getPointByPos = function (pos) {
271
+ if (pos <= 0) {
272
+ return this.from;
273
+ }
274
+ switch (this.name) {
275
+ case 'line':
276
+ return this.getLinePtByPos(this.from, this.to, pos);
277
+ case 'polyline':
278
+ if (!this.controlPoints || !this.controlPoints.length) {
279
+ return this.getLinePtByPos(this.from, this.to, pos);
280
+ }
281
+ else {
282
+ var points = [].concat(this.controlPoints, this.to);
283
+ var curPt = this.from;
284
+ for (var _i = 0, points_1 = points; _i < points_1.length; _i++) {
285
+ var pt = points_1[_i];
286
+ var l = lineLen(curPt, pt);
287
+ if (pos > l) {
288
+ pos -= l;
289
+ curPt = pt;
290
+ }
291
+ else {
292
+ return this.getLinePtByPos(curPt, pt, pos);
293
+ }
294
+ }
295
+ return this.to;
296
+ }
297
+ case 'curve':
298
+ return getBezierPoint(pos / this.getLen(), this.from, this.controlPoints[0], this.controlPoints[1], this.to);
299
+ }
300
+ return null;
301
+ };
302
+ Line.prototype.getLinePtByPos = function (from, to, pos) {
303
+ var length = lineLen(from, to);
304
+ if (pos <= 0) {
305
+ return from;
306
+ }
307
+ if (pos >= length) {
308
+ return to;
309
+ }
310
+ var x, y;
311
+ x = from.x + (to.x - from.x) * (pos / length);
312
+ y = from.y + (to.y - from.y) * (pos / length);
313
+ return new Point(x, y);
314
+ };
315
+ Line.prototype.calcRectInParent = function (parent) {
316
+ var parentW = parent.rect.width - parent.paddingLeftNum - parent.paddingRightNum;
317
+ var parentH = parent.rect.height - parent.paddingTopNum - parent.paddingBottomNum;
318
+ this.rectInParent = {
319
+ x: ((this.from.x - parent.rect.x - parent.paddingLeftNum) * 100) / parentW + '%',
320
+ y: ((this.from.y - parent.rect.y - parent.paddingTopNum) * 100) / parentH + '%',
321
+ width: 0,
322
+ height: 0,
323
+ rotate: 0,
324
+ };
325
+ };
326
+ // 根据父节点rect计算自己(子节点)的rect
327
+ Line.prototype.calcRectByParent = function (parent) {
328
+ if (!this.rectInParent) {
329
+ return;
330
+ }
331
+ var parentW = parent.rect.width - parent.paddingLeftNum - parent.paddingRightNum;
332
+ var parentH = parent.rect.height - parent.paddingTopNum - parent.paddingBottomNum;
333
+ var x = parent.rect.x +
334
+ parent.paddingLeftNum +
335
+ abs(parentW, this.rectInParent.x) +
336
+ abs(parentW, this.rectInParent.marginLeft);
337
+ var y = parent.rect.y +
338
+ parent.paddingTopNum +
339
+ abs(parentH, this.rectInParent.y) +
340
+ abs(parentW, this.rectInParent.marginTop);
341
+ if (this.rectInParent.marginLeft === undefined && this.rectInParent.marginRight) {
342
+ x -= abs(parentW, this.rectInParent.marginRight);
343
+ }
344
+ if (this.rectInParent.marginTop === undefined && this.rectInParent.marginBottom) {
345
+ y -= abs(parentW, this.rectInParent.marginBottom);
346
+ }
347
+ this.translate(x - this.from.x, y - this.from.y);
348
+ };
349
+ Line.prototype.animate = function (now) {
350
+ if (this.animateFromSize) {
351
+ this.lineDashOffset = -this.animateFromSize;
352
+ }
353
+ this.animatePos += this.animateSpan;
354
+ this.animateDot = null;
355
+ switch (this.animateType) {
356
+ case 'beads':
357
+ this.lineDashOffset = -this.animatePos;
358
+ var len = this.lineWidth;
359
+ if (len < 5) {
360
+ len = 5;
361
+ }
362
+ if (this.animateLineDash) {
363
+ this.lineDash = this.animateLineDash;
364
+ }
365
+ else {
366
+ this.lineDash = [len, len * 2];
367
+ }
368
+ break;
369
+ case 'dot':
370
+ case 'comet':
371
+ this.lineDash = null;
372
+ this.animateDot = this.getPointByPos(this.animatePos + this.animateFromSize);
373
+ break;
374
+ default:
375
+ this.lineDash = [this.animatePos, this.length - this.animatePos + 1];
376
+ break;
377
+ }
378
+ if (this.animatePos > this.length + this.animateSpan - this.animateFromSize - this.animateToSize) {
379
+ if (++this.animateCycleIndex >= this.animateCycle && this.animateCycle > 0) {
380
+ this.animateStart = 0;
381
+ Store.set(this.generateStoreKey('animateEnd'), {
382
+ type: 'line',
383
+ data: this,
384
+ });
385
+ return;
386
+ }
387
+ this.animatePos = this.animateSpan;
388
+ }
389
+ };
390
+ Line.prototype.getBubbles = function () {
391
+ var bubbles = [];
392
+ for (var i = 0; i < 30 && this.animatePos - i > 0; ++i) {
393
+ bubbles.push({
394
+ pos: this.getPointByPos(this.animatePos - i * 2 + this.animateFromSize),
395
+ a: 1 - i * 0.03,
396
+ r: this.lineWidth - i * 0.01,
397
+ });
398
+ }
399
+ return bubbles;
400
+ };
401
+ Line.prototype.round = function () {
402
+ this.from.round();
403
+ this.to.round();
404
+ };
405
+ Line.prototype.translate = function (x, y) {
406
+ this.from.x += x;
407
+ this.from.y += y;
408
+ this.to.x += x;
409
+ this.to.y += y;
410
+ if (this.text) {
411
+ this.textRect = null;
412
+ }
413
+ for (var _i = 0, _a = this.controlPoints; _i < _a.length; _i++) {
414
+ var pt = _a[_i];
415
+ pt.x += x;
416
+ pt.y += y;
417
+ }
418
+ Store.set(this.generateStoreKey('pts-') + this.id, null);
419
+ };
420
+ Line.prototype.scale = function (scale, center) {
421
+ this.from.x = center.x - (center.x - this.from.x) * scale;
422
+ this.from.y = center.y - (center.y - this.from.y) * scale;
423
+ this.to.x = center.x - (center.x - this.to.x) * scale;
424
+ this.to.y = center.y - (center.y - this.to.y) * scale;
425
+ if (this.text && this.font && this.font.fontSize) {
426
+ this.font.fontSize *= scale;
427
+ this.textRect = null;
428
+ }
429
+ for (var _i = 0, _a = this.controlPoints; _i < _a.length; _i++) {
430
+ var pt = _a[_i];
431
+ pt.x = center.x - (center.x - pt.x) * scale;
432
+ pt.y = center.y - (center.y - pt.y) * scale;
433
+ }
434
+ Store.set(this.generateStoreKey('pts-') + this.id, null);
435
+ };
436
+ Line.prototype.clone = function () {
437
+ return new Line(this);
438
+ };
439
+ return Line;
440
+ }(Pen));
441
+ export { Line };
442
+ //# sourceMappingURL=line.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"line.js","sourceRoot":"","sources":["../../../../packages/core/src/models/line.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACv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CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;YAC5C,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;SAC7C;QAED,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IAC3D,CAAC;IAED,oBAAK,GAAL;QACE,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IACH,WAAC;AAAD,CAAC,AA1dD,CAA0B,GAAG,GA0d5B"}
@@ -0,0 +1,95 @@
1
+ import { Pen } from './pen';
2
+ import { Rect } from './rect';
3
+ import { Point } from './point';
4
+ export declare const images: {
5
+ [key: string]: {
6
+ img: HTMLImageElement;
7
+ cnt: number;
8
+ };
9
+ };
10
+ export declare class Node extends Pen {
11
+ is3D: boolean;
12
+ z: number;
13
+ zRotate: number;
14
+ borderRadius: number;
15
+ icon: string;
16
+ iconFamily: string;
17
+ iconSize: number;
18
+ iconColor: string;
19
+ image: string;
20
+ lastImage: string;
21
+ imgNaturalWidth: number;
22
+ imgNaturalHeight: number;
23
+ imageWidth: number;
24
+ imageHeight: number;
25
+ imageRatio: boolean;
26
+ imageAlign: string;
27
+ img: HTMLImageElement;
28
+ bkType: number;
29
+ gradientFromColor: string;
30
+ gradientToColor: string;
31
+ gradientAngle: number;
32
+ gradientRadius: number;
33
+ paddingTop: number | string;
34
+ paddingBottom: number | string;
35
+ paddingLeft: number | string;
36
+ paddingRight: number | string;
37
+ onlySizeX?: boolean;
38
+ onlySizeY?: boolean;
39
+ floorImageIndex: boolean;
40
+ iconRect: Rect;
41
+ fullIconRect: Rect;
42
+ anchors: Point[];
43
+ rotatedAnchors: Point[];
44
+ children: Pen[];
45
+ dockWatchers: Point[];
46
+ animateDuration: number;
47
+ animateFrames: {
48
+ duration: number;
49
+ start?: number;
50
+ end?: number;
51
+ initState?: Node;
52
+ linear: boolean;
53
+ state: Node;
54
+ }[];
55
+ animateAlone: boolean;
56
+ gif: boolean;
57
+ video: string;
58
+ audio: string;
59
+ play: number;
60
+ playLoop: boolean;
61
+ nextPlay: string;
62
+ iframe: string;
63
+ elementId: string;
64
+ elementLoaded: any;
65
+ elementRendered: boolean;
66
+ constructor(json: any, noChild?: boolean);
67
+ static cloneState(json: any): Node;
68
+ init(): void;
69
+ addToDiv(type?: string): void;
70
+ hasGif(): boolean;
71
+ calcAbsPadding(): void;
72
+ setChild(children: any[]): void;
73
+ clearChildrenIds(): void;
74
+ draw(ctx: CanvasRenderingContext2D): void;
75
+ drawBkLinearGradient(ctx: CanvasRenderingContext2D): void;
76
+ drawBkRadialGradient(ctx: CanvasRenderingContext2D): void;
77
+ drawImg(ctx: CanvasRenderingContext2D): void;
78
+ initDrawImg(ctx: CanvasRenderingContext2D): void;
79
+ calcAnchors(): void;
80
+ calcRotateAnchors(angle?: number): void;
81
+ getTextRect(): Rect;
82
+ getIconRect(): Rect;
83
+ calcRectByParent(parent: Pen): void;
84
+ calcChildrenRect(): void;
85
+ calcRectInParent(parent: Pen): void;
86
+ getDockWatchers(): void;
87
+ initAnimateProps(): void;
88
+ animate(now: number): void;
89
+ scale(scale: number, center?: Point): void;
90
+ scalePoints(scaleX?: number, scaleY?: number): void;
91
+ translate(x: number, y: number): void;
92
+ initRect(): void;
93
+ round(): void;
94
+ clone(): Node;
95
+ }