scripts/aiv.js
/**
         * @namespace {object} AIV
         * @function modifySVGString - Expect a node as an object reference and modify its svgDonut string by adding a text tag
         * @param {object} geneNode - as a node object reference
         * @param {string} mapManNum - the first MapMan number (leftmost)
         */
@namespace {object} AIV
@function modifySVGString - Expect a node as an object reference and modify its svgDonut string by adding a text tag
@param {object} geneNode - as a node object reference
@param {string} mapManNum - the first MapMan number (leftmost)
@namespace { object } AIV @function modifySVGString - Expect a node as an object reference and modify its svgDonut string by adding a text tag @param { object } geneNode - as a node object reference @param { string } mapManNum - the first MapMan number ( leftmost )
function modifySVGString(geneNode, mapManNum) {
            if (typeof mapManNum === "undefined") {return;}
            let newSVGString = decodeURIComponent(geneNode.data('svgDonut')).replace("</svg>", ""); 
            newSVGString = newSVGString.replace('data:image/svg+xml;utf8,', "");
            let xPosition = mapManNum.length > 1 ? '32%' : '41%'; 
            let fontSize = geneNode.data('queryGene') ? 22 : 13; 
            newSVGString += `<text x='${xPosition}' y='59%' font-size='${fontSize}' font-family="Verdana" visibility="visible">${mapManNum}</text></svg>`;
            newSVGString = 'data:image/svg+xml;utf8,' + encodeURIComponent(newSVGString);
            geneNode.data('svgDonut', newSVGString);
        }
function modifySVGString ( geneNode , mapManNum ) { if ( typeof mapManNum === "undefined" ) { return ; } let newSVGString = decodeURIComponent ( geneNode . data ( 'svgDonut' ) ) . replace ( "</svg>" , "" ) ; newSVGString = newSVGString . replace ( 'data:image/svg+xml;utf8,' , "" ) ; let xPosition = mapManNum . length > 1 ? '32%' : '41%' ; let fontSize = geneNode . data ( 'queryGene' ) ? 22 : 13 ; newSVGString += ` ${ xPosition } ${ fontSize } ${ mapManNum } ` ; newSVGString = 'data:image/svg+xml;utf8,' + encodeURIComponent ( newSVGString ) ; geneNode . data ( 'svgDonut' , newSVGString ) ; }
@namespace {object} AIV
 @function modifySVGString - Expect a node as an object reference and modify its svgDonut string by adding a text tag
 @param {object} geneNode - as a node object reference
 @param {string} mapManNum - the first MapMan number (leftmost)
@namespace { object } AIV @function modifySVGString - Expect a node as an object reference and modify its svgDonut string by adding a text tag @param { object } geneNode - as a node object reference @param { string } mapManNum - the first MapMan number ( leftmost )
//strip </svg> closing tag // console.log(newSVGString); //i.e. check if single or double digit //Determine whether gene is bigger or not (i.e. search gene or not)