Closed eriklouise closed 3 years ago
I think that is the behavior of svg.js. The raw SVG code is available in the options object, you could potentially parse it as vanilla DOM code and then generate an SVG.js object for each child node you want, does that make sense? However if you create an ID conflict, things are likely not going to work well for you. On the other hand, classes should be preserved over clones, so you could potentially add classes, then access them with each cloned DOM fragment handle.
Closing due to no follow up.
Hello ACE.SVG Fellows :-)
I'm currently writing a script to duplicate and arrange an SVG group according the size of my grafana dataset. This script was initially written (and this part was working fine) for marcuscalidus-svg-panel and I'm porting it to ace-svg-react (for better dataset handling). When I clone (clone then addto) an existing SVG group, all childs ids are messed up like "SvgjsG" instead of their original id. Is there a way to prevent this ?