fix:流程图支持相同两个节点间多条线

This commit is contained in:
shijing 2025-07-15 16:36:21 +08:00
parent 80c8cfdd85
commit e690a10951
2 changed files with 6 additions and 4 deletions

View File

@ -60,7 +60,7 @@ export default {
if(that.g!==null){
that.updateGraph();
}else{
that.g = new dagreD3.graphlib.Graph().setGraph({
that.g = new dagreD3.graphlib.Graph({multigraph: true}).setGraph({
rankdir: that.rankdir,
nodesep: 40,
edgesep: 25, //线
@ -89,8 +89,9 @@ export default {
that.edges.forEach((transition0) => {
that.g.setEdge(transition0.source,transition0.target,{
label: transition0.label,//
id: transition0.id,
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px", // 线
});
},transition0.id);
});
//
let render = new dagreD3.render();

View File

@ -60,7 +60,7 @@ export default {
if(that.g!==null){
that.updataGraph();
}else{
that.g = new dagreD3.graphlib.Graph().setGraph({
that.g = new dagreD3.graphlib.Graph({multigraph: true,}).setGraph({
rankdir: that.rankdir,
nodesep: 40,
edgesep: 25, //线
@ -89,8 +89,9 @@ export default {
that.edges.forEach((transition0) => {
that.g.setEdge(transition0.source,transition0.target,{
label: transition0.label,//
id: transition0.id,
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px", // 线
});
}, transition0.id);
});
//
let render = new dagreD3.render();