mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Resizable: make to work inside overflow container. Fixes #737
This commit is contained in:
parent
de81f11032
commit
0346f0fd79
@ -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,
|
||||
@ -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;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user