angular-ui/ng-grid — pull request #490 by ebbe-brandstrup (2013-06-17 13:17:32+00:00)
Title: Fixes and improvements in configureColumnWidths()

Note, the changes only take effect on-the-fly if using the (modified) ng-grid-layout plugin

- Columns sized with * or % now expand / shrink as other * or %-based columns are hidden / shown
- Visible columns now expand to make use of the full grid width when hiding a column
- Fixed "asteriskNum" so it no longer includes hidden columns (was checking .visible on a columnDefs column instead of the matching ngColumn)
- Fixed "totalWidth" so it no longer includes hidden columns when using px values for width (was checking .visible on a columnDefs column instead of the matching ngColumn)
- Fixed ngColumn width being initialized to undefined when using "auto" for width, regardless of "minWidth" settings (was checking .minWidth on a columnDefs column instead of the matching ngColumn)
- Re-ordered columns now keep their width setup

Renamed "col" to "colDef" in configureColumnWidths() in the places where "col" was a column from "columnDefs". It made it clearer for me whether I was referring to a ngColumn or a column from columnDefs. There were a couple of bugs caused by that (col.visible incorrectly accessed on columnDefs objects instead of ngColumns, and the like).