svgdotjs / svg.js

The lightweight library for manipulating and animating SVG
https://svgjs.dev
Other
11.04k stars 1.07k forks source link

Is it OK that remove() is not delete and forget? #1114

Closed VitaliyAT closed 4 years ago

VitaliyAT commented 4 years ago

Found that if I use SVG(id).remove(); visually it removed, but if I create it again with the same function (var, id) - it return removed svg element and add new geometry on it. If it was a = 10 .line(a) after that I delete svg and crete a = 20 .line(a) I have 10 and 20 lines in one new svg. That mean, element remembered in memory and geometry just add to it, isn't it? How I can do "delete and forget" this element?

Fuzzyma commented 4 years ago

Stop spamming my issues please!

If you have a question, visit stackoverflow or our chat. Its even written in the issue template!

PS: remove removes the element from the dom. Its gone! you ccan reattach it if you want but it wont appear magically