Working with SVG polygon elements

前端 未结 4 548
暖寄归人
暖寄归人 2021-02-05 09:39

I\'m trying to work with an SVG polygon and javascript. I create a polygon and set its initial point list like this:

var polygon = document.createElementNS(\'htt         


        
4条回答
  •  北海茫月
    2021-02-05 09:50

    You need to set all points at once, the performance is pretty solid, what you may want to do is manage the array outside and merge it on the setAttribute calls

提交回复
热议问题