function updateColumnWidths(newColumnDefinitions) {
      // cache the old column widths so we can see which ones changed:
      var columnCount = columns.length;
      var oldColumnWidths = new Array(columnCount);
      var j, c;
      for (j = 0; j < columnCount; j++) {
        c = columns[j];
        assert(c);
        oldColumnWidths[j] = c.width;
      }

      parseColumns(newColumnDefinitions);
      updateColumnCaches();
      
      // compare the new column set against the old one:
      assert(columns.length === columnCount);
      var adjustedColumns = [];
      for (j = 0; j < columnCount; j++) {
        c = columns[j];
        assert(c);
        if (oldColumnWidths[j] !== c.width) {
          adjustedColumns.push(c);
          if (c.rerenderOnResize) {
            invalidateColumn(j);
          }
        }
      }
      if (initialized) {
        // Surgically update all cell widths, including header cells:
        //applyColumnWidths(); -- happens already inside the next statement: updateCanvasWidth()
        var rv = updateCanvasWidth();
        trigger(self.onColumnsResized, { 
          adjustedColumns: adjustedColumns, 
          success: rv 
        });
        return rv;
      }
      return false;
    }
// Given a column definition object, do all the steps required to react to a change in the widths of any of the columns
Given a column definition object, do all the steps required to react to a change in the widths of any of the columns
Given a column definition object do all the steps required to react to a change in the widths of any of the columns
function updateColumnWidths(newColumnDefinitions) {
      var columnCount = columns.length;
      var oldColumnWidths = new Array(columnCount);
      var j, c;
      for (j = 0; j < columnCount; j++) {
        c = columns[j];
        assert(c);
        oldColumnWidths[j] = c.width;
      }
      parseColumns(newColumnDefinitions);
      updateColumnCaches();
      assert(columns.length === columnCount);
      var adjustedColumns = [];
      for (j = 0; j < columnCount; j++) {
        c = columns[j];
        assert(c);
        if (oldColumnWidths[j] !== c.width) {
          adjustedColumns.push(c);
          if (c.rerenderOnResize) {
            invalidateColumn(j);
          }
        }
      }
      if (initialized) {
        var rv = updateCanvasWidth();
        trigger(self.onColumnsResized, { 
          adjustedColumns: adjustedColumns, 
          success: rv 
        });
        return rv;
      }
      return false;
    }
function updateColumnWidths ( newColumnDefinitions ) { var columnCount = columns . length ; var oldColumnWidths = new Array ( columnCount ) ; var j , c ; for ( j = 0 ; j < columnCount ; j ++ ) { c = columns [ j ] ; assert ( c ) ; oldColumnWidths [ j ] = c . width ; } parseColumns ( newColumnDefinitions ) ; updateColumnCaches ( ) ; assert ( columns . length === columnCount ) ; var adjustedColumns = [ ] ; for ( j = 0 ; j < columnCount ; j ++ ) { c = columns [ j ] ; assert ( c ) ; if ( oldColumnWidths [ j ] !== c . width ) { adjustedColumns . push ( c ) ; if ( c . rerenderOnResize ) { invalidateColumn ( j ) ; } } } if ( initialized ) { var rv = updateCanvasWidth ( ) ; trigger ( self . onColumnsResized , { adjustedColumns : adjustedColumns , success : rv } ) ; return rv ; } return false ; }
Given a column definition object, do all the steps required to react to a change in the widths of any of the columns
Given a column definition object do all the steps required to react to a change in the widths of any of the columns
// cache the old column widths so we can see which ones changed: // compare the new column set against the old one: // Surgically update all cell widths, including header cells: //applyColumnWidths(); -- happens already inside the next statement: updateCanvasWidth()