* Adjust the table column widths for new data. Note: you would probably want to * do a redraw after calling this function! * @param {object} settings dataTables settings object * @memberof DataTable#oApi
( settings )
| 700 | * @memberof DataTable#oApi |
| 701 | */ |
| 702 | function _fnAdjustColumnSizing ( settings ) |
| 703 | { |
| 704 | /* Not interested in doing column width calculation if auto-width is disabled */ |
| 705 | if ( settings.oFeatures.bAutoWidth !== false ) |
| 706 | { |
| 707 | var columns = settings.aoColumns; |
| 708 | |
| 709 | _fnCalculateColumnWidths( settings ); |
| 710 | for ( var i=0 , iLen=columns.length ; i<iLen ; i++ ) |
| 711 | { |
| 712 | columns[i].nTh.style.width = columns[i].sWidth; |
| 713 | } |
| 714 | } |
| 715 | |
| 716 | var scroll = settings.oScroll; |
| 717 | if ( scroll.sY !== '' || scroll.sX !== '') |
| 718 | { |
| 719 | _fnScrollDraw( settings ); |
| 720 | } |
| 721 | |
| 722 | _fnCallbackFire( settings, null, 'column-sizing', [settings] ); |
| 723 | } |
| 724 | |
| 725 | |
| 726 | /** |
no test coverage detected