dist/multislider.js
function create(props) {
    var multiSlider = Object.create(this);

    // apply Widget defaults, then overwrite (if applicable) with MultiSlider defaults
    _canvasWidget2.default.create.call(multiSlider);

    // ...and then finally override with user defaults
    Object.assign(multiSlider, MultiSlider.defaults, props);

    // set underlying value if necessary... TODO: how should this be set given min/max?
    if (props.value) multiSlider.__value = props.value;

    // inherits from Widget
    multiSlider.init();

    if (props.value === undefined && multiSlider.count !== 4) {
      for (var i = 0; i < multiSlider.count; i++) {
        multiSlider.__value[i] = i / multiSlider.count;
      }
    } else if (typeof props.value === 'number') {
      for (var _i = 0; _i < multiSlider.count; _i++) {
        multiSlider.__value[_i] = props.value;
      }
    }

    return multiSlider;
  }
function create(props) {
    var multiSlider = Object.create(this);

    // apply Widget defaults, then overwrite (if applicable) with MultiSlider defaults
    _canvasWidget2.default.create.call(multiSlider);

    // ...and then finally override with user defaults
    Object.assign(multiSlider, MultiSlider.defaults, props);

    // set underlying value if necessary... TODO: how should this be set given min/max?
    if (props.value) multiSlider.__value = props.value;

    // inherits from Widget
    multiSlider.init();

    if (props.value === undefined && multiSlider.count !== 4) {
      for (var i = 0; i < multiSlider.count; i++) {
        multiSlider.__value[i] = i / multiSlider.count;
      }
    } else if (typeof props.value === 'number') {
      for (var _i = 0; _i < multiSlider.count; _i++) {
        multiSlider.__value[_i] = props.value;
      }
    }

    return multiSlider;
  }
function create ( props ) { var multiSlider = Object . create ( this ) ; // apply Widget defaults, then overwrite (if applicable) with MultiSlider defaults _canvasWidget2 . default . create . call ( multiSlider ) ; // ...and then finally override with user defaults Object . assign ( multiSlider , MultiSlider . defaults , props ) ; // set underlying value if necessary... TODO: how should this be set given min/max? if ( props . value ) multiSlider . __value = props . value ; // inherits from Widget multiSlider . init ( ) ; if ( props . value === undefined && multiSlider . count !== 4 ) { for ( var i = 0 ; i < multiSlider . count ; i ++ ) { multiSlider . __value [ i ] = i / multiSlider . count ; } } else if ( typeof props . value === 'number' ) { for ( var _i = 0 ; _i < multiSlider . count ; _i ++ ) { multiSlider . __value [ _i ] = props . value ; } } return multiSlider ; }
Create a new MultiSlider instance.
@memberof MultiSlider
@constructs
@param {Object} [props] - A dictionary of properties to initialize MultiSlider with.
@static
Create a new MultiSlider instance .