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

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

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

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

    // inherits from Widget
    knob.init();

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

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

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

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

    // inherits from Widget
    knob.init();

    return knob;
  }
function create ( props ) { var knob = Object . create ( this ) ; // apply Widget defaults, then overwrite (if applicable) with Knob defaults _canvasWidget2 . default . create . call ( knob ) ; // ...and then finally override with user defaults Object . assign ( knob , Knob . defaults , props ) ; // set underlying value if necessary... TODO: how should this be set given min/max? if ( props . value ) knob . __value = props . value ; // inherits from Widget knob . init ( ) ; return knob ; }
Create a new Knob instance.
@memberof Knob
@constructs
@param {Object} [props] - A dictionary of properties to initialize Knob with.
@static
Create a new Knob instance .