@mx-sose-front/mx-sose-graph 1.1.8 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/dist/assets/edgeWorker-b57ca007.js +2 -0
  2. package/dist/assets/edgeWorker-b57ca007.js.map +1 -0
  3. package/dist/index.d.ts +994 -31
  4. package/dist/index.esm.js +9541 -5145
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/index.umd.js +1 -1
  7. package/dist/index.umd.js.map +1 -1
  8. package/dist/style.css +1 -1
  9. package/package.json +1 -1
  10. package/src/components/Common/Tree.vue +451 -0
  11. package/src/components/Common/index.ts +2 -0
  12. package/src/components/DiagramListTooltip/DiagramListTooltip.vue +1 -2
  13. package/src/components/Edge/Edge.vue +172 -169
  14. package/src/components/Gantt/Gantt.vue +1544 -0
  15. package/src/components/GanttContextMenu/GanttContextMenu.vue +304 -0
  16. package/src/components/InteractionLayer.vue +343 -147
  17. package/src/components/Matrix/Matrix.vue +808 -0
  18. package/src/components/Matrix/index.ts +168 -0
  19. package/src/components/Shape/ConceptualRole.vue +2 -34
  20. package/src/components/Table/Table.vue +1193 -0
  21. package/src/constants/edgeShapeKeys.ts +8 -5
  22. package/src/constants/index.ts +279 -51
  23. package/src/hooks/index.ts +2 -0
  24. package/src/hooks/useChartRowSelection.ts +456 -0
  25. package/src/hooks/useResize.ts +2 -2
  26. package/src/hooks/useVirtualScroll.ts +258 -0
  27. package/src/index.ts +1 -1
  28. package/src/render/shape-renderer.ts +62 -2
  29. package/src/statics/icons/childIcons/AV-1/346/246/202/350/277/260/344/270/216/346/221/230/350/246/201/344/277/241/346/201/257/345/214/205@3x.png +0 -0
  30. package/src/statics/icons/childIcons/AV-1/346/246/202/350/277/260/346/221/230/350/246/201/345/233/276@3x.png +0 -0
  31. package/src/statics/icons/childIcons/AV-2/351/233/206/346/210/220/345/255/227/345/205/270/345/214/205@3x.png +0 -0
  32. package/src/statics/icons/childIcons/AV-2/351/233/206/346/210/220/345/255/227/345/205/270/350/241/250@3x.png +0 -0
  33. package/src/statics/icons/childIcons/CV-1/346/204/277/346/231/257/345/214/205@3x.png +0 -0
  34. package/src/statics/icons/childIcons/CV-1/346/204/277/346/231/257/345/233/276@3x.png +0 -0
  35. package/src/statics/icons/childIcons/CV-2/350/203/275/345/212/233/345/210/206/347/261/273/345/214/205@3x.png +0 -0
  36. package/src/statics/icons/childIcons/CV-2/350/203/275/345/212/233/345/210/206/347/261/273/345/233/276@3x-2.png +0 -0
  37. package/src/statics/icons/childIcons/CV-2/350/203/275/345/212/233/345/210/206/347/261/273/345/233/276@3x-3.png +0 -0
  38. package/src/statics/icons/childIcons/CV-2/350/203/275/345/212/233/345/210/206/347/261/273/345/233/276@3x.png +0 -0
  39. package/src/statics/icons/childIcons/CV-3/350/203/275/345/212/233/345/210/206/346/256/265/345/214/205@3x.png +0 -0
  40. package/src/statics/icons/childIcons/CV-3/350/203/275/345/212/233/351/230/266/346/256/265/347/224/230/347/211/271/345/233/276@3x.png +0 -0
  41. package/src/statics/icons/childIcons/CV-4/350/203/275/345/212/233/344/276/235/350/265/226/345/214/205@3x.png +0 -0
  42. package/src/statics/icons/childIcons/CV-4/350/203/275/345/212/233/344/276/235/350/265/226/345/233/276@3x.png +0 -0
  43. package/src/statics/icons/childIcons/CV-5/350/203/275/345/212/233/345/210/260/347/273/204/347/273/207/347/232/204/345/274/200/345/217/221/346/230/240/345/260/204/345/214/205@3x.png +0 -0
  44. package/src/statics/icons/childIcons/CV-5/350/203/275/345/212/233/345/210/260/347/273/204/347/273/207/347/232/204/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
  45. package/src/statics/icons/childIcons/CV-6/350/203/275/345/212/233/345/210/260/344/270/232/345/212/241/346/264/273/345/212/250/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
  46. package/src/statics/icons/childIcons/CV-6/350/203/275/345/212/233/345/210/260/344/275/234/346/210/230/346/264/273/345/212/250/347/232/204/346/230/240/345/260/204/345/214/205@3x.png +0 -0
  47. package/src/statics/icons/childIcons/CV-7/350/203/275/345/212/233/345/210/260/346/234/215/345/212/241/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
  48. package/src/statics/icons/childIcons/CV-7/350/203/275/345/212/233/345/210/260/346/234/215/345/212/241/347/232/204/346/230/240/345/260/204/345/214/205@3x.png +0 -0
  49. package/src/statics/icons/childIcons/DIV-1/346/246/202/345/277/265/346/225/260/346/215/256/346/250/241/345/236/213/345/214/205@3x.png +0 -0
  50. package/src/statics/icons/childIcons/DIV-1/346/246/202/345/277/265/346/225/260/346/215/256/346/250/241/345/236/213/345/233/276@3x.png +0 -0
  51. package/src/statics/icons/childIcons/DIV-2/351/200/273/350/276/221/346/225/260/346/215/256/346/250/241/345/236/213/345/214/205@3x.png +0 -0
  52. package/src/statics/icons/childIcons/DIV-2/351/200/273/350/276/221/346/225/260/346/215/256/346/250/241/345/236/213/345/233/276@3x.png +0 -0
  53. package/src/statics/icons/childIcons/DIV-3/347/211/251/347/220/206/346/225/260/346/215/256/346/250/241/345/236/213/345/214/205@3x.png +0 -0
  54. package/src/statics/icons/childIcons/OV-1/350/207/252/347/224/261/345/210/206/347/261/273/345/233/276@3x.png +0 -0
  55. package/src/statics/icons/childIcons/OV-1/351/253/230/347/272/247/344/275/234/346/210/230/346/246/202/345/277/265/345/233/276@3x.png +0 -0
  56. package/src/statics/icons/childIcons/OV-1/351/253/230/347/272/247/344/275/234/346/210/230/346/246/202/345/277/265/345/233/276/345/214/205@3x.png +0 -0
  57. package/src/statics/icons/childIcons/OV-2/344/275/234/346/210/230/350/265/204/346/272/220/346/265/201/345/206/205/351/203/250/346/217/217/350/277/260/345/233/276@3x-2.png +0 -0
  58. package/src/statics/icons/childIcons/OV-2/344/275/234/346/210/230/350/265/204/346/272/220/346/265/201/345/206/205/351/203/250/346/217/217/350/277/260/345/233/276@3x.png +0 -0
  59. package/src/statics/icons/childIcons/OV-2/344/275/234/346/210/230/350/265/204/346/272/220/346/265/201/346/217/217/350/277/260/345/214/205@3x.png +0 -0
  60. package/src/statics/icons/childIcons/OV-2/344/275/234/346/210/230/350/265/204/346/272/220/346/265/201/346/217/217/350/277/260/345/233/276@3x.png +0 -0
  61. package/src/statics/icons/childIcons/OV-3/344/275/234/346/210/230/350/265/204/346/272/220/346/265/201/347/237/251/351/230/265@3x.png +0 -0
  62. package/src/statics/icons/childIcons/OV-3/344/275/234/346/210/230/350/265/204/346/272/220/346/265/201/347/237/251/351/230/265/345/214/205@3x.png +0 -0
  63. package/src/statics/icons/childIcons/OV-3/345/237/272/347/241/200/350/247/222/350/211/262/344/275/234/346/210/230/350/265/204/346/272/220/346/265/201/347/237/251/351/230/265@3x.png +0 -0
  64. package/src/statics/icons/childIcons/OV-4/347/273/204/347/273/207/345/205/263/347/263/273/345/233/276@3x.png +0 -0
  65. package/src/statics/icons/childIcons/OV-4/347/273/204/347/273/207/345/205/263/347/263/273/345/233/276/345/214/205@3x.png +0 -0
  66. package/src/statics/icons/childIcons/OV-5a/344/275/234/346/210/230/346/264/273/345/212/250/345/210/206/350/247/243/346/240/221/345/214/205@3x.png +0 -0
  67. package/src/statics/icons/childIcons/OV-5a/344/275/234/346/210/230/346/264/273/345/212/250/345/210/206/350/247/243/346/240/221/345/233/276@3x.png +0 -0
  68. package/src/statics/icons/childIcons/OV-5b/344/275/234/346/210/230/346/264/273/345/212/250/346/250/241/345/236/213/345/214/205@3x.png +0 -0
  69. package/src/statics/icons/childIcons/OV-5b/344/275/234/346/210/230/346/264/273/345/212/250/346/250/241/345/236/213/345/233/276@3x.png +0 -0
  70. package/src/statics/icons/childIcons/OV-6a/344/275/234/346/210/230/350/247/204/345/210/231/346/250/241/345/236/213/345/214/205@3x.png +0 -0
  71. package/src/statics/icons/childIcons/OV-6a/344/275/234/346/210/230/350/265/204/346/272/220/345/217/202/346/225/260/345/233/276@3x.png +0 -0
  72. package/src/statics/icons/childIcons/OV-6b/347/212/266/346/200/201/350/275/254/346/215/242/345/233/276@3x.png +0 -0
  73. package/src/statics/icons/childIcons/OV-6b/347/212/266/346/200/201/350/275/254/346/215/242/346/250/241/345/236/213/345/214/205@3x.png +0 -0
  74. package/src/statics/icons/childIcons/OV-6c/344/272/213/344/273/266/350/277/275/350/270/252/346/217/217/350/277/260/345/214/205@3x.png +0 -0
  75. package/src/statics/icons/childIcons/OV-6c/344/275/234/346/210/230/344/272/213/344/273/266/350/267/237/350/270/252/346/217/217/350/277/260/345/233/276@3x.png +0 -0
  76. package/src/statics/icons/childIcons/PV-1/351/241/271/347/233/256/347/273/204/345/220/210/345/205/263/347/263/273/345/214/205@3x.png +0 -0
  77. package/src/statics/icons/childIcons/PV-1/351/241/271/347/233/256/347/273/204/345/220/210/345/205/263/347/263/273/345/233/276@3x.png +0 -0
  78. package/src/statics/icons/childIcons/PV-2/351/241/271/347/233/256/346/227/266/351/227/264/350/277/233/345/272/246/345/214/205@3x.png +0 -0
  79. package/src/statics/icons/childIcons/PV-2/351/241/271/347/233/256/346/227/266/351/227/264/350/277/233/345/272/246/347/224/230/347/211/271/345/233/276@3x.png +0 -0
  80. package/src/statics/icons/childIcons/PV-3/351/241/271/347/233/256/344/270/216/350/203/275/345/212/233/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
  81. package/src/statics/icons/childIcons/PV-3/351/241/271/347/233/256/344/270/216/350/203/275/345/212/233/347/232/204/346/230/240/345/260/204/345/214/205@3x.png +0 -0
  82. package/src/statics/icons/childIcons/SV-1 /347/263/273/347/273/237/346/216/245/345/217/243/345/206/205/351/203/250/346/217/217/350/277/260/345/233/276@3x.png +0 -0
  83. package/src/statics/icons/childIcons/SV-1 /347/263/273/347/273/237/346/216/245/345/217/243/346/217/217/350/277/260/345/233/276@3x.png +0 -0
  84. package/src/statics/icons/childIcons/SV-10a /347/263/273/347/273/237/345/217/202/346/225/260/345/233/276@3x.png +0 -0
  85. package/src/statics/icons/childIcons/SV-10a /347/263/273/347/273/237/350/247/204/345/210/231/346/250/241/345/236/213/350/241/250@3x.png +0 -0
  86. package/src/statics/icons/childIcons/SV-10a/347/263/273/347/273/237/350/247/204/345/210/231/346/250/241/345/236/213/345/214/205@3x.png +0 -0
  87. package/src/statics/icons/childIcons/SV-10b /347/263/273/347/273/237/347/212/266/346/200/201/350/275/254/346/215/242/346/217/217/350/277/260/345/233/276@3x.png +0 -0
  88. package/src/statics/icons/childIcons/SV-10b/347/263/273/347/273/237/347/212/266/346/200/201/350/275/254/346/215/242/346/217/217/350/277/260/345/214/205@3x.png +0 -0
  89. package/src/statics/icons/childIcons/SV-10c /347/263/273/347/273/237/344/272/213/344/273/266/350/267/237/350/270/252/346/217/217/350/277/260/345/233/276@3x.png +0 -0
  90. package/src/statics/icons/childIcons/SV-10c/347/263/273/347/273/237/344/272/213/344/273/266-/350/277/275/350/270/252/346/217/217/350/277/260/345/214/205@3x.png +0 -0
  91. package/src/statics/icons/childIcons/SV-1/347/263/273/347/273/237/346/216/245/345/217/243/346/217/217/350/277/260/345/214/205@3x.png +0 -0
  92. package/src/statics/icons/childIcons/SV-2 /347/263/273/347/273/237/345/206/205/351/203/250/350/265/204/346/272/220/346/265/201/345/212/250/346/217/217/350/277/260/345/233/276@3x.png +0 -0
  93. package/src/statics/icons/childIcons/SV-2 /347/263/273/347/273/237/350/265/204/346/272/220/346/265/201/345/212/250/346/217/217/350/277/260/345/233/276@3x.png +0 -0
  94. package/src/statics/icons/childIcons/SV-2/347/263/273/347/273/237/350/265/204/346/272/220/346/265/201/346/217/217/350/277/260/345/214/205@3x.png +0 -0
  95. package/src/statics/icons/childIcons/SV-3 /347/263/273/347/273/237 - /347/263/273/347/273/237/347/237/251/351/230/265@3x.png +0 -0
  96. package/src/statics/icons/childIcons/SV-3/347/263/273/347/273/237-/347/263/273/347/273/237/347/237/251/351/230/265/345/214/205@3x.png +0 -0
  97. package/src/statics/icons/childIcons/SV-4 /347/263/273/347/273/237/345/212/237/350/203/275/346/217/217/350/277/260/345/233/276@3x.png +0 -0
  98. package/src/statics/icons/childIcons/SV-4 /347/263/273/347/273/237/345/212/237/350/203/275/346/265/201/347/250/213/346/217/217/350/277/260/345/233/276@3x.png +0 -0
  99. package/src/statics/icons/childIcons/SV-4/347/263/273/347/273/237/345/212/237/350/203/275/346/217/217/350/277/260/345/214/205@3x.png +0 -0
  100. package/src/statics/icons/childIcons/SV-5a /344/270/232/345/212/241/346/264/273/345/212/250/345/210/260/347/263/273/347/273/237/345/212/237/350/203/275/347/232/204/345/217/257/350/277/275/346/272/257/346/200/247/347/237/251/351/230/265@3x.png +0 -0
  101. package/src/statics/icons/childIcons/SV-5a/344/275/234/346/210/230/346/264/273/345/212/250/345/210/260/347/263/273/347/273/237/345/212/237/350/203/275/345/217/257/350/277/275/350/270/252/347/237/251/351/230/265/345/214/205@3x.png +0 -0
  102. package/src/statics/icons/childIcons/SV-5b /344/270/232/345/212/241/346/264/273/345/212/250/345/210/260/347/263/273/347/273/237/347/232/204/345/217/257/350/277/275/346/272/257/346/200/247/347/237/251/351/230/265@3x.png +0 -0
  103. package/src/statics/icons/childIcons/SV-5b/344/275/234/346/210/230/346/264/273/345/212/250/345/210/260/347/263/273/347/273/237/345/217/257/350/277/275/350/270/252/347/237/251/351/230/265/345/214/205@3x.png +0 -0
  104. package/src/statics/icons/childIcons/SV-6 /347/263/273/347/273/237/350/265/204/346/272/220/346/265/201/345/212/250/347/237/251/351/230/265@3x.png +0 -0
  105. package/src/statics/icons/childIcons/SV-6/347/263/273/347/273/237/350/265/204/346/272/220/346/265/201/347/237/251/351/230/265/345/214/205@3x.png +0 -0
  106. package/src/statics/icons/childIcons/SV-7 /347/263/273/347/273/237/345/256/236/351/231/205/345/272/246/351/207/217/347/237/251/351/230/265@3x.png +0 -0
  107. package/src/statics/icons/childIcons/SV-7/347/263/273/347/273/237/345/272/246/351/207/217/347/237/251/351/230/265/345/214/205@3x.png +0 -0
  108. package/src/statics/icons/childIcons/SV-8 /347/263/273/347/273/237/346/274/224/350/277/233/346/217/217/350/277/260/347/224/230/347/211/271/345/233/276@3x.png +0 -0
  109. package/src/statics/icons/childIcons/SV-8/347/263/273/347/273/237/346/274/224/350/277/233/346/217/217/350/277/260/345/214/205@3x.png +0 -0
  110. package/src/statics/icons/childIcons/SV-9 /347/263/273/347/273/237/346/212/200/346/234/257/344/270/216/346/212/200/350/203/275/351/242/204/346/265/213/350/241/250@3x.png +0 -0
  111. package/src/statics/icons/childIcons/SV-9/347/263/273/347/273/237/346/212/200/346/234/257/344/270/216/346/212/200/350/203/275/351/242/204/346/265/213/345/214/205@3x.png +0 -0
  112. package/src/statics/icons/childIcons/StdV-1 /346/240/207/345/207/206/351/205/215/347/275/256/350/241/250@3x.png +0 -0
  113. package/src/statics/icons/childIcons/StdV-1/346/240/207/345/207/206/351/205/215/347/275/256/346/226/207/344/273/266/345/214/205@3x.png +0 -0
  114. package/src/statics/icons/childIcons/StdV-2 /346/240/207/345/207/206/351/242/204/346/265/213/350/241/250@3x.png +0 -0
  115. package/src/statics/icons/childIcons/StdV-2/346/240/207/345/207/206/351/242/204/346/265/213/345/214/205@3x.png +0 -0
  116. package/src/statics/icons/childIcons/SvcV-10a /346/234/215/345/212/241/345/217/202/346/225/260/345/233/276@3x.png +0 -0
  117. package/src/statics/icons/childIcons/SvcV-10a/346/234/215/345/212/241/350/247/204/345/210/231/346/250/241/345/236/213/345/214/205@3x.png +0 -0
  118. package/src/statics/icons/childIcons/SvcV-10b /346/234/215/345/212/241/347/212/266/346/200/201/350/275/254/346/215/242/346/217/217/350/277/260/345/233/276@3x.png +0 -0
  119. package/src/statics/icons/childIcons/SvcV-10b/346/234/215/345/212/241/347/212/266/346/200/201/350/275/254/346/215/242/346/217/217/350/277/260/345/214/205@3x.png +0 -0
  120. package/src/statics/icons/childIcons/SvcV-10c /346/234/215/345/212/241/344/272/213/344/273/266/350/267/237/350/270/252/346/217/217/350/277/260/345/233/276@3x.png +0 -0
  121. package/src/statics/icons/childIcons/SvcV-10c/346/234/215/345/212/241/344/272/213/344/273/266-/350/277/275/350/270/252/346/217/217/350/277/260/345/214/205@3x.png +0 -0
  122. package/src/statics/icons/childIcons/SvcV-1/346/234/215/345/212/241/344/270/212/344/270/213/346/226/207/346/217/217/350/277/260/345/233/276@3x.png +0 -0
  123. package/src/statics/icons/childIcons/SvcV-1/346/234/215/345/212/241/350/203/214/346/231/257/346/250/241/345/236/213/345/214/205@3x.png +0 -0
  124. package/src/statics/icons/childIcons/SvcV-2 /346/234/215/345/212/241/350/265/204/346/272/220/346/265/201/346/217/217/350/277/260/345/233/276@3x.png +0 -0
  125. package/src/statics/icons/childIcons/SvcV-2/346/234/215/345/212/241/350/265/204/346/272/220/346/265/201/346/217/217/350/277/260/345/214/205@3x.png +0 -0
  126. package/src/statics/icons/childIcons/SvcV-3a /347/263/273/347/273/237 -/346/234/215/345/212/241/347/237/251/351/230/265@3x-2.png +0 -0
  127. package/src/statics/icons/childIcons/SvcV-3a /347/263/273/347/273/237 -/346/234/215/345/212/241/347/237/251/351/230/265@3x.png +0 -0
  128. package/src/statics/icons/childIcons/SvcV-3a/347/263/273/347/273/237-/346/234/215/345/212/241/347/237/251/351/230/265/345/214/205@3x.png +0 -0
  129. package/src/statics/icons/childIcons/SvcV-3b/346/234/215/345/212/241-/346/234/215/345/212/241/347/237/251/351/230/265/345/214/205@3x.png +0 -0
  130. package/src/statics/icons/childIcons/SvcV-4 /346/234/215/345/212/241/345/212/237/350/203/275/346/217/217/350/277/260/345/233/276@3x.png +0 -0
  131. package/src/statics/icons/childIcons/SvcV-4 /346/234/215/345/212/241/345/212/237/350/203/275/346/265/201/345/233/276@3x.png +0 -0
  132. package/src/statics/icons/childIcons/SvcV-4/346/234/215/345/212/241/345/212/237/350/203/275/346/217/217/350/277/260/345/214/205@3x.png +0 -0
  133. package/src/statics/icons/childIcons/SvcV-5/344/275/234/346/210/230/346/264/273/345/212/250/345/210/260/346/234/215/345/212/241/345/217/257/350/277/275/350/270/252/347/237/251/351/230/265/345/214/205@3x.png +0 -0
  134. package/src/statics/icons/childIcons/SvcV-6 /346/234/215/345/212/241/350/265/204/346/272/220/346/265/201/347/237/251/351/230/265@3x.png +0 -0
  135. package/src/statics/icons/childIcons/SvcV-6/346/234/215/345/212/241/350/265/204/346/272/220/346/265/201/347/237/251/351/230/265/345/214/205@3x.png +0 -0
  136. package/src/statics/icons/childIcons/SvcV-7 /346/234/215/345/212/241/345/205/270/345/236/213/345/272/246/351/207/217/347/237/251/351/230/265@3x.png +0 -0
  137. package/src/statics/icons/childIcons/SvcV-7/346/234/215/345/212/241/345/272/246/351/207/217/347/237/251/351/230/265/345/214/205@3x.png +0 -0
  138. package/src/statics/icons/childIcons/SvcV-8 /346/234/215/345/212/241/346/274/224/350/277/233/347/224/230/347/211/271/345/233/276@3x.png +0 -0
  139. package/src/statics/icons/childIcons/SvcV-8/346/234/215/345/212/241/346/274/224/350/277/233/346/217/217/350/277/260/345/214/205@3x.png +0 -0
  140. package/src/statics/icons/childIcons/SvcV-9 /346/234/215/345/212/241/346/212/200/346/234/257/344/270/216/346/212/200/350/203/275/351/242/204/346/265/213/350/241/250@3x.png +0 -0
  141. package/src/statics/icons/childIcons/SvcV-9/346/234/215/345/212/241/346/212/200/346/234/257/344/270/216/346/212/200/350/203/275/351/242/204/346/265/213/345/214/205@3x.png +0 -0
  142. package/src/statics/icons/childIcons//344/275/223/347/263/273/346/236/266/346/236/204@3x.png +0 -0
  143. package/src/statics/icons/childIcons//344/275/234/346/210/230/350/247/206/350/247/222@3x.png +0 -0
  144. package/src/statics/icons/childIcons//345/205/250/346/231/257/350/247/206/350/247/222@3x.png +0 -0
  145. package/src/statics/icons/childIcons//345/205/254/345/217/270@3x.png +0 -0
  146. package/src/statics/icons/childIcons//345/215/217/350/256/256@3x.png +0 -0
  147. package/src/statics/icons/childIcons//345/215/217/350/256/256/345/261/202@3x.png +0 -0
  148. package/src/statics/icons/childIcons//345/215/217/350/256/256/346/240/210@3x.png +0 -0
  149. package/src/statics/icons/childIcons//345/221/275/344/273/244@3x.png +0 -0
  150. package/src/statics/icons/childIcons//346/210/230/347/225/245/346/246/202/345/277/265/350/241/250@3x.png +0 -0
  151. package/src/statics/icons/childIcons//346/216/247/345/210/266@3x.png +0 -0
  152. package/src/statics/icons/childIcons//346/224/257/346/214/201@3x.png +0 -0
  153. package/src/statics/icons/childIcons//346/225/260/346/215/256/344/277/241/346/201/257/350/247/206/350/247/222@3x.png +0 -0
  154. package/src/statics/icons/childIcons//346/234/215/345/212/241/350/247/206/350/247/222@3x.png +0 -0
  155. package/src/statics/icons/childIcons//346/240/207/345/207/206@3x.png +0 -0
  156. package/src/statics/icons/childIcons//346/240/207/345/207/206/350/247/206/350/247/222@3x.png +0 -0
  157. package/src/statics/icons/childIcons//347/263/273/347/273/237/350/247/206/350/247/222@3x.png +0 -0
  158. package/src/statics/icons/childIcons//350/203/275/345/212/233/350/247/206/350/247/222@3x.png +0 -0
  159. package/src/statics/icons/childIcons//351/241/271/347/233/256/350/247/206/350/247/222@3x.png +0 -0
  160. package/src/statics/icons/createMenu/down.png +0 -0
  161. package/src/statics/icons/createMenu/remove.png +0 -0
  162. package/src/statics/icons/createMenu/up.png +0 -0
  163. package/src/store/graphStore.ts +238 -45
  164. package/src/types/index.ts +87 -4
  165. package/src/utils/batchAutoExpand.ts +9 -10
  166. package/src/utils/containers.ts +72 -17
  167. package/src/utils/contextMenuUtils.ts +7 -7
  168. package/src/utils/dateUtils.ts +160 -0
  169. package/src/utils/diagram.ts +10 -8
  170. package/src/utils/drag.ts +6 -5
  171. package/src/utils/edgeUtils.ts +344 -427
  172. package/src/utils/edgeWorker.ts +471 -0
  173. package/src/utils/hittest.ts +37 -38
  174. package/src/utils/index.ts +3 -0
  175. package/src/utils/keyboardUtils.ts +5 -5
  176. package/src/utils/packageOutline.ts +96 -0
  177. package/src/utils/rafThrottle.ts +162 -0
  178. package/src/utils/workerManager.ts +335 -0
  179. package/src/view/graph.vue +47 -33
  180. /package/src/statics/icons/childIcons//346/210/230/347/225/{245@3x.png" → 245/345/261/202@3x.png"} +0 -0
