2015-06-02 30 views

回答

0

所有ID的屬性文件中必須是唯一的,你can't use name attributes在SVG讓葉類。

更換ID與

<path class ="test-arrow" d="M 1020 290 C1020,40 825,40 765,100" style="display: none; stroke: black; stroke-width: 5px; fill: none; marker-end: url(#markerArrow);"/> 
<path class ="test-arrow" d="M 960 385 C920,450 775,550 775,370" style="display: none; stroke: black; stroke-width: 5px; fill: none; marker-end: url(#markerArrow);"/> 

,並使用getElementsByClassName方法名稱修復的東西屬性。

這裏有一個更新的Plunk

+0

感謝偉大的工作 – SR34