js/OverlayScrollbars.js
function refreshScrollbarHandleLength(isHorizontal) {
                    var handleCSS = {};
                    var scrollbarVars = getScrollbarVars(isHorizontal);
                    var scrollbarVarsInfo = scrollbarVars._info;
                    var digit = 1000000;
                    //get and apply intended handle length
                    var handleRatio = MATH.min(1, (_hostSizeCache[scrollbarVars._w_h] - (_paddingAbsoluteCache ? (isHorizontal ? _paddingX : _paddingY) : 0)) / _contentScrollSizeCache[scrollbarVars._w_h]);
                    handleCSS[scrollbarVars._width_height] = (MATH.floor(handleRatio * 100 * digit) / digit) + "%"; //the last * digit / digit is for flooring to the 4th digit

                    if (!nativeOverlayScrollbarsAreActive())
                        scrollbarVars._handle.css(handleCSS);

                    //measure the handle length to respect min & max length
                    scrollbarVarsInfo._handleLength = scrollbarVars._handle[0]['offset' + scrollbarVars._Width_Height];
                    scrollbarVarsInfo._handleLengthRatio = handleRatio;
                }
function refreshScrollbarHandleLength(isHorizontal) {
                    var handleCSS = {};
                    var scrollbarVars = getScrollbarVars(isHorizontal);
                    var scrollbarVarsInfo = scrollbarVars._info;
                    var digit = 1000000;
                    //get and apply intended handle length
                    var handleRatio = MATH.min(1, (_hostSizeCache[scrollbarVars._w_h] - (_paddingAbsoluteCache ? (isHorizontal ? _paddingX : _paddingY) : 0)) / _contentScrollSizeCache[scrollbarVars._w_h]);
                    handleCSS[scrollbarVars._width_height] = (MATH.floor(handleRatio * 100 * digit) / digit) + "%"; //the last * digit / digit is for flooring to the 4th digit

                    if (!nativeOverlayScrollbarsAreActive())
                        scrollbarVars._handle.css(handleCSS);

                    //measure the handle length to respect min & max length
                    scrollbarVarsInfo._handleLength = scrollbarVars._handle[0]['offset' + scrollbarVars._Width_Height];
                    scrollbarVarsInfo._handleLengthRatio = handleRatio;
                }
function refreshScrollbarHandleLength ( isHorizontal ) { var handleCSS = { } ; var scrollbarVars = getScrollbarVars ( isHorizontal ) ; var scrollbarVarsInfo = scrollbarVars . _info ; var digit = 1000000 ; //get and apply intended handle length var handleRatio = MATH . min ( 1 , ( _hostSizeCache [ scrollbarVars . _w_h ] - ( _paddingAbsoluteCache ? ( isHorizontal ? _paddingX : _paddingY ) : 0 ) ) / _contentScrollSizeCache [ scrollbarVars . _w_h ] ) ; handleCSS [ scrollbarVars . _width_height ] = ( MATH . floor ( handleRatio * 100 * digit ) / digit ) + "%" ; //the last * digit / digit is for flooring to the 4th digit if ( ! nativeOverlayScrollbarsAreActive ( ) ) scrollbarVars . _handle . css ( handleCSS ) ; //measure the handle length to respect min & max length scrollbarVarsInfo . _handleLength = scrollbarVars . _handle [ 0 ] [ 'offset' + scrollbarVars . _Width_Height ] ; scrollbarVarsInfo . _handleLengthRatio = handleRatio ; }
Refreshes the handle length of the given scrollbar.
@param isHorizontal True if the horizontal scrollbar handle shall be refreshed, false if the vertical one shall be refreshed.
Refreshes the handle length of the given scrollbar .