Resizable: addLastColumn stops adding handles to hidden columns. Fixes #1485

This commit is contained in:
Rob Garrison 2017-12-06 12:00:40 -06:00
parent faf8c49231
commit b38b98c2d0

View File

@ -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';