scripts/aiv_ui.js
/**
     * @function changeLayoutCyHouseCleaning - Helper function that will be run before a new layout is executed
     * @param {object} AIVObjReference - reference to global namespace AIV object, with access to cytoscape methods
     * @param {boolean} coseOrNot - boolean to determine if this is a cose layout change or not
     */
@function changeLayoutCyHouseCleaning - Helper function that will be run before a new layout is executed
@param {object} AIVObjReference - reference to global namespace AIV object, with access to cytoscape methods
@param {boolean} coseOrNot - boolean to determine if this is a cose layout change or not
@function changeLayoutCyHouseCleaning - Helper function that will be run before a new layout is executed @param { object } AIVObjReference - reference to global namespace AIV object with access to cytoscape methods @param { boolean } coseOrNot - boolean to determine if this is a cose layout change or not
function changeLayoutCyHouseCleaning(AIVObjReference, coseOrNot){
        $('#cerebralBackground').remove(); 
        AIVObjReference.cy.removeListener('zoom pan', window.cerebralNamespace.zoomPanCerebralEListener); 
        AIVObjReference.cy.removeListener('zoom pan', window.cerebralNamespace.resizeCerebralElistener); 
        AIVObjReference.cy.reset(); 
        if (!coseOrNot){
            AIVObjReference.removeLocalizationCompoundNodes();
        }
    }
function changeLayoutCyHouseCleaning ( AIVObjReference , coseOrNot ) { $ ( '#cerebralBackground' ) . remove ( ) ; AIVObjReference . cy . removeListener ( 'zoom pan' , window . cerebralNamespace . zoomPanCerebralEListener ) ; AIVObjReference . cy . removeListener ( 'zoom pan' , window . cerebralNamespace . resizeCerebralElistener ) ; AIVObjReference . cy . reset ( ) ; if ( ! coseOrNot ) { AIVObjReference . removeLocalizationCompoundNodes ( ) ; } }
@function changeLayoutCyHouseCleaning - Helper function that will be run before a new layout is executed
 @param {object} AIVObjReference - reference to global namespace AIV object, with access to cytoscape methods
 @param {boolean} coseOrNot - boolean to determine if this is a cose layout change or not
@function changeLayoutCyHouseCleaning - Helper function that will be run before a new layout is executed @param { object } AIVObjReference - reference to global namespace AIV object with access to cytoscape methods @param { boolean } coseOrNot - boolean to determine if this is a cose layout change or not
//remove the canvas underlay from localization layout // remove the canvas resizing event listener when the user selected cerebral layout // remove the canvas resizing event listener when the browser resizes //resets pan and zoom positions