mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Scroller: adjust code for insane (OCD) people
This commit is contained in:
parent
276f3fb650
commit
4853615569
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
@ -186,7 +186,7 @@
|
||||
},
|
||||
|
||||
setup : function( c, wo ) {
|
||||
var maxHt, tbHt, $hdr, $t, $hCells, $fCells, $tableWrap, events, tmp,
|
||||
var maxHt, tbHt, $hdr, $t, $hCells, $fCells, $tableWrap, events, tmp, detectedWidth,
|
||||
$win = $( window ),
|
||||
tsScroller = ts.scroller,
|
||||
namespace = c.namespace + 'tsscroller',
|
||||
@ -204,15 +204,11 @@
|
||||
|
||||
// set scrollbar width to one of the following (1) explicitly set scroller_barWidth option,
|
||||
// (2) detected scrollbar width or (3) fallback of 15px
|
||||
if (wo.scroller_barWidth !== null) {
|
||||
wo.scroller_barSetWidth = wo.scroller_barWidth;
|
||||
if ( wo.scroller_barWidth !== null ) {
|
||||
wo.scroller_barSetWidth = wo.scroller_barWidth;
|
||||
} else {
|
||||
var detectedWidth = tsScroller.getBarWidth();
|
||||
if (detectedWidth !== null){
|
||||
wo.scroller_barSetWidth = detectedWidth;
|
||||
} else {
|
||||
wo.scroller_barSetWidth = 15;
|
||||
}
|
||||
detectedWidth = tsScroller.getBarWidth();
|
||||
wo.scroller_barSetWidth = detectedWidth !== null ? detectedWidth : 15;
|
||||
}
|
||||
|
||||
maxHt = wo.scroller_height || 300;
|
||||
|
Loading…
Reference in New Issue
Block a user