|
@@ -725,7 +725,9 @@ import { svgToBase64 } from '@/utils/svgToblob'
|
|
|
watch: {
|
|
|
initData(newval) {
|
|
|
// console.log(newval)
|
|
|
- this.init()
|
|
|
+ if(!this.graph){
|
|
|
+ this.init()
|
|
|
+ }
|
|
|
this.$nextTick(()=>{
|
|
|
this.graph.fromJSON(newval);
|
|
|
this.graph.zoomToFit()
|
|
@@ -821,7 +823,7 @@ import { svgToBase64 } from '@/utils/svgToblob'
|
|
|
this.$route.query.SandboxId && this.getGraphData(this.$route.query.SandboxId)
|
|
|
},
|
|
|
mounted(){
|
|
|
- // this.init()
|
|
|
+ this.init()
|
|
|
document.getElementById('sand-mainBody-chart').addEventListener("dragover",this.edgeDragover)
|
|
|
document.getElementById('sand-mainBody-chart').addEventListener("drop",this.edgeDrop)
|
|
|
this.popoverDom = $('#link-popover')[0];
|