I'm using the SVG.js library, I have a group created with the draw.group()
function and I'd like to apply attributes to every element in the group. I've tried accessing the group.children
and group.childNodes
directly, tried using a group.forEach(function(){});
loop. Can't figure it out and couldn't find anything in the docs.
On that note, I find the docs somewhat lacking and certainly in no danger of verbosity...
I eventually found the
group.children()
method in the docs which will return an iterable array of the group's children.Attributes may be applied to each child element using a loop, for example: