scripts/aiv_ui.js
/**
     * @function filterExperimentalPPIsSwitch - add switch/checkbox functionality to filter EPPIs
     * @param {object} AIVObj - reference to the AIV namespace object
     */
@function filterExperimentalPPIsSwitch - add switch/checkbox functionality to filter EPPIs
@param {object} AIVObj - reference to the AIV namespace object
@function filterExperimentalPPIsSwitch - add switch / checkbox functionality to filter EPPIs @param { object } AIVObj - reference to the AIV namespace object
function filterExperimentalPPIsSwitch(AIVObj) {
        document.getElementById('filterEPPIsCheckbox').addEventListener('change', function(event){
            AIVObj.cy.$('.pearsonfilterEPPI').removeClass('pearsonfilterEPPI');
            AIVObj.cy.$('.filterByReference').removeClass('filterByReference');
            if (event.target.checked){
                document.getElementById('EPPICorrThreshold').removeAttribute("disabled");
                document.getElementById('overSelect').classList.remove('not-allowed');
                document.getElementById('pseudo-select').classList.remove('not-allowed');
                pearsonFilterEPPIonEles(AIVObj);
                filterEdgesByRefFunctionality(AIVObj);
            }
            else {
                document.getElementById('EPPICorrThreshold').setAttribute("disabled", "");
                document.getElementById('overSelect').classList.add('not-allowed');
                document.getElementById('pseudo-select').classList.add('not-allowed');
            }
        });
    }
function filterExperimentalPPIsSwitch ( AIVObj ) { document . getElementById ( 'filterEPPIsCheckbox' ) . addEventListener ( 'change' , function ( event ) { AIVObj . cy . $ ( '.pearsonfilterEPPI' ) . removeClass ( 'pearsonfilterEPPI' ) ; AIVObj . cy . $ ( '.filterByReference' ) . removeClass ( 'filterByReference' ) ; if ( event . target . checked ) { document . getElementById ( 'EPPICorrThreshold' ) . removeAttribute ( "disabled" ) ; document . getElementById ( 'overSelect' ) . classList . remove ( 'not-allowed' ) ; document . getElementById ( 'pseudo-select' ) . classList . remove ( 'not-allowed' ) ; pearsonFilterEPPIonEles ( AIVObj ) ; filterEdgesByRefFunctionality ( AIVObj ) ; } else { document . getElementById ( 'EPPICorrThreshold' ) . setAttribute ( "disabled" , "" ) ; document . getElementById ( 'overSelect' ) . classList . add ( 'not-allowed' ) ; document . getElementById ( 'pseudo-select' ) . classList . add ( 'not-allowed' ) ; } } ) ; }
@function filterExperimentalPPIsSwitch - add switch/checkbox functionality to filter EPPIs
 @param {object} AIVObj - reference to the AIV namespace object
@function filterExperimentalPPIsSwitch - add switch / checkbox functionality to filter EPPIs @param { object } AIVObj - reference to the AIV namespace object
// when checkbox is off, remove filter, when checkbox is on remove them and add them back on... // below logic is for cleaner UI to disable filters when switch is off // add filters back on