lib/providers/metrics-provider.js
function getFixedScrollOffset(offset, length) {
        if (offset && length + offset <= limit) {
          return Math.min(limit - length, 0);
        }
        return Math.min(offset, 0);
      }
function getFixedScrollOffset(offset, length) {
        if (offset && length + offset <= limit) {
          return Math.min(limit - length, 0);
        }
        return Math.min(offset, 0);
      }
function getFixedScrollOffset ( offset , length ) { if ( offset && length + offset <= limit ) { return Math . min ( limit - length , 0 ) ; } return Math . min ( offset , 0 ) ; }
Given an offset and length, get the corrected offset.

@param {Number} offset
The current offset value.

@param {Number} length
The length of available data to offset.

@returns {Number}
The corrected scroll offset is returned.
Given an offset and length get the corrected offset .