Skip to content

Commit

Permalink
fix for #84
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoryak committed May 12, 2014
1 parent 9830a8d commit 7b43acc
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ layout: lite\n\
base_url: './../..'\n\
slug: tests\n\
bootstrap: false\n\
desc: 'TODO description\n'\
desc: 'TODO description'\n\
issue: "+issue+"\n\
---\n\n";
out += "<style>"+css+"</style>\n\n\n<script type='text/javascript'>"+js+"</script>\n\n\n\<div id='jsfiddle'>"+html+"</div>"
Expand Down
7 changes: 5 additions & 2 deletions dist/jquery.floatThead-slim.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,11 @@
*/
function calculateScrollBarSize(){ //this should happen after the floating table has been positioned
if($scrollContainer.length){
scrollbarOffset.horizontal = $scrollContainer.width() < $table.width() ? scWidth : 0;
scrollbarOffset.vertical = $scrollContainer.height() < $table.height() ? scWidth: 0;
var sw = $scrollContainer.width(), sh = $scrollContainer.height(), th = $table.height(), tw = $table.width();
var offseth = sw < tw ? scWidth : 0;
var offsetv = sh < th ? scWidth : 0;
scrollbarOffset.horizontal = sw - offsetv < tw ? scWidth : 0;
scrollbarOffset.vertical = sh - offseth < th ? scWidth: 0;
}
}
//finish up. create all calculation functions and bind them to events
Expand Down
2 changes: 1 addition & 1 deletion dist/jquery.floatThead-slim.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions dist/jquery.floatThead.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,11 @@
*/
function calculateScrollBarSize(){ //this should happen after the floating table has been positioned
if($scrollContainer.length){
scrollbarOffset.horizontal = $scrollContainer.width() < $table.width() ? scWidth : 0;
scrollbarOffset.vertical = $scrollContainer.height() < $table.height() ? scWidth: 0;
var sw = $scrollContainer.width(), sh = $scrollContainer.height(), th = $table.height(), tw = $table.width();
var offseth = sw < tw ? scWidth : 0;
var offsetv = sh < th ? scWidth : 0;
scrollbarOffset.horizontal = sw - offsetv < tw ? scWidth : 0;
scrollbarOffset.vertical = sh - offseth < th ? scWidth: 0;
}
}
//finish up. create all calculation functions and bind them to events
Expand Down
Loading

0 comments on commit 7b43acc

Please sign in to comment.