Empact/jquery-tinyscrollbar — Issue #3: Incorrect calculation of content size
Author: prinzC
Created: 2012-01-04 21:51:37+00:00
State: open

If your previous content was without scrolling bar (it didn't required) the height of the new content that requires scrolling bar is calculated incorrectly (as it becomes more after scrolling bar is added and width becomes less)

method update.this:

oScrollbar.obj.toggleClass('disable', oContent.ratio >= 1);

// Added recalculation of oContent[options.axis] and oContent.ratio
// because oContent.obj[0]['scroll'+ sSize] is changed after toggleClass('disable..
oContent[options.axis] = oContent.obj[0]['scroll'+ sSize];
oContent.ratio = oViewport[options.axis] / oContent[options.axis];
// ===

oTrack[options.axis] = options.size == 'auto' ? oViewport[options.axis] : options.size;