svg marker does not work in IE9-10

后端 未结 7 579
礼貌的吻别
礼貌的吻别 2020-12-30 11:23

Working first time on svg. I have following svg definition for an \'arrow-like\' path


    

        
7条回答
  •  时光说笑
    2020-12-30 11:59

    The problem is already reported to Microsoft as xdhmoore wrote in his answer: https://connect.microsoft.com/IE/feedback/details/801938/dynamically-updated-svg-path-with-a-marker-end-does-not-update

    There is a fiddle where the problem is shown: http://jsfiddle.net/EEYZZ/

       //if (isIE10 || isIE11) {
           var parent = p1.parentNode;
           parent.removeChild(p1);
           parent.appendChild(p1);
       //}
    

    My workaround is to manuelly remove the node from DOM and add it again, this will update the node as wanted... Don't speak about performance and stuff, but I think currently there is no better way to do it. (http://jsfiddle.net/kaljak/5zTv9/3/)

提交回复
热议问题