Fix:修复导出图片和svg时关联线的箭头消失的问题
This commit is contained in:
parent
a316d0f0fe
commit
7986e0d0cc
@ -402,6 +402,14 @@ class MindMap {
|
|||||||
let clone = svg.clone()
|
let clone = svg.clone()
|
||||||
// 添加必要的样式
|
// 添加必要的样式
|
||||||
clone.add(SVG(`<style>${cssContent}</style>`))
|
clone.add(SVG(`<style>${cssContent}</style>`))
|
||||||
|
// 修正关联线箭头marker的id
|
||||||
|
const markerList = svg.find('marker')
|
||||||
|
if (markerList && markerList.length > 0) {
|
||||||
|
const id = markerList[0].attr('id')
|
||||||
|
clone.find('marker').forEach((item) => {
|
||||||
|
item.attr('id', id)
|
||||||
|
})
|
||||||
|
}
|
||||||
// 如果实际图形宽高超出了屏幕宽高,且存在水印的话需要重新绘制水印,否则会出现超出部分没有水印的问题
|
// 如果实际图形宽高超出了屏幕宽高,且存在水印的话需要重新绘制水印,否则会出现超出部分没有水印的问题
|
||||||
if (
|
if (
|
||||||
(rect.width > origWidth || rect.height > origHeight) &&
|
(rect.width > origWidth || rect.height > origHeight) &&
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user