nl_tokens: Gets a recycled SVG element from the pool svgElementMap or creates a new element for the given type . Any data specified by D3 will be copied to the element . Returns a function which is evaluated by D3 .
pl_tokens: function getSVG ( elementType ) { var returnVal ; var svgElement ; var cached ; switch ( elementType ) { case 'circle' : case 'g' : case 'path' : case 'text' : returnVal = function ( data ) { svgElement = svgElementMap [ elementType ] . pop ( ) ; cached = svgElement != null ; svgElement = svgElement != null ? svgElement : document . createElementNS ( 'http://www.w3.org/2000/svg' , elementType ) ; // Copy data to SVG element. if ( typeof data === 'object' ) { for ( var key in data ) { svgElement . setAttribute ( key , data [ key ] ) ; } } return svgElement ; } ; break ; <mask> : throw new TypeError ( 'getSVG error: unknown elementType.' ) ; } return returnVal ; }