@mx-sose-front/mx-sose-graph 1.1.9 → 1.2.2
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.
- package/dist/index.d.ts +362 -2
- package/dist/index.esm.js +1869 -1099
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Gantt/Gantt.vue +2 -0
- package/src/components/Matrix/Matrix.vue +131 -76
- package/src/components/MatrixContextMenu/MatrixContextMenu.vue +235 -0
- package/src/components/Shape/DividingLine.vue +80 -64
- package/src/components/Table/Table.vue +851 -626
- package/src/constants/edgeShapeKeys.ts +4 -2
- package/src/constants/index.ts +41 -19
- package/src/hooks/useChartRowSelection.ts +37 -6
- 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
- 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
- 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
- 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
- package/src/statics/icons/childIcons/CV-1/346/204/277/346/231/257/345/214/205@3x.png +0 -0
- package/src/statics/icons/childIcons/CV-1/346/204/277/346/231/257/345/233/276@3x.png +0 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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/233/276@3x.png +0 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/src/statics/icons/childIcons/SV-10c/347/263/273/347/273/237/344/272/213/344/273/266/342/200/224/350/277/275/350/270/252/346/217/217/350/277/260/345/214/205@3x.png +0 -0
- package/src/statics/icons/childIcons/SV-10c/347/263/273/347/273/237/344/272/213/344/273/266/344/270/200/350/277/275/350/270/252/346/217/217/350/277/260/345/214/205@3x.png +0 -0
- 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
- 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
- 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
- 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
- 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
- package/src/statics/icons/childIcons/SV-3/347/263/273/347/273/237/342/200/224/347/263/273/347/273/237/347/237/251/351/230/265/345/214/205@3x.png +0 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/src/statics/icons/childIcons/SvcV-10c/346/234/215/345/212/241/344/272/213/344/273/266/342/200/224/350/277/275/350/270/252/346/217/217/350/277/260/345/214/205@3x.png +0 -0
- 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
- 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
- package/src/statics/icons/childIcons/SvcV-2 /346/234/215/345/212/241/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
- 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
- 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
- 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
- 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
- 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
- package/src/statics/icons/childIcons/SvcV-3a/347/263/273/347/273/237/342/200/224/346/234/215/345/212/241/347/237/251/351/230/265/345/214/205@3x.png +0 -0
- 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@3x.png +0 -0
- 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
- package/src/statics/icons/childIcons/SvcV-3b/346/234/215/345/212/241/342/200/224/346/234/215/345/212/241/347/237/251/351/230/265/345/214/205@3x.png +0 -0
- 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
- 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
- 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
- package/src/statics/icons/childIcons/SvcV-5 /346/234/215/345/212/241/345/210/260/344/270/232/345/212/241/346/264/273/345/212/250/345/217/257/350/277/275/346/272/257/346/200/247/347/237/251/351/230/265@3x.png +0 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/src/statics/icons/childIcons/set@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/345/261/202@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/211/247/350/241/214/350/200/205/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
- package/src/statics/icons/childIcons//344/270/232/345/212/241/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/347/274/223/350/247/243/346/216/252/346/226/275@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/345/261/202@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/347/272/246/346/235/237/345/256/232/344/271/211/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/275/223/347/263/273/346/236/266/346/236/204@3x.png +0 -0
- package/src/statics/icons/childIcons//344/275/234/346/210/230/350/247/206/350/247/222@3x.png +0 -0
- package/src/statics/icons/childIcons//345/205/250/346/231/257/350/247/206/350/247/222@3x.png +0 -0
- package/src/statics/icons/childIcons//345/205/254/345/217/270@3x.png +0 -0
- package/src/statics/icons/childIcons//345/215/217/350/256/256@3x.png +0 -0
- package/src/statics/icons/childIcons//345/215/217/350/256/256/345/261/202@3x.png +0 -0
- package/src/statics/icons/childIcons//345/215/217/350/256/256/346/240/210@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/345/261/202@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/346/210/230/347/225/245/351/230/266/346/256/265/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
- package/src/statics/icons/childIcons//345/256/236/351/231/205/350/265/204/346/272/220/345/205/263/347/263/273@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/350/265/204/346/272/220/345/261/202@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/345/261/202@3x.png +0 -0
- package/src/statics/icons/childIcons//346/224/257/346/214/201@3x.png +0 -0
- 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
- package/src/statics/icons/childIcons//346/234/215/345/212/241/345/261/202@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/350/247/206/350/247/222@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/350/277/236/351/200/232/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/350/277/236/351/200/232/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//346/240/207/345/207/206@3x.png +0 -0
- package/src/statics/icons/childIcons//346/240/207/345/207/206/345/261/202@3x.png +0 -0
- package/src/statics/icons/childIcons//346/240/207/345/207/206/350/247/206/350/247/222@3x.png +0 -0
- package/src/statics/icons/childIcons//346/240/207/345/207/206/350/267/257/347/272/277/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//346/240/207/345/207/206/350/277/275/346/272/257/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//347/212/266/346/200/201/346/214/207/346/240/207@3x.png +0 -0
- package/src/statics/icons/childIcons//347/263/273/347/273/237/350/247/206/350/247/222@3x.png +0 -0
- package/src/statics/icons/childIcons//350/203/275/345/212/233/350/247/206/350/247/222@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/345/261/202@3x.png +0 -0
- package/src/statics/icons/childIcons//351/200/202/347/224/250/350/203/275/345/212/233@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/345/261/202@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/350/247/206/350/247/222@3x.png +0 -0
- package/src/store/graphStore.ts +21 -1
- package/src/types/index.ts +1 -0
- package/src/utils/keyboardUtils.ts +13 -0
- /package/src/statics/icons/childIcons/{role@3x.png → Role@3x.png} +0 -0
- /package/src/statics/icons/childIcons//347/233/270/346/257/{224@3x (1).png" → 224@3x.png"} +0 -0
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<teleport to="body">
|
|
3
|
+
<div
|
|
4
|
+
v-if="visible"
|
|
5
|
+
class="matrix-context-menu px-[6px]"
|
|
6
|
+
:style="dynamicMenuStyle"
|
|
7
|
+
@contextmenu.prevent
|
|
8
|
+
@click.stop
|
|
9
|
+
ref="menuRef"
|
|
10
|
+
>
|
|
11
|
+
<!-- 属性配置 -->
|
|
12
|
+
<div class="menu-item" @click="handlePropertyConfig">
|
|
13
|
+
<div class="flex items-center box-border border-b-[1px] border-solid border-[#DCDFE6]">
|
|
14
|
+
<img :src="getIcon('createMenu', 'config')" class="w-[18px] h-[18px] mr-[10px] ml-[2px]" alt="属性配置" />
|
|
15
|
+
<span>属性配置</span>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<!-- 树上高亮 -->
|
|
20
|
+
<div class="menu-item" @click="handleTreeHighlight">
|
|
21
|
+
<div class="flex items-center box-border border-b-[1px] border-solid border-[#DCDFE6]">
|
|
22
|
+
<img :src="getIcon('createMenu', 'tree')" class="w-[18px] h-[18px] mr-[10px] ml-[2px]" alt="树上高亮" />
|
|
23
|
+
<span>树上高亮</span>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<!-- 删除 -->
|
|
28
|
+
<div class="menu-item" @click="handleDelete">
|
|
29
|
+
<div class="flex items-center box-border border-b-[1px] border-solid border-[#DCDFE6]">
|
|
30
|
+
<img :src="getIcon('createMenu', 'delete')" class="w-[18px] h-[18px] mr-[10px] ml-[2px]" alt="删除" />
|
|
31
|
+
<span>删除</span>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<!-- 移除 -->
|
|
36
|
+
<div class="menu-item" @click="handleRemove">
|
|
37
|
+
<div class="flex items-center">
|
|
38
|
+
<img :src="getIcon('createMenu', 'remove')" class="w-[18px] h-[18px] mr-[10px] ml-[2px]" alt="移除" />
|
|
39
|
+
<span>移除</span>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</teleport>
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<script setup lang="ts">
|
|
47
|
+
import { ref, watch, onMounted, onUnmounted, type CSSProperties } from 'vue'
|
|
48
|
+
import { getIcon } from '../../utils/iconLoader'
|
|
49
|
+
|
|
50
|
+
interface Props {
|
|
51
|
+
visible: boolean
|
|
52
|
+
position: {
|
|
53
|
+
x: number
|
|
54
|
+
y: number
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const props = defineProps<Props>()
|
|
59
|
+
|
|
60
|
+
const emit = defineEmits<{
|
|
61
|
+
(e: 'update:visible', value: boolean): void
|
|
62
|
+
(e: 'property-config'): void
|
|
63
|
+
(e: 'tree-highlight'): void
|
|
64
|
+
(e: 'delete'): void
|
|
65
|
+
(e: 'remove'): void
|
|
66
|
+
}>()
|
|
67
|
+
|
|
68
|
+
const menuRef = ref<HTMLElement | null>(null)
|
|
69
|
+
|
|
70
|
+
const MENU_WIDTH = 180
|
|
71
|
+
const MENU_HEIGHT = 160
|
|
72
|
+
const SAFE_MARGIN = 10
|
|
73
|
+
|
|
74
|
+
const dynamicMenuStyle = ref<CSSProperties>({
|
|
75
|
+
left: '0px',
|
|
76
|
+
top: '0px',
|
|
77
|
+
display: 'none',
|
|
78
|
+
position: 'fixed',
|
|
79
|
+
zIndex: '9999',
|
|
80
|
+
minWidth: `${MENU_WIDTH}px`,
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
const updateMenuPosition = () => {
|
|
84
|
+
if (!props.visible) {
|
|
85
|
+
dynamicMenuStyle.value = { ...dynamicMenuStyle.value, display: 'none' }
|
|
86
|
+
return
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const viewportWidth = window.innerWidth
|
|
90
|
+
const viewportHeight = window.innerHeight
|
|
91
|
+
|
|
92
|
+
let left = props.position.x
|
|
93
|
+
let top = props.position.y
|
|
94
|
+
|
|
95
|
+
if (left + MENU_WIDTH > viewportWidth) {
|
|
96
|
+
left = viewportWidth - MENU_WIDTH - SAFE_MARGIN
|
|
97
|
+
}
|
|
98
|
+
left = Math.max(SAFE_MARGIN, left)
|
|
99
|
+
|
|
100
|
+
if (top + MENU_HEIGHT > viewportHeight) {
|
|
101
|
+
top = viewportHeight - MENU_HEIGHT - SAFE_MARGIN
|
|
102
|
+
}
|
|
103
|
+
top = Math.max(SAFE_MARGIN, top)
|
|
104
|
+
|
|
105
|
+
dynamicMenuStyle.value = {
|
|
106
|
+
left: `${left}px`,
|
|
107
|
+
top: `${top}px`,
|
|
108
|
+
display: 'block',
|
|
109
|
+
position: 'fixed',
|
|
110
|
+
zIndex: '9999',
|
|
111
|
+
minWidth: `${MENU_WIDTH}px`,
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const closeMenu = () => {
|
|
116
|
+
emit('update:visible', false)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const handleClickOutside = (event: MouseEvent) => {
|
|
120
|
+
if (!props.visible || !menuRef.value) return
|
|
121
|
+
if (!menuRef.value.contains(event.target as Node)) {
|
|
122
|
+
closeMenu()
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
watch(
|
|
127
|
+
() => [props.visible, props.position],
|
|
128
|
+
() => {
|
|
129
|
+
updateMenuPosition()
|
|
130
|
+
|
|
131
|
+
if (props.visible) {
|
|
132
|
+
setTimeout(() => {
|
|
133
|
+
document.addEventListener('click', handleClickOutside, { capture: true })
|
|
134
|
+
}, 0)
|
|
135
|
+
} else {
|
|
136
|
+
document.removeEventListener('click', handleClickOutside, { capture: true })
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{ immediate: true }
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
const handlePropertyConfig = () => {
|
|
143
|
+
emit('property-config')
|
|
144
|
+
closeMenu()
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const handleTreeHighlight = () => {
|
|
148
|
+
emit('tree-highlight')
|
|
149
|
+
closeMenu()
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const handleDelete = () => {
|
|
153
|
+
emit('delete')
|
|
154
|
+
closeMenu()
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const handleRemove = () => {
|
|
158
|
+
emit('remove')
|
|
159
|
+
closeMenu()
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const handleWindowResize = () => {
|
|
163
|
+
if (props.visible) {
|
|
164
|
+
updateMenuPosition()
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
onMounted(() => {
|
|
169
|
+
window.addEventListener('resize', handleWindowResize)
|
|
170
|
+
updateMenuPosition()
|
|
171
|
+
})
|
|
172
|
+
|
|
173
|
+
onUnmounted(() => {
|
|
174
|
+
document.removeEventListener('click', handleClickOutside, { capture: true })
|
|
175
|
+
window.removeEventListener('resize', handleWindowResize)
|
|
176
|
+
})
|
|
177
|
+
</script>
|
|
178
|
+
|
|
179
|
+
<style scoped lang="scss">
|
|
180
|
+
.matrix-context-menu {
|
|
181
|
+
background-color: #fff;
|
|
182
|
+
border: 1px solid #ebeef5;
|
|
183
|
+
border-radius: 6px;
|
|
184
|
+
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
185
|
+
padding: 6px 0;
|
|
186
|
+
overflow-y: auto;
|
|
187
|
+
box-sizing: border-box;
|
|
188
|
+
transition: opacity 0.2s ease, transform 0.2s ease;
|
|
189
|
+
transform-origin: top left;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.matrix-context-menu[style*='display: block'] {
|
|
193
|
+
animation: fadeIn 0.2s ease forwards;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
@keyframes fadeIn {
|
|
197
|
+
from {
|
|
198
|
+
opacity: 0;
|
|
199
|
+
transform: scale(0.95);
|
|
200
|
+
}
|
|
201
|
+
to {
|
|
202
|
+
opacity: 1;
|
|
203
|
+
transform: scale(1);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.matrix-context-menu::-webkit-scrollbar {
|
|
208
|
+
width: 6px;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.matrix-context-menu::-webkit-scrollbar-thumb {
|
|
212
|
+
background-color: #ddd;
|
|
213
|
+
border-radius: 3px;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.matrix-context-menu::-webkit-scrollbar-track {
|
|
217
|
+
background-color: #f5f5f5;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.menu-item {
|
|
221
|
+
padding: 0 15px;
|
|
222
|
+
cursor: pointer;
|
|
223
|
+
font-size: 14px;
|
|
224
|
+
color: #606266;
|
|
225
|
+
border-radius: 4px;
|
|
226
|
+
height: 36px;
|
|
227
|
+
line-height: 36px;
|
|
228
|
+
box-sizing: border-box;
|
|
229
|
+
|
|
230
|
+
&:hover {
|
|
231
|
+
background-color: #f5f7fa;
|
|
232
|
+
color: #303133;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
</style>
|
|
@@ -198,6 +198,8 @@ const headerHeight = computed(() => {
|
|
|
198
198
|
|
|
199
199
|
// 响应式状态管理
|
|
200
200
|
const actualContentHeight = ref<number>(0); // 实际内容高度
|
|
201
|
+
// 实际内容宽度
|
|
202
|
+
const actualContentWidth = ref<number>(0)
|
|
201
203
|
const contentRef = ref<HTMLElement | null>(null);
|
|
202
204
|
|
|
203
205
|
// 内容区域高度计算
|
|
@@ -278,73 +280,90 @@ const reportMetrics = () => {
|
|
|
278
280
|
});
|
|
279
281
|
}
|
|
280
282
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
283
|
+
/**
|
|
284
|
+
* 测量内容真实宽高
|
|
285
|
+
*/
|
|
286
|
+
const measureContentSize = () => {
|
|
287
|
+
if (!contentRef.value) return
|
|
288
|
+
|
|
289
|
+
// 先重置,保证测量的是内容自然撑开的尺寸
|
|
290
|
+
contentRef.value.style.width = 'auto'
|
|
291
|
+
contentRef.value.style.height = 'auto'
|
|
292
|
+
contentRef.value.style.maxWidth = 'none'
|
|
293
|
+
|
|
294
|
+
// 真实内容尺寸
|
|
295
|
+
const realWidth = contentRef.value.scrollWidth
|
|
296
|
+
const realHeight = contentRef.value.scrollHeight
|
|
297
|
+
|
|
298
|
+
let changed = false
|
|
299
|
+
|
|
300
|
+
if (realWidth !== actualContentWidth.value) {
|
|
301
|
+
actualContentWidth.value = realWidth
|
|
302
|
+
changed = true
|
|
303
|
+
}
|
|
284
304
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
305
|
+
if (realHeight !== actualContentHeight.value) {
|
|
306
|
+
actualContentHeight.value = realHeight
|
|
307
|
+
changed = true
|
|
308
|
+
}
|
|
288
309
|
|
|
289
|
-
|
|
290
|
-
const actualHeight = contentRef.value.scrollHeight;
|
|
291
|
-
if (actualHeight !== actualContentHeight.value) {
|
|
292
|
-
actualContentHeight.value = actualHeight;
|
|
310
|
+
if (changed) {
|
|
293
311
|
nextTick(() => {
|
|
294
312
|
updateShapeBounds()
|
|
295
313
|
debouncedReportMetrics()
|
|
296
314
|
})
|
|
297
|
-
|
|
298
315
|
}
|
|
299
|
-
}
|
|
316
|
+
}
|
|
300
317
|
|
|
301
318
|
// 更新组件宽度和高度
|
|
319
|
+
/**
|
|
320
|
+
* 更新组件宽高
|
|
321
|
+
*/
|
|
302
322
|
const updateShapeBounds = () => {
|
|
303
|
-
//
|
|
304
|
-
const
|
|
323
|
+
// 内容区左右 padding:foreignObject x=12,左右一共约 24
|
|
324
|
+
const contentRequiredWidth = actualContentWidth.value > 0
|
|
325
|
+
? actualContentWidth.value + 24
|
|
326
|
+
: 0
|
|
327
|
+
|
|
328
|
+
// 标题区和内容区,取最大值
|
|
329
|
+
const requiredWidth = Math.max(
|
|
330
|
+
estimatedTextWidth.value,
|
|
331
|
+
contentRequiredWidth,
|
|
332
|
+
150
|
|
333
|
+
)
|
|
334
|
+
|
|
335
|
+
// 计算最小总高度
|
|
336
|
+
const minTotalHeight = headerHeight.value + 15 + contentHeight.value + 10
|
|
305
337
|
|
|
306
|
-
// 设置一个基于字体大小的最小高度,确保字体较大时组件也能正常显示
|
|
307
338
|
const fontSizeBasedMinHeight = Math.max(
|
|
308
339
|
(keywordsStyle.value.fontSize || 12) * 3,
|
|
309
340
|
(nameStyle.value.fontSize || 12) * 3
|
|
310
|
-
) + 50
|
|
311
|
-
|
|
312
|
-
// 设置一个明确的最小高度限制,确保组件不会太小
|
|
313
|
-
const explicitMinHeight = 110; // 明确的最小高度值,不小于100
|
|
314
|
-
const effectiveMinHeight = Math.max(minTotalHeight, fontSizeBasedMinHeight, explicitMinHeight);
|
|
341
|
+
) + 50
|
|
315
342
|
|
|
316
|
-
|
|
317
|
-
const
|
|
318
|
-
|
|
343
|
+
const explicitMinHeight = 110
|
|
344
|
+
const effectiveMinHeight = Math.max(
|
|
345
|
+
minTotalHeight,
|
|
346
|
+
fontSizeBasedMinHeight,
|
|
347
|
+
explicitMinHeight
|
|
348
|
+
)
|
|
319
349
|
|
|
320
|
-
|
|
321
|
-
const
|
|
350
|
+
const currentWidth = props.shape.bounds?.width || 0
|
|
351
|
+
const currentHeight = props.shape.bounds?.height || 0
|
|
322
352
|
|
|
323
|
-
|
|
324
|
-
const
|
|
353
|
+
const nextWidth = Math.max(currentWidth, requiredWidth)
|
|
354
|
+
const nextHeight = Math.max(currentHeight, effectiveMinHeight)
|
|
325
355
|
|
|
326
|
-
//
|
|
327
|
-
|
|
328
|
-
if (currentHeight < effectiveMinHeight) {
|
|
329
|
-
updates.height = effectiveMinHeight;
|
|
330
|
-
}
|
|
356
|
+
// 宽高没变就不更新,避免死循环
|
|
357
|
+
if (nextWidth === currentWidth && nextHeight === currentHeight) return
|
|
331
358
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
graphStore.updateShape(props.shape.id, {
|
|
341
|
-
bounds: {
|
|
342
|
-
...props.shape.bounds,
|
|
343
|
-
...updates
|
|
344
|
-
}
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
};
|
|
359
|
+
graphStore.updateShape(props.shape.id, {
|
|
360
|
+
bounds: {
|
|
361
|
+
...props.shape.bounds,
|
|
362
|
+
width: nextWidth,
|
|
363
|
+
height: nextHeight
|
|
364
|
+
}
|
|
365
|
+
})
|
|
366
|
+
}
|
|
348
367
|
|
|
349
368
|
// 添加额外的尺寸保护,在拖拽结束后强制检查最小尺寸
|
|
350
369
|
const enforceMinSizeOnResizeEnd = () => {
|
|
@@ -389,7 +408,7 @@ const debouncedUpdateShapeBounds = debounce(updateShapeBounds, 100);
|
|
|
389
408
|
|
|
390
409
|
// 监听尺寸变化,更新compartment区域
|
|
391
410
|
const debouncedReportMetrics = debounce(reportMetrics, 100);
|
|
392
|
-
const
|
|
411
|
+
const debouncedMeasureContentSize = debounce(measureContentSize, 100)
|
|
393
412
|
|
|
394
413
|
// 监听拖拽缩放事件
|
|
395
414
|
const handleDragStart = () => {
|
|
@@ -407,7 +426,7 @@ onMounted(() => {
|
|
|
407
426
|
nextTick(() => {
|
|
408
427
|
reportMetrics();
|
|
409
428
|
// 初始测量内容高度
|
|
410
|
-
setTimeout(
|
|
429
|
+
setTimeout(measureContentSize, 0)
|
|
411
430
|
// 初始更新图元尺寸
|
|
412
431
|
updateShapeBounds();
|
|
413
432
|
});
|
|
@@ -419,7 +438,7 @@ onMounted(() => {
|
|
|
419
438
|
eventBus.on('shape-resize-end', enforceMinSizeOnResizeEnd);
|
|
420
439
|
|
|
421
440
|
// 监听内容变化相关的事件
|
|
422
|
-
window.addEventListener('resize',
|
|
441
|
+
window.addEventListener('resize', debouncedMeasureContentSize)
|
|
423
442
|
});
|
|
424
443
|
|
|
425
444
|
// 监听shape变化,重新计算尺寸
|
|
@@ -428,7 +447,7 @@ watch(() => [props.shape.name, props.shape.keywords, props.shape.bounds?.width,
|
|
|
428
447
|
nextTick(() => {
|
|
429
448
|
reportMetrics();
|
|
430
449
|
// 当内容或宽度变化时重新测量高度
|
|
431
|
-
|
|
450
|
+
debouncedMeasureContentSize()
|
|
432
451
|
});
|
|
433
452
|
}
|
|
434
453
|
}, { deep: true }); // 启用深度监听以捕获样式对象的变化
|
|
@@ -487,8 +506,7 @@ watch(
|
|
|
487
506
|
() => {
|
|
488
507
|
if (!isResizing.value) {
|
|
489
508
|
nextTick(() => {
|
|
490
|
-
|
|
491
|
-
debouncedMeasureContentHeight()
|
|
509
|
+
debouncedMeasureContentSize()
|
|
492
510
|
})
|
|
493
511
|
}
|
|
494
512
|
},
|
|
@@ -499,7 +517,7 @@ onBeforeUnmount(() => {
|
|
|
499
517
|
eventBus.off('shape-drag-end', handleDragEnd);
|
|
500
518
|
eventBus.off('shape-resize-start', handleDragStart);
|
|
501
519
|
eventBus.off('shape-resize-end', enforceMinSizeOnResizeEnd);
|
|
502
|
-
window.removeEventListener('resize',
|
|
520
|
+
window.removeEventListener('resize', debouncedMeasureContentSize)
|
|
503
521
|
});
|
|
504
522
|
// ================== 监听 bounds 宽高变化 ==================
|
|
505
523
|
|
|
@@ -521,24 +539,22 @@ const lastBounds = ref({
|
|
|
521
539
|
watch(
|
|
522
540
|
() => [props.shape.bounds.width, props.shape.bounds.height],
|
|
523
541
|
([newW, newH]) => {
|
|
524
|
-
|
|
525
|
-
|
|
542
|
+
// 只有真实图元变化时,才通知父元素扩容
|
|
543
|
+
if (isGhost.value) return
|
|
544
|
+
|
|
526
545
|
const width = newW ?? DEFAULT_WIDTH
|
|
527
546
|
const height = newH ?? DEFAULT_HEIGHT
|
|
528
547
|
|
|
529
|
-
// 如果和上一次一致,直接返回,避免重复触发
|
|
530
548
|
if (
|
|
531
|
-
width
|
|
532
|
-
height
|
|
549
|
+
width === lastBounds.value.width &&
|
|
550
|
+
height === lastBounds.value.height
|
|
533
551
|
) {
|
|
534
552
|
return
|
|
535
553
|
}
|
|
536
554
|
|
|
537
|
-
// 更新“上一次”的记录
|
|
538
555
|
lastBounds.value = { width, height }
|
|
539
|
-
|
|
540
|
-
if (
|
|
541
|
-
width !== DEFAULT_WIDTH || height !== DEFAULT_HEIGHT) {
|
|
556
|
+
|
|
557
|
+
if (width !== DEFAULT_WIDTH || height !== DEFAULT_HEIGHT) {
|
|
542
558
|
graphStore.expandParentAndEmitSizeUpdateByChild(props.shape)
|
|
543
559
|
}
|
|
544
560
|
}
|