Resizable: make to work inside overflow container. Fixes #737

This commit is contained in:
Mottie 2014-10-02 20:51:30 -05:00
parent de81f11032
commit 0346f0fd79

View File

@ -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;
}, },