hive/html/js-graph/vjSVG_base.js
/*! Modify or append a trivial child to an SVG element
 * \param obj An SVG element
 * \param tagName Tag name of child
 * \param data textContent of child
 * \param options Options object; options.unshift means if the child is to be appended,
 * it will be unshifted (inserted as the first child)
 */
Modify or append a trivial child to an SVG element
\param obj An SVG element
\param tagName Tag name of child
\param data textContent of child
\param options Options object; options.unshift means if the child is to be appended,
it will be unshifted (inserted as the first child)
Modify or append a trivial child to an SVG element \ param obj An SVG element \ param tagName Tag name of child \ param data textContent of child \ param options Options object ; options . unshift means if the child is to be appended it will be unshifted ( inserted as the first child )
function vjSVGSetTrivialChild(obj, tagName, data, options)
{
    for (var c = obj.firstChild; c; c = c.nextSibling)
        if (c.tagName === tagName) {
            c.textContent = data;
            return;
        }
    var elt = document.createElementNS(vjSVGElementSource, tagName);
    elt.textContent = data;
    if (options && options.unshift && obj.firstChild)
        obj.insertBefore(elt, obj.firstChild);
    else
        obj.appendChild(elt);
}
function vjSVGSetTrivialChild ( obj , tagName , data , options ) { for ( var c = obj . firstChild ; c ; c = c . nextSibling ) if ( c . tagName === tagName ) { c . textContent = data ; return ; } var elt = document . createElementNS ( vjSVGElementSource , tagName ) ; elt . textContent = data ; if ( options && options . unshift && obj . firstChild ) obj . insertBefore ( elt , obj . firstChild ) ; else obj . appendChild ( elt ) ; }
Modify or append a trivial child to an SVG element
 \param obj An SVG element
 \param tagName Tag name of child
 \param data textContent of child
 \param options Options object; options.unshift means if the child is to be appended,
 it will be unshifted (inserted as the first child)
Modify or append a trivial child to an SVG element \ param obj An SVG element \ param tagName Tag name of child \ param data textContent of child \ param options Options object ; options . unshift means if the child is to be appended it will be unshifted ( inserted as the first child )