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 +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AC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC;oBAClE,GAAG,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;iBACjC;gBACD,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC/C,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,CAAC,CAAC,GAAG,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;gBACnD,GAAG,CAAC,OAAO,EAAE,CAAC;aACf;SACF;QAED,GAAG,CAAC,OAAO,EAAE,CAAC;IAChB,CAAC;IAED,qCAAe,GAAf;QACE,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;YAC1B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;YACjD,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;YACpD,OAAO;SACR;QAED,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YACd,OAAO;SACR;QACD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACzC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;IACH,kBAAC;AAAD,CAAC,AA3lBD,CAAiC,KAAK,GA2lBrC"}
@@ -0,0 +1,23 @@
1
+ import { Pen } from './models/pen';
2
+ import { Line } from './models/line';
3
+ import { TopologyData } from './models/data';
4
+ import { Options } from './options';
5
+ import { Layer } from './layer';
6
+ export declare class AnimateLayer extends Layer {
7
+ options: Options;
8
+ protected data: TopologyData;
9
+ pens: Map<any, any>;
10
+ private timer;
11
+ private lastNow;
12
+ private subscribeUpdate;
13
+ private subscribePlay;
14
+ constructor(options: Options, TID: String);
15
+ getAnimateLine(item: Pen): Line;
16
+ findLine(pen: Pen): Pen;
17
+ readyPlay(tag?: string, auto?: boolean, pens?: Pen[]): void;
18
+ animate(): void;
19
+ updateLines(lines: Line[]): void;
20
+ render(ctx: CanvasRenderingContext2D): void;
21
+ stop(): void;
22
+ destroy(): void;
23
+ }
@@ -0,0 +1,227 @@
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 { Store } from 'le5le-store';
15
+ import { PenType } from './models/pen';
16
+ import { Node } from './models/node';
17
+ import { Line } from './models/line';
18
+ import { Layer } from './layer';
19
+ import { s8 } from './utils';
20
+ var AnimateLayer = /** @class */ (function (_super) {
21
+ __extends(AnimateLayer, _super);
22
+ function AnimateLayer(options, TID) {
23
+ if (options === void 0) { options = {}; }
24
+ var _this = _super.call(this, TID) || this;
25
+ _this.options = options;
26
+ _this.pens = new Map();
27
+ _this.lastNow = 0;
28
+ _this.data = Store.get(_this.generateStoreKey('topology-data'));
29
+ Store.set(_this.generateStoreKey('LT:AnimateLayer'), _this);
30
+ if (!_this.options.animateColor) {
31
+ _this.options.animateColor = '#ff6600';
32
+ }
33
+ _this.subscribeUpdate = Store.subscribe(_this.generateStoreKey('LT:updateLines'), function (lines) {
34
+ _this.updateLines(lines);
35
+ });
36
+ _this.subscribePlay = Store.subscribe(_this.generateStoreKey('LT:AnimatePlay'), function (params) {
37
+ _this.readyPlay(params.tag, false);
38
+ _this.animate();
39
+ });
40
+ return _this;
41
+ }
42
+ AnimateLayer.prototype.getAnimateLine = function (item) {
43
+ var l = new Line(item);
44
+ l.data = l.id;
45
+ l.id = s8();
46
+ l.setTID(this.TID);
47
+ l.isAnimate = true;
48
+ l.toArrow = '';
49
+ if (l.fromArrow && l.fromArrow.indexOf('line') < 0) {
50
+ l.animateFromSize = l.fromArrowSize + l.lineWidth * 5;
51
+ }
52
+ if (l.toArrow && l.toArrow.indexOf('line') < 0) {
53
+ l.animateToSize = l.toArrowSize + l.lineWidth * 5;
54
+ }
55
+ l.animateStart = item.animateStart;
56
+ l.lineCap = 'round';
57
+ l.fillStyle = '#fff';
58
+ l.strokeStyle = l.animateColor || this.options.animateColor;
59
+ l.length = l.getLen();
60
+ if (!l.fromArrowColor) {
61
+ l.fromArrowColor = l.strokeStyle || '#222';
62
+ }
63
+ if (!l.toArrowColor) {
64
+ l.toArrowColor = l.strokeStyle || '#222';
65
+ }
66
+ return l;
67
+ };
68
+ AnimateLayer.prototype.findLine = function (pen) {
69
+ for (var _i = 0, _a = this.data.pens; _i < _a.length; _i++) {
70
+ var item = _a[_i];
71
+ if (item.id === pen.data) {
72
+ return item;
73
+ }
74
+ }
75
+ };
76
+ AnimateLayer.prototype.readyPlay = function (tag, auto, pens) {
77
+ var _this = this;
78
+ var readyPens = new Map();
79
+ if (!pens) {
80
+ pens = this.data.pens;
81
+ }
82
+ pens.forEach(function (pen) {
83
+ pen.setTID(_this.TID);
84
+ if (!pen.visible || readyPens.get(pen.id)) {
85
+ return;
86
+ }
87
+ if(!pen.animatePlay) {
88
+ _this.stop();
89
+ return;
90
+ }
91
+ if ((auto && pen.animatePlay) || (tag && pen.tags.indexOf(tag) > -1)) {
92
+ if (!pen.animateStart || pen.animateStart < 1) {
93
+ pen.animateStart = Date.now();
94
+ }
95
+ }
96
+ if (pen instanceof Node) {
97
+ if (pen.animateStart > 0) {
98
+ pen.initAnimateProps();
99
+ readyPens.set(pen.id, pen);
100
+ }
101
+ if (pen.children && pen.children.length) {
102
+ _this.readyPlay(tag, auto, pen.children);
103
+ }
104
+ }
105
+ else {
106
+ if (pen.animateStart > 0) {
107
+ readyPens.set(pen.id, _this.getAnimateLine(pen));
108
+ }
109
+ else if (_this.pens.has(pen.id)) {
110
+ _this.pens.get(pen.id).animateStart = 0;
111
+ }
112
+ }
113
+ });
114
+ readyPens.forEach(function (pen) {
115
+ if (pen.type) {
116
+ _this.pens.set(pen.data, pen);
117
+ }
118
+ else {
119
+ _this.pens.set(pen.id, pen);
120
+ }
121
+ });
122
+ };
123
+ AnimateLayer.prototype.animate = function () {
124
+ var _this = this;
125
+ if (this.timer) {
126
+ cancelAnimationFrame(this.timer);
127
+ }
128
+ this.timer = requestAnimationFrame(function () {
129
+ var now = Date.now();
130
+ if (now - _this.lastNow < 30) {
131
+ _this.animate();
132
+ return;
133
+ }
134
+ _this.lastNow = now;
135
+ var animated = false;
136
+ _this.pens.forEach(function (pen) {
137
+ if (!pen.animateStart || pen.animateStart < 1) {
138
+ if (pen.type) {
139
+ _this.pens.delete(pen.data);
140
+ }
141
+ else {
142
+ _this.pens.delete(pen.id);
143
+ }
144
+ return;
145
+ }
146
+ if (pen.animateStart > now) {
147
+ return;
148
+ }
149
+ if (pen.animateFn) {
150
+ if (typeof pen.animateFn === 'function') {
151
+ pen.animateFn();
152
+ }
153
+ else if (window[pen.animateFn]) {
154
+ window[pen.animateFn]();
155
+ }
156
+ else {
157
+ // pen.render();
158
+ }
159
+ }
160
+ else {
161
+ pen.animate(now);
162
+ }
163
+ if (pen.animateStart < 1) {
164
+ if (pen.type) {
165
+ _this.pens.delete(pen.data);
166
+ }
167
+ else {
168
+ _this.pens.delete(pen.id);
169
+ }
170
+ if (pen.type === PenType.Line) {
171
+ var line = _this.findLine(pen);
172
+ line && (line.animateStart = 0);
173
+ }
174
+ if (pen.nextAnimate) {
175
+ _this.readyPlay(pen.nextAnimate, false);
176
+ }
177
+ }
178
+ animated = true;
179
+ });
180
+ if (animated) {
181
+ Store.set(_this.generateStoreKey('LT:render'), true);
182
+ _this.animate();
183
+ }
184
+ });
185
+ };
186
+ AnimateLayer.prototype.updateLines = function (lines) {
187
+ this.pens.forEach(function (line, key) {
188
+ if (!(line instanceof Line)) {
189
+ return;
190
+ }
191
+ for (var _i = 0, lines_1 = lines; _i < lines_1.length; _i++) {
192
+ var item = lines_1[_i];
193
+ if (line.id === item.id) {
194
+ line.from = item.from;
195
+ line.to = item.to;
196
+ line.controlPoints = item.controlPoints;
197
+ line.length = line.getLen();
198
+ }
199
+ }
200
+ });
201
+ };
202
+ AnimateLayer.prototype.render = function (ctx) {
203
+ var _this = this;
204
+ this.pens.forEach(function (line, key) {
205
+ if (line.visible && line instanceof Line) {
206
+ if (!line.getTID()) {
207
+ line.setTID(_this.TID);
208
+ }
209
+ line.render(ctx);
210
+ }
211
+ });
212
+ };
213
+ AnimateLayer.prototype.stop = function () {
214
+ if (this.timer) {
215
+ cancelAnimationFrame(this.timer);
216
+ }
217
+ this.pens.clear();
218
+ };
219
+ AnimateLayer.prototype.destroy = function () {
220
+ this.stop();
221
+ this.subscribeUpdate.unsubscribe();
222
+ this.subscribePlay.unsubscribe();
223
+ };
224
+ return AnimateLayer;
225
+ }(Layer));
226
+ export { AnimateLayer };
227
+ //# sourceMappingURL=animateLayer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animateLayer.js","sourceRoot":"","sources":["../../../packages/core/src/animateLayer.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAO,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,C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H,CAAC,CAAC,CAAC;IACL,CAAC;IAED,2BAAI,GAAJ;QACE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAClC;IACH,CAAC;IAED,8BAAO,GAAP;QACE,IAAI,CAAC,IAAI,EAAE,CAAC;QACZ,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC;QACnC,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,CAAC;IACnC,CAAC;IACH,mBAAC;AAAD,CAAC,AAnND,CAAkC,KAAK,GAmNtC"}
@@ -0,0 +1,37 @@
1
+ // @ts-ignore
2
+ import {Options, Padding} from './options';
3
+ import { Offscreen } from './offscreen';
4
+ import { RenderLayer } from './renderLayer';
5
+ import { Pen, Node, Point, TopologyData, Rect } from './models';
6
+ export declare class Calling {
7
+ id: String;
8
+ data: TopologyData;
9
+ options: Options;
10
+ parentElem: HTMLElement;
11
+ canvas: RenderLayer;
12
+ offscreen: Offscreen;
13
+ private subcribeImage;
14
+ lastTranlated: {
15
+ x: number;
16
+ y: number;
17
+ };
18
+ private rendering;
19
+ constructor(parent: string | HTMLElement, options?: Options);
20
+ winResize: () => void;
21
+ render(noFocus?: boolean): this;
22
+ open(data?: any): void;
23
+ overflow(): Rect;
24
+ getRect(pens?: Pen[]): Rect;
25
+ bottom(pen: Pen): void;
26
+ translate(x: number, y: number, process?: boolean): void;
27
+ scale(scale: number, center?: Point): void;
28
+ centerView(padding?: Padding): boolean;
29
+ fitView(viewPadding?: Padding): void;
30
+ hasView(): boolean;
31
+ getViewCenter(viewPadding?: Padding): {
32
+ x: number;
33
+ y: number;
34
+ };
35
+ destroy(): void;
36
+ }
37
+ export {};
@@ -0,0 +1,253 @@
1
+ import {Store} from 'le5le-store';
2
+ import {DefalutOptions} from './options';
3
+ import {Offscreen} from './offscreen';
4
+ import {RenderLayer} from './renderLayer';
5
+ import {Node, Point, TopologyData, Rect} from './models';
6
+ import {s8, getRect, formatPadding} from './utils';
7
+ var Calling = (function () {
8
+ function Calling(parent, options) {
9
+ var _this = this;
10
+ this.data = new TopologyData();
11
+ this.lastTranlated = {x: 0, y: 0};
12
+ this.rendering = false;
13
+ this.id = s8();
14
+ Store.set(this.generateStoreKey('topology-data'), this.data);
15
+ if (!options) {
16
+ options = {};
17
+ }
18
+ var font = Object.assign({}, DefalutOptions.font, options.font);
19
+ options.font = font;
20
+ this.options = Object.assign({}, DefalutOptions, options);
21
+ if (typeof parent === 'string') {
22
+ this.parentElem = document.getElementById(parent);
23
+ } else {
24
+ this.parentElem = parent;
25
+ }
26
+ this.parentElem.style.position = 'relative';
27
+ this.parentElem.style.overflow = 'auto';
28
+ var id = this.id;
29
+ this.offscreen = new Offscreen(this.parentElem, this.options, id);
30
+ this.canvas = new RenderLayer(this.parentElem, this.options, id);
31
+ this.subcribeImage = Store.subscribe(this.generateStoreKey('LT:imageLoaded'), function () {
32
+ if (_this.imageTimer) {
33
+ clearTimeout(_this.imageTimer);
34
+ }
35
+ _this.imageTimer = setTimeout(function () {
36
+ _this.render();
37
+ }, 100);
38
+ });
39
+ }
40
+ Calling.prototype.s8 = function () {
41
+ return s8()
42
+ };
43
+ Calling.prototype.resize = function (size) {
44
+ this.canvas.resize(size);
45
+ this.canvas.bkImgRectResize(size);
46
+ this.offscreen.resize(size);
47
+ };
48
+ // Render or redraw
49
+ Calling.prototype.render = function (noFocus) {
50
+ if (noFocus === void 0) {
51
+ noFocus = false;
52
+ }
53
+ if (this.rendering) {
54
+ return this;
55
+ }
56
+ this.rendering = true;
57
+ this.offscreen.render();
58
+ this.canvas.render();
59
+ this.rendering = false;
60
+ };
61
+ // open - redraw by the data
62
+ Calling.prototype.open = function (topoJSon) {
63
+ let data = JSON.parse(JSON.stringify(topoJSon));
64
+ if (!data) {
65
+ data = {pens: []};
66
+ }
67
+ if (typeof data === 'string') {
68
+ data = JSON.parse(data);
69
+ }
70
+ this.openCount = 0
71
+ this.data.scale = data.scale || 1;
72
+ this.data.pens = [];
73
+ // for old data.
74
+ if (data.nodes) {
75
+ for (var _i = 0, _a = data.nodes; _i < _a.length; _i++) {
76
+ var item = _a[_i];
77
+ item.rect.x = 0;
78
+ item.rect.y = 0;
79
+ this.data.pens.push(new Node(item));
80
+ }
81
+ for (var _b = 0, _c = data.lines; _b < _c.length; _b++) {
82
+ var item = _c[_b];
83
+ this.data.pens.push(new Line(item));
84
+ }
85
+ }
86
+ // end.
87
+ if (data.pens) {
88
+ for (var _d = 0, _e = data.pens; _d < _e.length; _d++) {
89
+ var item = _e[_d];
90
+ if (!item.from) {
91
+ this.data.pens.push(new Node(item));
92
+ } else {
93
+ this.data.pens.push(new Line(item));
94
+ }
95
+ }
96
+ }
97
+ this.data.bkImageRect = data.bkImageRect || null;
98
+ this.data.bkImage = data.bkImage || '';
99
+ this.data.mqttOptions = data.mqttOptions || {clientId: s8()};
100
+ this.data.mqttTopics = data.mqttTopics || '';
101
+ if (typeof data.data === 'object') {
102
+ this.data.data = data.data;
103
+ } else {
104
+ this.data.data = data.data || '';
105
+ }
106
+ this.parentElem.scrollLeft = 0;
107
+ this.parentElem.scrollTop = 0;
108
+ this.overflow();
109
+ this.render(true);
110
+ };
111
+ Calling.prototype.overflow = function () {
112
+ this.options.isFitview ? this.fitView() : this.bottomView();
113
+ };
114
+ Calling.prototype.getRect = function (pens) {
115
+ if (!pens) {
116
+ pens = this.data.pens;
117
+ }
118
+ return getRect(pens);
119
+ };
120
+ Calling.prototype.translate = function (x, y) {
121
+ if (!process) {
122
+ this.lastTranlated.x = 0;
123
+ this.lastTranlated.y = 0;
124
+ }
125
+ var offsetX = x - this.lastTranlated.x;
126
+ var offsetY = y - this.lastTranlated.y;
127
+ for (var _i = 0, _a = this.data.pens; _i < _a.length; _i++) {
128
+ var item = _a[_i];
129
+ item.translate(offsetX, offsetY);
130
+ }
131
+ this.lastTranlated.x = x;
132
+ this.lastTranlated.y = y;
133
+ };
134
+ // scale for scaled canvas:
135
+ // > 1, expand
136
+ // < 1, reduce
137
+ Calling.prototype.scale = function (scale, center, w, h) {
138
+ if (this.data.scale * scale < this.options.minScale ||
139
+ this.data.scale * scale > this.options.maxScale) {
140
+ return;
141
+ }
142
+ this.data.scale *= scale;
143
+ !center && (center = this.getRect().center);
144
+ for (var _i = 0, _a = this.data.pens; _i < _a.length; _i++) {
145
+ var item = _a[_i];
146
+ item.scale(scale, center, w, h);
147
+ }
148
+ };
149
+ Calling.prototype.bottomView = function (padding) {
150
+ var rect = this.getRect();
151
+ var viewCenter = this.getViewCenter(padding);
152
+ var center = rect.center;
153
+ var parentElem = this.canvas.parentElem;
154
+ var x = (parentElem.offsetWidth - rect.width) / 2;
155
+ var y = parentElem.scrollHeight - rect.height;
156
+ var w = parentElem.offsetWidth / rect.width;
157
+ var h = parentElem.scrollHeight / rect.height;
158
+ var ratio = w;
159
+ if (w > h) {
160
+ ratio = h;
161
+ }
162
+ this.canvas.canvas.style.transform = `translate(${x}px, ${y}px)`;
163
+ for (var _i = 0, _a = this.data.pens; _i < _a.length; _i++) {
164
+ var item = _a[_i];
165
+ if(item.rect.x > 0) {
166
+ item.rect.ex = item.rect.ex - item.rect.x;
167
+ item.rect.x = 0;
168
+ }
169
+ if(item.rect.y > 0) {
170
+ item.rect.ey = item.rect.ey - item.rect.y;
171
+ item.rect.y = 0;
172
+ }
173
+ }
174
+ this.scale(ratio);
175
+ this.resize({width: rect.width, height: rect.height});
176
+ };
177
+ Calling.prototype.centerView = function (padding) {
178
+ if (!this.hasView())
179
+ return;
180
+ var rect = this.getRect();
181
+ var viewCenter = this.getViewCenter(padding);
182
+ var center = rect.center;
183
+ this.translate(viewCenter.x - center.x, viewCenter.y - center.y);
184
+ var parentElem = this.canvas.parentElem;
185
+ var x = (parentElem.scrollWidth - parentElem.offsetWidth) / 2;
186
+ var y = (parentElem.scrollHeight - parentElem.offsetHeight) / 2;
187
+ parentElem.scrollTo(x, y);
188
+ return true;
189
+ };
190
+ Calling.prototype.fitView = function (viewPadding) {
191
+ if (!this.hasView())
192
+ return;
193
+ // 1. 重置画布尺寸为容器尺寸
194
+ var parentElem = this.canvas.parentElem;
195
+ var width = parentElem.offsetWidth, height = parentElem.offsetHeight;
196
+ this.resize({
197
+ width: width,
198
+ height: height,
199
+ });
200
+ // 2. 图形居中
201
+ this.centerView(viewPadding);
202
+ // 3. 获取设置的留白值
203
+ var padding = formatPadding(viewPadding || this.options.viewPadding);
204
+ // 4. 获取图形尺寸
205
+ var rect = this.getRect();
206
+ // 6. 计算缩放比
207
+ var w = (width - padding[1] - padding[3]) / rect.width;
208
+ var h = (height - padding[0] - padding[2]) / rect.height;
209
+ var ratio = w;
210
+ if (w > h) {
211
+ ratio = h;
212
+ }
213
+ this.scale(ratio);
214
+ };
215
+ Calling.prototype.hasView = function () {
216
+ var rect = this.getRect();
217
+ return !(rect.width === 99999 || rect.height === 99999);
218
+ };
219
+ Calling.prototype.getViewCenter = function (viewPadding) {
220
+ var padding = formatPadding(viewPadding || this.options.viewPadding);
221
+ var _a = this.canvas, width = _a.width, height = _a.height;
222
+ return {
223
+ x: (width - padding[1] - padding[3]) / 2 + padding[3],
224
+ y: (height - padding[0] - padding[2]) / 2 + padding[0],
225
+ };
226
+ };
227
+ Calling.prototype.generateStoreKey = function (key) {
228
+ return this.id + "-" + key;
229
+ };
230
+ Calling.prototype.destroy = function () {
231
+ this.subcribeImage.unsubscribe();
232
+ this.canvas.destroy();
233
+ //优化
234
+ Object.keys(this).forEach((item) => {
235
+
236
+
237
+ if (typeof (item) === Object) {
238
+
239
+ Object.keys(item).foreach((i) => {
240
+
241
+ item[i] = null;
242
+ })
243
+ }
244
+
245
+ this[item] = null;
246
+
247
+ })
248
+ };
249
+ return Calling;
250
+ }());
251
+
252
+ export {Calling};
253
+ //# sourceMappingURL=core.js.map
@@ -0,0 +1,19 @@
1
+ import { TopologyData } from './models/data';
2
+ import { Options } from './options';
3
+ import { Layer } from './layer';
4
+ export declare class Canvas extends Layer {
5
+ parentElem: HTMLElement;
6
+ options: Options;
7
+ static dpiRatio: number;
8
+ protected data: TopologyData;
9
+ canvas: HTMLCanvasElement;
10
+ width: number;
11
+ height: number;
12
+ constructor(parentElem: HTMLElement, options: Options, TID: String);
13
+ resize(size?: {
14
+ width: number;
15
+ height: number;
16
+ }): void;
17
+ render(): void;
18
+ getDpiRatio(): number;
19
+ }