I have an svg document that contains 4 instances of a symbol. I want to manipulate attributes within each instance separately. E.g. changes the text of some labels, change the color of a shape, move an internal shape.
This doesn't seem possible, because node list of a "SVGUseElement" is empty.
It seems to me that one would need to recursively unpack the content of each symbol into a new document.
Any thoughts?
Thanks!
A symbol is a view rather than a copy of the original. Change the original and all the views(symbols) will change. Sounds like you want to clone the nodes and manipulate the clones rather than using symbols.
var copy = element.cloneNode(true);
will create a copy of element and its children.Then you can things in the clone by referencing them using the copy variable.