File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 2828 ignoreImageLoading : true ,
2929 // should columns float left or right
3030 columnFloat : "left" ,
31+ // resize container to width of filled columns only
32+ // works with width and height options set
33+ resizeContainer : false ,
3134 // ensure the last column is never the tallest column
3235 lastNeverTallest : false ,
3336 // (int) the minimum number of characters to jump when splitting
580583 }
581584 } else {
582585 // it's scrolling horizontally, fix the width/classes of the columns
586+ var nonEmptyColumns = 0 ;
583587 $inBox . children ( ) . each ( function ( i ) {
584588 $col = $inBox . children ( ) . eq ( i ) ;
585589 $col . width ( optionWidth + "px" ) ;
591595 $col . removeClass ( prefixTheClassName ( "first" ) ) ;
592596 $col . removeClass ( prefixTheClassName ( "last" ) ) ;
593597 }
598+ if ( $col . html ( ) != '' ) {
599+ nonEmptyColumns ++ ;
600+ }
594601 } ) ;
595- $inBox . width ( $inBox . children ( ) . length * optionWidth + "px" ) ;
602+ if ( nonEmptyColumns && options . resizeContainer ) {
603+ $inBox . width ( nonEmptyColumns * optionWidth + "px" ) ;
604+ } else {
605+ $inBox . width ( $inBox . children ( ) . length * optionWidth + "px" ) ;
606+ }
596607 }
597608 $inBox . append ( $ ( "<br style='clear:both;'>" ) ) ;
598609 }
You can’t perform that action at this time.
0 commit comments