lib/gridupdater.js
/**
 * @description Main function: checks for changes to row and col number and
 * adds or deletes the appropriate accordingly.
 *
 * @function updategridfxn
 */
@description Main function: checks for changes to row and col number and
adds or deletes the appropriate accordingly.

@function updategridfxn
@description Main function : checks for changes to row and col number and adds or deletes the appropriate accordingly . @function updategridfxn
function updategridfxn() {
   var newNumRows = $$('grid_dim').getValues().numRow,
      newNumCols = $$('grid_dim').getValues().numCol;
   var origNumRows = $$('workLayout').getChildViews().length,
      origNumCols = $$('workRow1').getChildViews().length;
   var resized = false;
   if(newNumRows < origNumRows)
      deleteRows(newNumRows, origNumRows);
   else if(newNumRows > origNumRows){
      appendRows(newNumRows, origNumRows, newNumCols);
      resized = true;
   }
   if(newNumCols < origNumCols)
      deleteCols(newNumCols, origNumCols);
   else if(newNumCols > origNumCols){
      calculateCols(newNumCols);
      resized = true;
   }
   else 
      return;
}
function updategridfxn ( ) { var newNumRows = $$ ( 'grid_dim' ) . getValues ( ) . numRow , newNumCols = $$ ( 'grid_dim' ) . getValues ( ) . numCol ; var origNumRows = $$ ( 'workLayout' ) . getChildViews ( ) . length , origNumCols = $$ ( 'workRow1' ) . getChildViews ( ) . length ; var resized = false ; if ( newNumRows < origNumRows ) deleteRows ( newNumRows , origNumRows ) ; else if ( newNumRows > origNumRows ) { appendRows ( newNumRows , origNumRows , newNumCols ) ; resized = true ; } if ( newNumCols < origNumCols ) deleteCols ( newNumCols , origNumCols ) ; else if ( newNumCols > origNumCols ) { calculateCols ( newNumCols ) ; resized = true ; } else return ; }
@description Main function: checks for changes to row and col number and
 adds or deletes the appropriate accordingly.
@description Main function : checks for changes to row and col number and adds or deletes the appropriate accordingly .
//If nothing actually changed, exit the function