html and Svg to Canvas javascript

前端 未结 5 657
别那么骄傲
别那么骄傲 2021-02-02 01:36
&l
5条回答
  •  不思量自难忘°
    2021-02-02 02:04

    Your solution works beautifully. Since I am not using jQuery in my application, I had to change couple of lines in svgCanvas for getting the svg elements and iterating through them. The rest of the functions worked without any changes. My code is...

    function svgToCanvas (targetElem) {
            var nodesToRecover = [];
            var nodesToRemove = [];
    
            var svgElems = document.getElementsByTagName("svg");
    
            for (var i=0; i

提交回复
热议问题