renderScrollbar(animate) {
    const percentPerPost = this.percentPerPost();
    const index = this.index;
    const count = this.count();
    const visible = this.visible || 1;

    const $scrubber = this.$();
    $scrubber.find('.Scrubber-index').text(formatNumber(Math.min(Math.ceil(index + visible), count)));
    $scrubber.find('.Scrubber-description').text(this.description);
    $scrubber.toggleClass('disabled', this.disabled());

    const heights = {};
    heights.before = Math.max(0, percentPerPost.index * Math.min(index, count - visible));
    heights.handle = Math.min(100 - heights.before, percentPerPost.visible * visible);
    heights.after = 100 - heights.before - heights.handle;

    const func = animate ? 'animate' : 'css';
    for (const part in heights) {
      const $part = $scrubber.find(`.Scrubber-${part}`);
      $part.stop(true, true)[func]({height: heights[part] + '%'}, 'fast');

      // jQuery likes to put overflow:hidden, but because the scrollbar handle
      // has a negative margin-left, we need to override.
      if (func === 'animate') $part.css('overflow', 'visible');
    }
  }
/**
   * Update the scrollbar's position to reflect the current values of the
   * index/visible properties.
   *
   * @param {Boolean} animate
   */
Update the scrollbar's position to reflect the current values of the
index/visible properties.

@param {Boolean} animate
Update the scrollbar ' s position to reflect the current values of the index / visible properties . @param { Boolean } animate
renderScrollbar(animate) {
    const percentPerPost = this.percentPerPost();
    const index = this.index;
    const count = this.count();
    const visible = this.visible || 1;
    const $scrubber = this.$();
    $scrubber.find('.Scrubber-index').text(formatNumber(Math.min(Math.ceil(index + visible), count)));
    $scrubber.find('.Scrubber-description').text(this.description);
    $scrubber.toggleClass('disabled', this.disabled());
    const heights = {};
    heights.before = Math.max(0, percentPerPost.index * Math.min(index, count - visible));
    heights.handle = Math.min(100 - heights.before, percentPerPost.visible * visible);
    heights.after = 100 - heights.before - heights.handle;
    const func = animate ? 'animate' : 'css';
    for (const part in heights) {
      const $part = $scrubber.find(`.Scrubber-${part}`);
      $part.stop(true, true)[func]({height: heights[part] + '%'}, 'fast');
      if (func === 'animate') $part.css('overflow', 'visible');
    }
  }
renderScrollbar ( animate ) { const percentPerPost = this . percentPerPost ( ) ; const index = this . index ; const count = this . count ( ) ; const visible = this . visible || 1 ; const $scrubber = this . $ ( ) ; $scrubber . find ( '.Scrubber-index' ) . text ( formatNumber ( Math . min ( Math . ceil ( index + visible ) , count ) ) ) ; $scrubber . find ( '.Scrubber-description' ) . text ( this . description ) ; $scrubber . toggleClass ( 'disabled' , this . disabled ( ) ) ; const heights = { } ; heights . before = Math . max ( 0 , percentPerPost . index * Math . min ( index , count - visible ) ) ; heights . handle = Math . min ( 100 - heights . before , percentPerPost . visible * visible ) ; heights . after = 100 - heights . before - heights . handle ; const func = animate ? 'animate' : 'css' ; for ( const part in heights ) { const $part = $scrubber . find ( ` ${ part } ` ) ; $part . stop ( true , true ) [ func ] ( { height : heights [ part ] + '%' } , 'fast' ) ; if ( func === 'animate' ) $part . css ( 'overflow' , 'visible' ) ; } }
Update the scrollbar's position to reflect the current values of the
 index/visible properties.
Update the scrollbar ' s position to reflect the current values of the index / visible properties .
// jQuery likes to put overflow:hidden, but because the scrollbar handle // has a negative margin-left, we need to override.