Closed darkfiredarkhalo closed 2 years ago
const startPath1 = "M 20 720 L 100 100"; // 上路开始阶段 const startPath2 = "M 20 720 L 200 200"; // 中路前半段 const startPath3 = "M 20 720 L 500 100"; // 下路开始阶段 useEffect(() => { drawDemo(); }, []); const drawDemo = () => { const demoDraw = SVG().addTo(".demoBox").size(750, 600); demoDraw.path(startPath1).attr({ fill: "none", stroke: "red" }); demoDraw.path(startPath2).attr({ fill: "none", stroke: "green" }); demoDraw.path(startPath3).attr({ fill: "none", stroke: "blue" }); };
result:
Please recreate this in a codepen or jsfiddle
Your svg is simply not big enough to hold the whole line
result:
![image](https://user-images.githubusercontent.com/13959162/148903183-f7b80c1d-678b-486d-9957-c9536879ae3c.png)