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,
|
var $rows, $columns, $column, column, timer,
|
||||||
storedSizes = {},
|
storedSizes = {},
|
||||||
$table = c.$table,
|
$table = c.$table,
|
||||||
|
$wrap = $table.parent(),
|
||||||
|
overflow = $table.parent().css('overflow') === 'auto',
|
||||||
mouseXPosition = 0,
|
mouseXPosition = 0,
|
||||||
$target = null,
|
$target = null,
|
||||||
$next = null,
|
$next = null,
|
||||||
@ -1730,6 +1732,14 @@ ts.addWidget({
|
|||||||
$target.width( targetWidth + leftEdge );
|
$target.width( targetWidth + leftEdge );
|
||||||
if ($target.width() !== targetWidth && fullWidth) {
|
if ($target.width() !== targetWidth && fullWidth) {
|
||||||
$next.width( $next.width() - leftEdge );
|
$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;
|
mouseXPosition = event.pageX;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user