build/out.js
/**
 * @constructor FinBar
 * @summary Create a scrollbar object.
 * @desc Creating a scrollbar is a three-step process:
 *
 * 1. Instantiate the scrollbar object by calling this constructor function. Upon instantiation, the DOM element for the scrollbar (with a single child element for the scrollbar "thumb") is created but is not insert it into the DOM.
 * 2. After instantiation, it is the caller's responsibility to insert the scrollbar, {@link FinBar#bar|this.bar}, into the DOM.
 * 3. After insertion, the caller must call {@link FinBar#resize|resize()} at least once to size and position the scrollbar and its thumb. After that, `resize()` should also be called repeatedly on resize events (as the content element is being resized).
 *
 * Suggested configurations:
 * * _**Unbound**_<br/>
 * The scrollbar serves merely as a simple range (slider) control. Omit both `options.onchange` and `options.content`.
 * * _**Bound to virtual content element**_<br/>
 * Virtual content is projected into the element using a custom event handler supplied by the programmer in `options.onchange`. A typical use case would be to handle scrolling of the virtual content. Other use cases include data transformations, graphics transformations, _etc._
 * * _**Bound to real content**_<br/>
 * Set `options.content` to the "real" content element but omit `options.onchange`. This will cause the scrollbar to use the built-in event handler (`this.scrollRealContent`) which implements smooth scrolling of the content element within the container.
 *
 * @param {finbarOptions} [options={}] - Options object. See the type definition for member details.
 */
@constructor FinBar
@summary Create a scrollbar object.
@desc Creating a scrollbar is a three-step process.

1. Instantiate the scrollbar object by calling this constructor function. Upon instantiation, the DOM element for the scrollbar (with a single child element for the scrollbar "thumb") is created but is not insert it into the DOM.
2. After instantiation, it is the caller's responsibility to insert the scrollbar,  FinBar#bar|this.bar, into the DOM.
3. After insertion, the caller must call  FinBar#resize|resize() at least once to size and position the scrollbar and its thumb. After that, `resize()` should also be called repeatedly on resize events (as the content element is being resized).

Suggested configurations:
_**Unbound**_
The scrollbar serves merely as a simple range (slider) control.

@param {finbarOptions} [options={}] - Options object. See the type definition for member details.
@constructor FinBar @summary Create a scrollbar object . @desc Creating a scrollbar is a three - step process . 1 . Instantiate the scrollbar object by calling this constructor function . Upon instantiation the DOM element for the scrollbar ( with a single child element for the scrollbar " thumb " ) is created but is not insert it into the DOM . 2 . After instantiation it is the caller ' s responsibility to insert the scrollbar FinBar#bar|this . bar into the DOM . 3 . After insertion the caller must call FinBar#resize|resize () at least once to size and position the scrollbar and its thumb . After that ` resize () ` should also be called repeatedly on resize events ( as the content element is being resized ) . Suggested configurations : _ ** Unbound ** _ The scrollbar serves merely as a simple range ( slider ) control . @param { finbarOptions } [ options = {} ] - Options object . See the type definition for member details .
function FinBar(options) {
    var bound = this._bound = {};
    for (key in handlersToBeBound) {
        bound[key] = handlersToBeBound[key].bind(this);
    }
    var thumb = document.createElement('div');
    thumb.classList.add('thumb');
    thumb.onclick = bound.shortStop;
    thumb.onmouseover = bound.onmouseover;
    this.thumb = thumb;
    var bar = document.createElement('div');
    bar.classList.add('finbar-vertical');
    bar.appendChild(thumb);
    if (this.paging) {
        bar.onclick = bound.onclick;
    }
    this.bar = bar;
    options = options || {};
    this.orientation = 'vertical';
    this._min = this._index = 0;
    this._max = 100;
    for (var key in options) {
        if (options.hasOwnProperty(key)) {
            var option = options[key];
            switch (key) {
            case 'index':
                this._index = option;
                break;
            case 'range':
                validRange(option);
                this._min = option.min;
                this._max = option.max;
                this.contentSize = option.max - option.min + 1;
                break;
            default:
                if (
                    key.charAt(0) !== '_' &&
                    typeof FinBar.prototype[key] !== 'function'
                ) {
                    this[key] = option;
                }
                break;
            }
        }
    }
    cssInjector(cssFinBars, 'finbar-base', options.cssStylesheetReferenceElement);
}
function FinBar ( options ) { var bound = this . _bound = { } ; for ( key in handlersToBeBound ) { bound [ key ] = handlersToBeBound [ key ] . bind ( this ) ; } var thumb = document . createElement ( 'div' ) ; thumb . classList . add ( 'thumb' ) ; thumb . onclick = bound . shortStop ; thumb . onmouseover = bound . onmouseover ; this . thumb = thumb ; var bar = document . createElement ( 'div' ) ; bar . classList . add ( 'finbar-vertical' ) ; bar . appendChild ( thumb ) ; if ( this . paging ) { bar . onclick = bound . onclick ; } this . bar = bar ; options = options || { } ; this . orientation = 'vertical' ; this . _min = this . _index = 0 ; this . _max = 100 ; for ( var key in options ) { if ( options . hasOwnProperty ( key ) ) { var option = options [ key ] ; switch ( key ) { case 'index' : this . _index = option ; break ; case 'range' : validRange ( option ) ; this . _min = option . min ; this . _max = option . max ; this . contentSize = option . max - option . min + 1 ; break ; default : if ( key . charAt ( 0 ) !== '_' && typeof FinBar . prototype [ key ] !== 'function' ) { this [ key ] = option ; } break ; } } } cssInjector ( cssFinBars , 'finbar-base' , options . cssStylesheetReferenceElement ) ; }
@constructor FinBar
 @summary Create a scrollbar object.
@constructor FinBar @summary Create a scrollbar object .
// make bound versions of all the mouse event handler /**
     * @name thumb
     * @summary The generated scrollbar thumb element.
     * @desc The thumb element's parent element is always the {@link FinBar#bar|bar} element.
     *
     * This property is typically referenced internally only. The size and position of the thumb element is maintained by `_calcThumb()`.
     * @type {Element}
     * @memberOf FinBar.prototype
     */ /**
     * @name bar
     * @summary The generated scrollbar element.
     * @desc The caller inserts this element into the DOM (typically into the content container) and then calls its {@link FinBar#resize|resize()} method.
     *
     * Thus the node tree is typically:
     * * A **content container** element, which contains:
     *    * The content element(s)
     *    * This **scrollbar element**, which in turn contains:
     *        * The **thumb element**
     *
     * @type {Element}
     * @memberOf FinBar.prototype
     */ // presets // options // override prototype defaults for standard ; // extend with additional properties (for use in onchange event handlers)