scripts/aiv_ui.js
/**
         * @function buildRefsFromCyData - Helper function to build Ref dropdown from JSON export by going inside the cytoscape app data (specifically the edges)
         * @param {object} AIVObj - reference to global namespace AIV object, with access to cytoscape methods
         */
@function buildRefsFromCyData - Helper function to build Ref dropdown from JSON export by going inside the cytoscape app data (specifically the edges)
@param {object} AIVObj - reference to global namespace AIV object, with access to cytoscape methods
@function buildRefsFromCyData - Helper function to build Ref dropdown from JSON export by going inside the cytoscape app data ( specifically the edges ) @param { object } AIVObj - reference to global namespace AIV object with access to cytoscape methods
function buildRefsFromCyData(AIVObj){
            let arrOfPubs = [];
            AIVObj.cy.filter('edge[?reference]').forEach(function(edge){
                arrOfPubs.push(edge.data('reference'));
            });
            let arrOfPubsUnique = arrOfPubs.filter(function(item, index, selfArr){ 
                return index === selfArr.indexOf(item);
            });
            AIVObj.buildRefDropdown(arrOfPubsUnique);
        }
function buildRefsFromCyData ( AIVObj ) { let arrOfPubs = [ ] ; AIVObj . cy . filter ( 'edge[?reference]' ) . forEach ( function ( edge ) { arrOfPubs . push ( edge . data ( 'reference' ) ) ; } ) ; let arrOfPubsUnique = arrOfPubs . filter ( function ( item , index , selfArr ) { return index === selfArr . indexOf ( item ) ; } ) ; AIVObj . buildRefDropdown ( arrOfPubsUnique ) ; }
@function buildRefsFromCyData - Helper function to build Ref dropdown from JSON export by going inside the cytoscape app data (specifically the edges)
 @param {object} AIVObj - reference to global namespace AIV object, with access to cytoscape methods
@function buildRefsFromCyData - Helper function to build Ref dropdown from JSON export by going inside the cytoscape app data ( specifically the edges ) @param { object } AIVObj - reference to global namespace AIV object with access to cytoscape methods
// delete duplicates