src/visualizer-legacy/static/3dmol/js/3dmol.js
/*update surface based on selected action 
* 0 -  
* 1 - change surface
* 2 - set translucent
* 3 - set opaque
*/
update surface based on selected action
0
1 - change surface
2 - set translucent
3 - set opaque
update surface based on selected action 0 1 - change surface 2 - set translucent 3 - set opaque
function update_surface(action){
    var e = document.getElementById("selected_surface");
    var x = e.options[e.selectedIndex].value;
    glviewer.removeSurface(surf);
    switch (action){
        case 1:
            if (x == 'SAS')
               protein.surface = $3Dmol.SurfaceType.SAS;
            else if (x == 'SES')
                protein.surface = $3Dmol.SurfaceType.SES;
            else if (x == 'VDW')
                protein.surface = $3Dmol.SurfaceType.VDW;
            break;
        case 2:
            protein.opacity = 0.70;
            break;
        case 3: 
            protein.opacity = 1;
            break;
        case 4:
            protein.min_isoval = -5;
            protein.max_isoval = 5;
            break;
        default:
            break;
    }
        set_color();
    }
function update_surface ( action ) { var e = document . getElementById ( "selected_surface" ) ; var x = e . options [ e . selectedIndex ] . value ; glviewer . removeSurface ( surf ) ; switch ( action ) { case 1 : if ( x == 'SAS' ) protein . surface = $3Dmol . SurfaceType . SAS ; else if ( x == 'SES' ) protein . surface = $3Dmol . SurfaceType . SES ; else if ( x == 'VDW' ) protein . surface = $3Dmol . SurfaceType . VDW ; break ; case 2 : protein . opacity = 0.70 ; break ; case 3 : protein . opacity = 1 ; break ; case 4 : protein . min_isoval = - 5 ; protein . max_isoval = 5 ; break ; default : break ; } set_color ( ) ; }
update surface based on selected action
0 
1 - change surface
2 - set translucent
3 - set opaque
update surface based on selected action 0 1 - change surface 2 - set translucent 3 - set opaque