mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Scroller: fix offset from hidden row. See #1376
This commit is contained in:
parent
1b87904fe7
commit
36986e12d2
2
dist/js/widgets/widget-scroller.min.js
vendored
2
dist/js/widgets/widget-scroller.min.js
vendored
File diff suppressed because one or more lines are too long
@ -378,7 +378,9 @@
|
||||
// Hide other scrollers so we can resize
|
||||
$div = $( 'div.' + tscss.scrollerWrap + '[id!="' + id + '"]' )
|
||||
.addClass( tscss.scrollerHideElement ),
|
||||
row = '<tr class="' + tscss.scrollerSpacerRow + ' ' + c.selectorRemove.slice(1) + '">';
|
||||
temp = 'padding:0;margin:0;border:0;height:0;max-height:0;min-height:0;',
|
||||
row = '<tr class="' + tscss.scrollerSpacerRow + ' ' + c.selectorRemove.slice(1) +
|
||||
'" style="' + temp + '">';
|
||||
|
||||
wo.scroller_calcWidths = [];
|
||||
|
||||
@ -417,22 +419,22 @@
|
||||
setWidth = $this.width();
|
||||
}
|
||||
}
|
||||
row += '<td data-column="' + index + '" style="padding:0;margin:0;border:0;height:0;max-height:0;' +
|
||||
'min-height:0;width:' + setWidth + 'px;min-width:' + setWidth + 'px;max-width:' + setWidth + 'px"></td>';
|
||||
row += '<td data-column="' + index + '" style="' + temp + 'width:' + setWidth +
|
||||
'px;min-width:' + setWidth + 'px;max-width:' + setWidth + 'px"></td>';
|
||||
|
||||
// save current widths
|
||||
wo.scroller_calcWidths[ index ] = setWidth;
|
||||
}
|
||||
row += '</tr>';
|
||||
c.$tbodies.eq(0).prepend( row ); // tbody
|
||||
c.$tbodies.eq(0).append( row ); // tbody
|
||||
$hdr.children( 'thead' ).append( row );
|
||||
$foot.children( 'tfoot' ).append( row );
|
||||
|
||||
// include colgroup or alignment is off
|
||||
ts.fixColumnWidth( c.table );
|
||||
row = c.$table.children( 'colgroup' )[0].outerHTML;
|
||||
$hdr.prepend( row );
|
||||
$foot.prepend( row );
|
||||
$hdr.append( row );
|
||||
$foot.append( row );
|
||||
|
||||
temp = $tableWrap.parent().innerWidth() -
|
||||
( tsScroller.hasScrollBar( $tableWrap ) ? wo.scroller_barSetWidth : 0 );
|
||||
|
Loading…
Reference in New Issue
Block a user