@@ -9,6 +9,7 @@ import {
9
9
  import { getBounds } from './geom'
10
10
  import { canNest } from './policy';
11
11
  import { useGraphStore } from '../store/graphStore'
12
+ import { snapPinToParentEdge } from './pinUtils'
12
13
  /** 统一的几何矩形类型 */
13
14
  export type Rect = { x: number; y: number; width: number; height: number }
14
15
  /** 更新回调签名( */
@@ -234,6 +235,8 @@ export const ensureParentFitsChildren = (
234
235
  updateShape(parent.id, {
235
236
  bounds: { x: snap(nx), y: snap(ny), width: snap(needW), height: snap(needH) }
236
237
  })
238
+ // 父 bounds 确实变了,把父上挂载的 pin/port 重新吸附到新边缘
239
+ relocatePinsOnShape(parent.id, updateShape)
237
240
  }
238
241
  }
239
242
  /** 从当前父开始,逐层向上做 ensureParentFitsChildren */
@@ -242,9 +245,10 @@ export const bubbleAutoFitUp = (
242
245
  startParentId: string | null | undefined,
243
246
  updateShape: Updater
244
247
  ) => {
248
+ const shapeMap = useGraphStore().shapeMap
245
249
  let pid = startParentId ?? null
246
250
  while (pid) {
247
- const p = shapes.find(s => s.id === pid)
251
+ const p = shapeMap.get(pid)
248
252
  if (!p) break
249
253
  ensureParentFitsChildren(shapes, p, updateShape)
250
254
  pid = p.parenShapeId ?? null
@@ -260,8 +264,9 @@ export const attachToParent = (
260
264
  parentId: string,
261
265
  updateShape: Updater
262
266
  ) => {
263
- const child = shapes.find(s => s.id === childId)
264
- const parent = shapes.find(s => s.id === parentId)
267
+ const shapeMap = useGraphStore().shapeMap
268
+ const child = shapeMap.get(childId)
269
+ const parent = shapeMap.get(parentId)
265
270
  if (!child || !parent) return
266
271
  if (isDescendant(shapes, parentId, childId)) return // 防环
267
272
 
@@ -274,7 +279,7 @@ export const attachToParent = (
274
279
  const subtreeIds = [childId, ...collectDescendantIds(shapes, childId)]
275
280
  if (delta !== 0) {
276
281
  for (const id of subtreeIds) {
277
- const n = shapes.find(s => s.id === id)!
282
+ const n = shapeMap.get(id)!
278
283
  const nz = getZ(n) + delta
279
284
  updateShape(id, { style: { ...(n.style ?? {}), zIndex: nz } as any })
280
285
  }
@@ -290,7 +295,7 @@ export const detachFromParent = (
290
295
  childId: string,
291
296
  updateShape: Updater
292
297
  ) => {
293
- const child = shapes.find(s => s.id === childId)
298
+ const child = useGraphStore().shapeMap.get(childId)
294
299
  if (!child || !child.parenShapeId) return
295
300
  updateShape(childId, { parenShapeId: undefined })
296
301
  }
@@ -303,7 +308,8 @@ export const cascadeZIndexFrom = (
303
308
  startId: string,
304
309
  updateShape: Updater
305
310
  ) => {
306
- const start = shapes.find(s => s.id === startId); if (!start) return
311
+ const shapeMap = useGraphStore().shapeMap
312
+ const start = shapeMap.get(startId); if (!start) return
307
313
  const queue: Shape[] = [start]
308
314
 
309
315
  while (queue.length) {
@@ -448,9 +454,10 @@ export const bubbleCoverWithGapUp = (
448
454
  updateShape: Updater,
449
455
  gap = 0
450
456
  ) => {
457
+ const shapeMap = useGraphStore().shapeMap
451
458
  let pid = startParentId ?? null
452
459
  while (pid) {
453
- const p = shapes.find(s => s.id === pid)
460
+ const p = shapeMap.get(pid)
454
461
  if (!p) break
455
462
  ensureParentCoversChildrenWithGap(shapes, p, updateShape, gap)
456
463
  pid = p.parenShapeId ?? null
@@ -505,10 +512,11 @@ export const hasDraggedAncestor = (
505
512
  sid: string,
506
513
  draggingSet: Set<string>
507
514
  ) => {
508
- let pid = shapes.find(s => s.id === sid)?.parenShapeId ?? null
515
+ const shapeMap = useGraphStore().shapeMap
516
+ let pid = shapeMap.get(sid)?.parenShapeId ?? null
509
517
  while (pid) {
510
518
  if (draggingSet.has(pid)) return true
511
- pid = shapes.find(s => s.id === pid)?.parenShapeId ?? null
519
+ pid = shapeMap.get(pid)?.parenShapeId ?? null
512
520
  }
513
521
  return false
514
522
  }
@@ -542,7 +550,8 @@ export const resolveParentAfterDrag = (
542
550
  deferExpandOnReparent?: boolean
543
551
  }
544
552
  ): boolean => {
545
- const byId = (id?: string | null) => (id ? shapes.find(x => x.id === id) || null : null)
553
+ const shapeMap = useGraphStore().shapeMap
554
+ const byId = (id?: string | null) => (id ? shapeMap.get(id) || null : null)
546
555
  const draggingSet = new Set(draggingIds)
547
556
  // 本次拖动的子图元是否是“黏在父上的类型”
548
557
  const stickyToParent = isStickyChild(s)
@@ -601,11 +610,11 @@ export const resolveParentAfterDrag = (
601
610
  if (!allowAsParent(shapes, p)) return false
602
611
  } else {
603
612
  // 或者直接内联一版最小实现:
604
- let q = shapes.find(x => x.id === p.parenShapeId) || null
613
+ let q = shapeMap.get(p.parenShapeId!) || null
605
614
  while (q) {
606
615
  if (isCompartment(q)) return false
607
616
  const parentId = q.parenShapeId
608
- q = parentId ? shapes.find(x => x.id === parentId) || null : null
617
+ q = parentId ? shapeMap.get(parentId) || null : null
609
618
  }
610
619
  }
611
620
  // if (!canNest(s, p, shapes)) return false
@@ -684,7 +693,7 @@ export const resolveParentAfterDrag = (
684
693
  if (delta !== 0) {
685
694
  const subtree = [s.id, ...collectDescendantIds(shapes, s.id)]
686
695
  for (const id of subtree) {
687
- const node = shapes.find(x => x.id === id)!
696
+ const node = shapeMap.get(id)!
688
697
  const nz = ((typeof node.style?.zIndex === 'number') ? node.style!.zIndex as number : 0) + delta
689
698
  updateShape(id, { style: { ...(node.style ?? {}), zIndex: nz } as any })
690
699
  }
@@ -709,9 +718,10 @@ const pointInRect = (pt: { x: number; y: number }, r: Rect, margin = 0) =>
709
718
  pt.y <= r.y + r.height - margin
710
719
 
711
720
  const depthOf = (shapes: Shape[], id: string): number => {
721
+ const shapeMap = useGraphStore().shapeMap
712
722
  let d = 0
713
- let p = shapes.find(s => s.id === id)?.parenShapeId ?? null
714
- while (p) { d++; p = shapes.find(s => s.id === p)?.parenShapeId ?? null }
723
+ let p = shapeMap.get(id)?.parenShapeId ?? null
724
+ while (p) { d++; p = shapeMap.get(p)?.parenShapeId ?? null }
715
725
  return d
716
726
  }
717
727
 
@@ -799,7 +809,7 @@ export const expandParentToFitChildBounds = (
799
809
  updateShape: (id: string, updates: Partial<Shape>) => void,
800
810
  ): { expanded: boolean; affectedIds: string[] } => {
801
811
  // child 是 pin 时,永远不扩父,直接返回
802
- const childShape = shapes.find(s => s.id === childId) || null
812
+ const childShape = useGraphStore().shapeMap.get(childId) || null
803
813
  if (isPinShape(childShape)) {
804
814
  return { expanded: false, affectedIds: [] }
805
815
  }
@@ -878,6 +888,8 @@ export const expandParentToFitChildBounds = (
878
888
  updateShape(parent.id, {
879
889
  bounds: { x: pX, y: ny, width: pW, height: nh },
880
890
  })
891
+ // 隔间扩父后也要重定位 pin/port
892
+ relocatePinsOnShape(parent.id, updateShape)
881
893
  expanded = true
882
894
  }
883
895
  }
@@ -896,7 +908,7 @@ export const expandParentToFitChildBounds = (
896
908
  bubbleAutoFitUp(shapes, parent.parenShapeId, updateShape)
897
909
 
898
910
  // 再看一眼,若父仍然轻微越界,则把子轻夹回去
899
- const pNow = shapes.find(s => s.id === parent.id)
911
+ const pNow = useGraphStore().shapeMap.get(parent.id)
900
912
  if (pNow && overflowIn(pNow, placeRect) > CONTENT_EPS) {
901
913
  const clamped = clampChildIntoParent(pNow, placeRect)
902
914
  if (clamped.x !== placeRect.x || clamped.y !== placeRect.y) {
@@ -910,6 +922,49 @@ export const expandParentToFitChildBounds = (
910
922
  affectedIds: expanded ? Array.from(affected) : [],
911
923
  }
912
924
  }
925
+
926
+ /**
927
+ * 父 bounds 变化后,将其上挂载的 pin/port 重新吸附到新的边缘。
928
+ * 只在位置确实变化时才调用 updateShape,避免触发多余的响应式循环。
929
+ */
930
+ function relocatePinsOnShape(
931
+ parentId: string,
932
+ updateShape: Updater,
933
+ ) {
934
+ const store = useGraphStore()
935
+ const pinsSet = new Set([
936
+ ...(store.pinsTypes ?? []),
937
+ ...(store.portsTypes ?? []),
938
+ ])
939
+ if (pinsSet.size === 0) return
940
+
941
+ const parentShape = store.shapeMap.get(parentId)
942
+ if (!parentShape) return
943
+
944
+ const childIds = store.parentChildMap.get(parentId) ?? []
945
+ for (const childId of childIds) {
946
+ const childShape = store.shapeMap.get(childId)
947
+ if (!childShape) continue
948
+ if (!pinsSet.has(childShape.shapeKey)) continue
949
+
950
+ const pb = childShape.bounds ?? ({} as any)
951
+ const oldX = pb.x ?? 0
952
+ const oldY = pb.y ?? 0
953
+ const pinCenterX = oldX + (pb.width ?? 0) / 2
954
+ const pinCenterY = oldY + (pb.height ?? 0) / 2
955
+ const newPos = snapPinToParentEdge(
956
+ { x: pinCenterX, y: pinCenterY },
957
+ parentShape,
958
+ childShape,
959
+ )
960
+ if (Math.round(newPos.x) !== Math.round(oldX) || Math.round(newPos.y) !== Math.round(oldY)) {
961
+ updateShape(childId, {
962
+ bounds: { ...childShape.bounds, x: newPos.x, y: newPos.y },
963
+ })
964
+ }
965
+ }
966
+ }
967
+
913
968
  /**
914
969
  * 统一判定:这个 shape 是否“禁止扩父”(pin / port)
915
970
  */
@@ -263,23 +263,23 @@ export class ContextMenuUtils {
263
263
  }
264
264
 
265
265
  let pastedShapes: string[] = this.copiedShapes.map(s => s.id);
266
+ const currentOp = this.operationType;
266
267
 
267
268
  // 通过事件总线通知添加图元,包含操作类型
268
269
  eventBus.emit('paste-shapes', {
269
270
  shapeIds: pastedShapes,
270
- operationType: this.operationType
271
+ operationType: currentOp
271
272
  });
272
273
 
273
- // 如果是剪切操作,粘贴后清除剪切状态遮盖层
274
- if (this.operationType === 'cut') {
274
+ if (currentOp === 'cut') {
275
+ // 剪切操作:粘贴一次后清除剪切遮盖层并清空剪贴板
275
276
  const graphStore = useGraphStore();
276
277
  graphStore.clearCutShapeIds();
278
+ this.clearClipboard();
277
279
  }
280
+ // 复制操作:不清空剪贴板,允许多次粘贴
278
281
 
279
- // 粘贴完成后清空剪贴板(无论是复制还是剪切)
280
- this.clearClipboard();
281
-
282
- console.log('已粘贴的图元:', pastedShapes, '操作类型:', this.operationType);
282
+ console.log('已粘贴的图元:', pastedShapes, '操作类型:', currentOp);
283
283
  }
284
284
 
285
285
  /**
@@ -0,0 +1,160 @@
1
+ /**
2
+ * 日期工具类
3
+ * 提供统一的日期解析、格式化和计算功能
4
+ */
5
+ export class DateUtils {
6
+ /**
7
+ * 解析日期字符串为 Date 对象
8
+ * @param dateStr - 日期字符串,支持 ISO 格式(带 T 或空格)
9
+ * @returns Date 对象,解析失败返回 null
10
+ * @example
11
+ * DateUtils.parse('2024-03-05T14:30:25') // Date 对象
12
+ * DateUtils.parse('2024-03-05 14:30:25') // Date 对象
13
+ * DateUtils.parse('invalid') // null
14
+ */
15
+ static parse(dateStr: string | null | undefined): Date | null {
16
+ if (!dateStr) return null
17
+
18
+ // 将空格替换为 T,兼容 "YYYY-MM-DD HH:mm:ss" 和 "YYYY-MM-DDTHH:mm:ss" 两种格式
19
+ const normalized = dateStr.includes('T') ? dateStr : dateStr.replace(' ', 'T')
20
+ const date = new Date(normalized)
21
+
22
+ // 检查日期是否有效
23
+ return Number.isNaN(date.getTime()) ? null : date
24
+ }
25
+
26
+ /**
27
+ * 获取日期的时间戳
28
+ * @param dateStr - 日期字符串
29
+ * @returns 时间戳(毫秒),解析失败返回 null
30
+ * @example
31
+ * DateUtils.getTimestamp('2024-03-05T14:30:25') // 1709641825000
32
+ */
33
+ static getTimestamp(dateStr: string | null | undefined): number | null {
34
+ const date = this.parse(dateStr)
35
+ return date ? date.getTime() : null
36
+ }
37
+
38
+ /**
39
+ * 格式化日期为字符串
40
+ * @param dateStr - 日期字符串或 Date 对象
41
+ * @param format - 格式类型:'date' 只显示日期,'datetime' 显示日期和时间
42
+ * @returns 格式化后的字符串,解析失败返回原字符串
43
+ * @example
44
+ * DateUtils.format('2024-03-05T14:30:25', 'date') // '2024-03-05'
45
+ * DateUtils.format('2024-03-05T14:30:25', 'datetime') // '2024-03-05 14:30:25'
46
+ */
47
+ static format(
48
+ dateStr: string | Date | null | undefined,
49
+ format: 'date' | 'datetime' = 'datetime'
50
+ ): string {
51
+ if (!dateStr) return ''
52
+
53
+ const date = dateStr instanceof Date ? dateStr : this.parse(dateStr)
54
+ if (!date) return typeof dateStr === 'string' ? dateStr : ''
55
+
56
+ const year = date.getFullYear()
57
+ const month = this.pad(date.getMonth() + 1)
58
+ const day = this.pad(date.getDate())
59
+
60
+ if (format === 'date') {
61
+ return `${year}-${month}-${day}`
62
+ }
63
+
64
+ const hours = this.pad(date.getHours())
65
+ const minutes = this.pad(date.getMinutes())
66
+ const seconds = this.pad(date.getSeconds())
67
+
68
+ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
69
+ }
70
+
71
+ /**
72
+ * 格式化日期为中文格式
73
+ * @param dateStr - 日期字符串
74
+ * @returns 中文格式的日期字符串
75
+ * @example
76
+ * DateUtils.formatChinese('2024-03-05') // '2024年3月5日'
77
+ */
78
+ static formatChinese(dateStr: string | null | undefined): string {
79
+ if (!dateStr) return ''
80
+
81
+ const date = this.parse(dateStr)
82
+ if (!date) return dateStr
83
+
84
+ return `${date.getFullYear()}年${date.getMonth() + 1}月${date.getDate()}日`
85
+ }
86
+
87
+ /**
88
+ * 数字补零(小于 10 的数字前面补 0)
89
+ * @param value - 数字
90
+ * @returns 补零后的字符串
91
+ * @example
92
+ * DateUtils.pad(5) // '05'
93
+ * DateUtils.pad(12) // '12'
94
+ */
95
+ static pad(value: number): string {
96
+ return String(value).padStart(2, '0')
97
+ }
98
+
99
+ /**
100
+ * 检查日期字符串是否有效
101
+ * @param dateStr - 日期字符串
102
+ * @returns 是否有效
103
+ * @example
104
+ * DateUtils.isValid('2024-03-05') // true
105
+ * DateUtils.isValid('invalid') // false
106
+ */
107
+ static isValid(dateStr: string | null | undefined): boolean {
108
+ return this.parse(dateStr) !== null
109
+ }
110
+
111
+ /**
112
+ * 比较两个日期的大小
113
+ * @param date1 - 日期1
114
+ * @param date2 - 日期2
115
+ * @returns date1 < date2 返回 -1,date1 > date2 返回 1,相等返回 0,任一无效返回 null
116
+ */
117
+ static compare(
118
+ date1: string | null | undefined,
119
+ date2: string | null | undefined
120
+ ): number | null {
121
+ const d1 = this.parse(date1)
122
+ const d2 = this.parse(date2)
123
+
124
+ if (!d1 || !d2) return null
125
+
126
+ const t1 = d1.getTime()
127
+ const t2 = d2.getTime()
128
+
129
+ if (t1 < t2) return -1
130
+ if (t1 > t2) return 1
131
+ return 0
132
+ }
133
+
134
+ /**
135
+ * 获取日期范围(最小和最大日期)
136
+ * @param dates - 日期字符串数组
137
+ * @returns { min: Date | null, max: Date | null }
138
+ */
139
+ static getRange(dates: (string | null | undefined)[]): {
140
+ min: Date | null
141
+ max: Date | null
142
+ } {
143
+ let minDate: Date | null = null
144
+ let maxDate: Date | null = null
145
+
146
+ for (const dateStr of dates) {
147
+ const date = this.parse(dateStr)
148
+ if (!date) continue
149
+
150
+ if (!minDate || date < minDate) {
151
+ minDate = date
152
+ }
153
+ if (!maxDate || date > maxDate) {
154
+ maxDate = date
155
+ }
156
+ }
157
+
158
+ return { min: minDate, max: maxDate }
159
+ }
160
+ }
@@ -89,12 +89,18 @@ export const handleStyle = (pos: HandlePos, shape: Shape) => {
89
89
  };
90
90
  };
91
91
 
92
+ /**
93
+ * 判断是否为画布类型(diagram 或 gantt)
94
+ */
95
+ const isCanvasShape = (shape: Shape) =>
96
+ shape.shapeType === ShapeConfig.SHAPE_TYPE || shape.shapeType === 'gantt' || shape.shapeType === 'table' || shape.shapeType === 'matrix';
97
+
92
98
  /**
93
99
  * 获取画布形状
94
100
  */
95
101
  export const getCanvasShape = () => {
96
102
  const graphStore = useGraphStore();
97
- return graphStore.shapes.find(shape => shape.shapeType === ShapeConfig.SHAPE_TYPE);
103
+ return graphStore.shapes.find(isCanvasShape);
98
104
  };
99
105
 
100
106
  /**
@@ -104,7 +110,7 @@ export const calculateShapesBounds = () => {
104
110
  const graphStore = useGraphStore();
105
111
  // 过滤掉画布本身,只计算子图元
106
112
  const childShapes = graphStore.shapes.filter(
107
- (shape) => shape.shapeType !== ShapeConfig.SHAPE_TYPE
113
+ (shape) => !isCanvasShape(shape)
108
114
  );
109
115
 
110
116
  if (childShapes.length === 0) return null;
@@ -136,9 +142,7 @@ export const calculateShapesBounds = () => {
136
142
  export const adjustCanvasToFitAllShapes = () => {
137
143
  const graphStore = useGraphStore();
138
144
  // 获取画布形状
139
- const canvas = graphStore.shapes.find(
140
- (shape) => shape.shapeType === ShapeConfig.SHAPE_TYPE
141
- );
145
+ const canvas = graphStore.shapes.find(isCanvasShape);
142
146
 
143
147
  if (!canvas || !canvas.bounds) return;
144
148
 
@@ -190,9 +194,7 @@ export const adjustCanvasToFitAllShapes = () => {
190
194
  * */
191
195
  const ensureMinimumCanvasSize = () => {
192
196
  const graphStore = useGraphStore();
193
- const canvas = graphStore.shapes.find(
194
- (shape) => shape.shapeType === ShapeConfig.SHAPE_TYPE
195
- );
197
+ const canvas = graphStore.shapes.find(isCanvasShape);
196
198
 
197
199
  if (!canvas || !canvas.bounds) return;
198
200
 
package/src/utils/drag.ts CHANGED
@@ -31,9 +31,10 @@ export const buildDragSnapshot = (
31
31
  shapes: Shape[],
32
32
  ids: string[],
33
33
  ) => {
34
+ const shapeMap = useGraphStore().shapeMap
34
35
  const dragBase: Record<string, Rect> = {}
35
36
  ids.forEach(id => {
36
- const s = shapes.find(x => x.id === id); if (!s) return
37
+ const s = shapeMap.get(id); if (!s) return
37
38
  const b = getBounds(s)
38
39
  dragBase[id] = { x: b.x, y: b.y, width: b.width, height: b.height }
39
40
  })
@@ -61,7 +62,7 @@ export const stepSingleDrag = (
61
62
  constrainEdges: { left?: boolean; top?: boolean; right?: boolean; bottom?: boolean },
62
63
  hitPointer?: { x: number; y: number },
63
64
  ) => {
64
- const s = shapes.find(x => x.id === id); if (!s) return { ghost: {}, hover: null }
65
+ const s = useGraphStore().shapeMap.get(id); if (!s) return { ghost: {}, hover: null }
65
66
  const base = dragBase[id]; if (!base) return { ghost: {}, hover: null }
66
67
  const container = getDiagramRect(shapes)
67
68
 
@@ -120,14 +121,14 @@ export const stepGroupDrag = (
120
121
  // 构建整组 ghost
121
122
  const ghost: Record<string, Rect> = {}
122
123
  for (const id of draggingIds) {
123
- const s = shapes.find(x => x.id === id); if (!s) continue
124
+ const s = useGraphStore().shapeMap.get(id); if (!s) continue
124
125
  const b = getBounds(s)
125
126
  ghost[id] = { x: b.x + dx, y: b.y + dy, width: b.width, height: b.height }
126
127
  }
127
128
 
128
129
  // —— hover 统一改为“指针命中 topmost 容器”
129
130
  // 用主拖动项获取 diagramId(也可以存你当前图的 id)
130
- const priShape = shapes.find(x => x.id === primaryId)
131
+ const priShape = useGraphStore().shapeMap.get(primaryId)
131
132
  const diagramId = priShape?.diagramId || ''
132
133
 
133
134
  const hoverShape = pickContainerByPointerTopmost(
@@ -159,7 +160,7 @@ export const commitDrag = (
159
160
 
160
161
  // 仅把“参与拖拽的节点”的 ghost 写回;不处理父子关系,也不扩父或夹回
161
162
  for (const id of draggingIds) {
162
- const s = shapes.find(x => x.id === id)
163
+ const s = useGraphStore().shapeMap.get(id)
163
164
  const r = ghost[id] // 参与拖拽的 id 都应当在 ghost 里
164
165
  if (!s || !r) continue
165
166