Skip to content

Commit

Permalink
Resizable: make to work inside overflow container. Fixes #737
Browse files Browse the repository at this point in the history
  • Loading branch information
Mottie committed Oct 3, 2014
1 parent de81f11 commit 0346f0f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions js/jquery.tablesorter.widgets.js
Expand Up @@ -1718,6 +1718,8 @@ ts.addWidget({
var $rows, $columns, $column, column, timer,
storedSizes = {},
$table = c.$table,
$wrap = $table.parent(),
overflow = $table.parent().css('overflow') === 'auto',
mouseXPosition = 0,
$target = null,
$next = null,
Expand All @@ -1730,6 +1732,14 @@ ts.addWidget({
$target.width( targetWidth + leftEdge );
if ($target.width() !== targetWidth && fullWidth) {
$next.width( $next.width() - leftEdge );
} else if (overflow) {
$table.width(function(i, w){
return w + leftEdge;
});
if (!$next.length) {
// if expanding right-most column, scroll the wrapper
$wrap[0].scrollLeft = $table.width();
}
}
mouseXPosition = event.pageX;
},
Expand Down

0 comments on commit 0346f0f

Please sign in to comment.