Skip to content

Commit

Permalink
3ae6f7f30c6119f2a47d57095ab6fef609d0c19a Dev: Another attempt at fixi…
Browse files Browse the repository at this point in the history
…ng column alignment

Sync to source repo @3ae6f7f30c6119f2a47d57095ab6fef609d0c19a
  • Loading branch information
dtbuild committed Oct 15, 2024
1 parent d24c602 commit 7336100
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion datatables.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
],
"src-repo": "http://github.com/DataTables/DataTablesSrc",
"last-tag": "2.1.8",
"last-sync": "ce587f218dddebc1c6fb98c7b1313cd09a731a32"
"last-sync": "3ae6f7f30c6119f2a47d57095ab6fef609d0c19a"
}
11 changes: 9 additions & 2 deletions js/dataTables.js
Original file line number Diff line number Diff line change
Expand Up @@ -5252,10 +5252,17 @@

if (firstTr) {
var colSizes = $(firstTr).children('th, td').map(function (vis) {
return {
var outerWidth = $(this).outerWidth();
var ret = {
idx: _fnVisibleToColumnIndex(settings, vis),
width: $(this).outerWidth()
width: outerWidth
};

if (scrollX) {
ret.minWidth = outerWidth;
}

return ret;
});

// Check against what the colgroup > col is set to and correct if needed
Expand Down
2 changes: 1 addition & 1 deletion js/dataTables.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dataTables.min.mjs

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions js/dataTables.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5199,10 +5199,17 @@ function _fnScrollDraw ( settings )

if (firstTr) {
var colSizes = $(firstTr).children('th, td').map(function (vis) {
return {
var outerWidth = $(this).outerWidth();
var ret = {
idx: _fnVisibleToColumnIndex(settings, vis),
width: $(this).outerWidth()
width: outerWidth
};

if (scrollX) {
ret.minWidth = outerWidth;
}

return ret;
});

// Check against what the colgroup > col is set to and correct if needed
Expand Down

0 comments on commit 7336100

Please sign in to comment.