diff --git a/jquery.mCustomScrollbar.js b/jquery.mCustomScrollbar.js index d39d445..03991e9 100644 --- a/jquery.mCustomScrollbar.js +++ b/jquery.mCustomScrollbar.js @@ -954,17 +954,19 @@ and dependencies (minified). mCustomScrollBox=$("#mCSB_"+d.idx), mCSB_container=$("#mCSB_"+d.idx+"_container"), mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")], - ratio=[mCustomScrollBox.height()/mCSB_container.outerHeight(false),mCustomScrollBox.width()/mCSB_container.outerWidth(false)], + ratioH=mCustomScrollBox.height()/mCSB_container.outerHeight(false), + ratioW=mCustomScrollBox.width()/mCSB_container.outerWidth(false) + ratio=[Math.min(ratioH,1),Math.min(ratioW,1)], l=[ parseInt(mCSB_dragger[0].css("min-height")),Math.round(ratio[0]*mCSB_dragger[0].parent().height()), parseInt(mCSB_dragger[1].css("min-width")),Math.round(ratio[1]*mCSB_dragger[1].parent().width()) ], h=oldIE && (l[1]