From 7bb02d78776645b5fd59bd43df01b566d70edf58 Mon Sep 17 00:00:00 2001 From: zhangtengjin <1257450210@qq.com> Date: Tue, 5 Dec 2023 11:06:46 +0800 Subject: [PATCH] fix: querySelectorAll topology-svg path --- src/lib/components/topology/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/topology/index.tsx b/src/lib/components/topology/index.tsx index b209a3f8..eb21f557 100644 --- a/src/lib/components/topology/index.tsx +++ b/src/lib/components/topology/index.tsx @@ -1204,7 +1204,7 @@ class Topology extends React.Component { * 遍历所有线条,生成[{ data: {origin, po}, point: [] }] 结构 */ getCurvePointsAndLineOriginMap = () => { - const pathElements = document.getElementsByTagName('path'); + const pathElements = document.querySelectorAll('svg.topology-svg path'); // 创建一个空数组来存储匹配的路径点 let linePointsMap = []; // 遍历路径标签,筛选出 stroke-width 属性为"20"的路径