fileHandling.js
//Removes selected compounds from the list and clears them from the relevant viewers
Removes selected compounds from the list and clears them from the relevant viewers
Removes selected compounds from the list and clears them from the relevant viewers
function clear_fxn(){
   var IDs = $$('uploadTable').getSelectedId(true);
   var x, y;
   for(var a=0; a<IDs.length; a++){
      x = $$('uploadTable').getItem(IDs[a]).col;
      y = $$('uploadTable').getItem(IDs[a]).row;
      var fType = getFileType(IDs[a]);
      if (validCoordinates(x,y)){
         var viewer = $$('viewer'+x+','+y).getWindow();
         viewer.glviewer.clear();
         viewer.toDefaultDisp();
      }
   }
   $$('uploadTable').remove(IDs);
   $$('comp_table').remove(IDs);
}
function clear_fxn ( ) { var IDs = $$ ( 'uploadTable' ) . getSelectedId ( true ) ; var x , y ; for ( var a = 0 ; a < IDs . length ; a ++ ) { x = $$ ( 'uploadTable' ) . getItem ( IDs [ a ] ) . col ; y = $$ ( 'uploadTable' ) . getItem ( IDs [ a ] ) . row ; var fType = getFileType ( IDs [ a ] ) ; if ( validCoordinates ( x , y ) ) { var viewer = $$ ( 'viewer' + x + ',' + y ) . getWindow ( ) ; viewer . glviewer . clear ( ) ; viewer . toDefaultDisp ( ) ; } } $$ ( 'uploadTable' ) . remove ( IDs ) ; $$ ( 'comp_table' ) . remove ( IDs ) ; }
Removes selected compounds from the list and clears them from the relevant viewers
Removes selected compounds from the list and clears them from the relevant viewers
//$$(...).getSelectedId returns an array of selected items (with param (true)) //Go through each selected item and remove from viewer if it is loaded