example/js/svg.js
function assignNewId(node) {
  // do the same for SVG child nodes as well
  for (var i = node.childNodes.length - 1; i >= 0; i--)
    if (node.childNodes[i] instanceof SVGElement)
      assignNewId(node.childNodes[i])

  return SVG.adopt(node).id(SVG.eid(node.nodeName))
}
function assignNewId(node) {
  // do the same for SVG child nodes as well
  for (var i = node.childNodes.length - 1; i >= 0; i--)
    if (node.childNodes[i] instanceof SVGElement)
      assignNewId(node.childNodes[i])

  return SVG.adopt(node).id(SVG.eid(node.nodeName))
}
function assignNewId ( node ) { // do the same for SVG child nodes as well for ( var i = node . childNodes . length - 1 ; i >= 0 ; i -- ) if ( node . childNodes [ i ] instanceof SVGElement ) assignNewId ( node . childNodes [ i ] ) return SVG . adopt ( node ) . id ( SVG . eid ( node . nodeName ) ) }
Deep new id assignment
Deep new id assignment