|
|
|
@ -444,6 +444,7 @@ export default { |
|
|
|
svg: null, |
|
|
|
fileList:[], |
|
|
|
selectedFileId:"", |
|
|
|
lastNodeL:"" |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
@ -831,14 +832,35 @@ export default { |
|
|
|
const graphInstance = this.$refs.graphRef.getInstance(); |
|
|
|
let node = graphInstance.getNodeById(nodeObject.id) |
|
|
|
let relinks = graphInstance.getLinesByNode(node); |
|
|
|
|
|
|
|
console.log(node.id) |
|
|
|
// let links = graphInstance.getLinks(); |
|
|
|
// |
|
|
|
// for (let i=0;i<links.length;i++){ |
|
|
|
// graphInstance.getLinks()[i].lineWidth = 1 |
|
|
|
// } |
|
|
|
|
|
|
|
if (this.lastNodeL.id==node.id){ |
|
|
|
console.log("ss11111111") |
|
|
|
for (let i=0;i<relinks.length;i++){ |
|
|
|
console.log(graphInstance.getLinesByNode(node)[i].lineWidth) |
|
|
|
if (graphInstance.getLinesByNode(node)[i].lineWidth == 10){ |
|
|
|
graphInstance.getLinesByNode(node)[i].lineWidth = 1 |
|
|
|
}else{ |
|
|
|
}else { |
|
|
|
graphInstance.getLinesByNode(node)[i].lineWidth = 10 |
|
|
|
} |
|
|
|
} |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.lastNodeL!=""){ |
|
|
|
let a = graphInstance.getLinesByNode(this.lastNodeL); |
|
|
|
for (let i=0;i<a.length;i++){ |
|
|
|
graphInstance.getLinesByNode(this.lastNodeL)[i].lineWidth = 1 |
|
|
|
} |
|
|
|
} |
|
|
|
for (let i=0;i<relinks.length;i++){ |
|
|
|
graphInstance.getLinesByNode(node)[i].lineWidth = 10 |
|
|
|
} |
|
|
|
this.lastNodeL = node |
|
|
|
}, |
|
|
|
getNodeColor(leve){ |
|
|
|
let color = "" |
|
|
|
|