|
@@ -386,7 +386,7 @@
|
|
|
<el-dropdown-item command="classic" :class="styleOptions.startArrow=='classic'?'style-acitve':''">
|
|
|
有
|
|
|
</el-dropdown-item>
|
|
|
- <el-dropdown-item :command="{}" :class="typeof(styleOptions.startArrow)=='string' || styleOptions.startArrow.name?'':'style-acitve'">
|
|
|
+ <el-dropdown-item command="" :class="styleOptions.startArrow?'':'style-acitve'">
|
|
|
无
|
|
|
</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
@@ -412,7 +412,7 @@
|
|
|
<el-dropdown-item command="classic" :class="styleOptions.endArrow=='classic'?'style-acitve':''">
|
|
|
有
|
|
|
</el-dropdown-item>
|
|
|
- <el-dropdown-item :command="{}" :class="typeof(styleOptions.endArrow)=='string' || styleOptions.endArrow.name?'':'style-acitve'">
|
|
|
+ <el-dropdown-item command="" :class="styleOptions.endArrow?'':'style-acitve'">
|
|
|
无
|
|
|
</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
@@ -838,6 +838,7 @@ import { svgToBase64 } from '@/utils/svgToblob'
|
|
|
// });
|
|
|
},
|
|
|
beforeDestroy(){
|
|
|
+ clearInterval(this.loopTimer)
|
|
|
document.getElementById('sand-mainBody-chart').removeEventListener("dragover",this.edgeDragover)
|
|
|
document.getElementById('sand-mainBody-chart').removeEventListener("drop",this.edgeDrop)
|
|
|
this.popoverDom.removeEventListener('mouseenter',this.clearPopoverTimeout)
|
|
@@ -1274,13 +1275,13 @@ import { svgToBase64 } from '@/utils/svgToblob'
|
|
|
}
|
|
|
// console.log(leftImg,rightImg,'rightImg');
|
|
|
|
|
|
- let textNode = document.createElement('text')
|
|
|
- textNode.setAttribute('x',x-tx+width-90)
|
|
|
- textNode.setAttribute('y',y-ty+height+22)
|
|
|
- textNode.setAttribute('font-size','16px')
|
|
|
- textNode.setAttribute('font-style','italic')
|
|
|
- textNode.innerText = '来源:弘则研究'
|
|
|
- gNode.appendChild(textNode)
|
|
|
+ // let textNode = document.createElement('text')
|
|
|
+ // textNode.setAttribute('x',x-tx+width-90)
|
|
|
+ // textNode.setAttribute('y',y-ty+height+22)
|
|
|
+ // textNode.setAttribute('font-size','16px')
|
|
|
+ // textNode.setAttribute('font-style','italic')
|
|
|
+ // textNode.innerText = '来源:弘则研究'
|
|
|
+ // gNode.appendChild(textNode)
|
|
|
},
|
|
|
copyStyles:false,
|
|
|
stylesheet: `
|
|
@@ -1361,16 +1362,16 @@ import { svgToBase64 } from '@/utils/svgToblob'
|
|
|
},{
|
|
|
preserveDimensions:true,//让svg为实际图片大小
|
|
|
beforeSerialize:(svg)=>{
|
|
|
- const zoom = this.graph.zoom();
|
|
|
+ // const zoom = this.graph.zoom();
|
|
|
const {x,y,width,height} = this.graph.getContentBBox(cells)
|
|
|
- let {tx,ty} = this.graph.translate() // 画布偏移量
|
|
|
+ // let {tx,ty} = this.graph.translate() // 画布偏移量
|
|
|
//给导出的svg增加一点宽高
|
|
|
- svg.setAttribute('width',width+60*zoom)
|
|
|
- svg.setAttribute('height',height+60*zoom)
|
|
|
+ svg.setAttribute('width',width+60)
|
|
|
+ svg.setAttribute('height',height+60)
|
|
|
//设置viewBox使图像居中
|
|
|
- svg.setAttribute('viewBox',`${x-30*zoom} ${y-30*zoom} ${width+60*zoom} ${height+60*zoom}`)
|
|
|
- // 在图表右下方 加上"来源:弘则研究"字样
|
|
|
- let gNode = svg.getElementsByClassName('x6-graph-svg-viewport')[0]
|
|
|
+ svg.setAttribute('viewBox',`${x-30} ${y-30} ${width+60} ${height+60}`)
|
|
|
+ // // 在图表右下方 加上"来源:弘则研究"字样
|
|
|
+ // let gNode = svg.getElementsByClassName('x6-graph-svg-viewport')[0]
|
|
|
// 去掉不该截图的添加图标
|
|
|
let leftImg = svg.getElementsByClassName('left-topic-image')
|
|
|
for (let i = 0; i < leftImg.length; i++) {
|
|
@@ -1384,13 +1385,13 @@ import { svgToBase64 } from '@/utils/svgToblob'
|
|
|
element.parentElement.removeChild(element)
|
|
|
i--
|
|
|
}
|
|
|
- let textNode = document.createElement('text')
|
|
|
- textNode.setAttribute('x',(x-tx+width)/zoom-85)
|
|
|
- textNode.setAttribute('y',(y-ty+height)/zoom+27)
|
|
|
- textNode.setAttribute('font-size','16px')
|
|
|
- textNode.setAttribute('font-style','italic')
|
|
|
- textNode.innerText = '来源:弘则研究'
|
|
|
- gNode.appendChild(textNode)
|
|
|
+ // let textNode = document.createElement('text')
|
|
|
+ // textNode.setAttribute('x',(x-tx+width)/zoom-85)
|
|
|
+ // textNode.setAttribute('y',(y-ty+height)/zoom+27)
|
|
|
+ // textNode.setAttribute('font-size','16px')
|
|
|
+ // textNode.setAttribute('font-style','italic')
|
|
|
+ // textNode.innerText = '来源:弘则研究'
|
|
|
+ // gNode.appendChild(textNode)
|
|
|
},
|
|
|
copyStyles:false,
|
|
|
stylesheet: `
|