From 7986e0d0cc9bbb9a10b9a24fe1f0f14b7c6be21d Mon Sep 17 00:00:00 2001 From: wanglin2 <1013335014@qq.com> Date: Wed, 11 Oct 2023 13:49:28 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E5=9B=BE=E7=89=87=E5=92=8Csvg=E6=97=B6=E5=85=B3?= =?UTF-8?q?=E8=81=94=E7=BA=BF=E7=9A=84=E7=AE=AD=E5=A4=B4=E6=B6=88=E5=A4=B1?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simple-mind-map/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/simple-mind-map/index.js b/simple-mind-map/index.js index 45b9180e..c4074dd2 100644 --- a/simple-mind-map/index.js +++ b/simple-mind-map/index.js @@ -402,6 +402,14 @@ class MindMap { let clone = svg.clone() // 添加必要的样式 clone.add(SVG(``)) + // 修正关联线箭头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 ( (rect.width > origWidth || rect.height > origHeight) &&