mirror of
https://github.com/Mottie/tablesorter.git
synced 2025-01-12 15:24:21 +00:00
Resizable: addLastColumn stops adding handles to hidden columns. Fixes #1485
This commit is contained in:
parent
faf8c49231
commit
b38b98c2d0
@ -175,7 +175,10 @@
|
||||
columns = c.columns - 1,
|
||||
$header = $this.data( 'header' );
|
||||
if ( !$header ) { return; } // see #859
|
||||
if ( !$header.is(':visible') ) {
|
||||
if (
|
||||
!$header.is(':visible') ||
|
||||
( !wo.resizable_addLastColumn && ts.resizable.checkVisibleColumns(c, column) )
|
||||
) {
|
||||
$this.hide();
|
||||
} else if ( column < columns || column === columns && wo.resizable_addLastColumn ) {
|
||||
$this.css({
|
||||
@ -187,6 +190,16 @@
|
||||
});
|
||||
},
|
||||
|
||||
// Fixes #1485
|
||||
checkVisibleColumns: function( c, column ) {
|
||||
var i,
|
||||
len = 0;
|
||||
for ( i = column + 1; i < c.columns; i++ ) {
|
||||
len += c.$headerIndexed[i].is( ':visible' ) ? 1 : 0;
|
||||
}
|
||||
return len === 0;
|
||||
},
|
||||
|
||||
// prevent text selection while dragging resize bar
|
||||
toggleTextSelection : function( c, wo, toggle ) {
|
||||
var namespace = c.namespace + 'tsresize';
|
||||
|
Loading…
Reference in New Issue
Block a user