src/js/widgets.js
branchplayers-as-widgets
changeset 958 2aa7fdb0762a
parent 957 4da0a5740b6c
child 959 ee11ed1b739e
equal deleted inserted replaced
957:4da0a5740b6c 958:2aa7fdb0762a
    24         return;
    24         return;
    25     }
    25     }
    26     
    26     
    27     /* Setting all the configuration options */
    27     /* Setting all the configuration options */
    28     var _type = config.type,
    28     var _type = config.type,
    29         _config = IriSP._.defaults({}, config, player.config.gui.default_options, this.defaults),
    29         _config = IriSP._.defaults({}, config, player.config.default_options, this.defaults),
    30         _this = this;
    30         _this = this;
    31     
    31     
    32     IriSP._(_config).forEach(function(_value, _key) {
    32     IriSP._(_config).forEach(function(_value, _key) {
    33        _this[_key] = _value;
    33        _this[_key] = _value;
    34     });
    34     });
    35     
    35     
    36     if (typeof this.width === "undefined") {
    36     if (typeof this.width === "undefined") {
    37         this.width = player.config.gui.width;
    37         this.width = player.config.width;
    38     }
    38     }
    39     
    39     
    40     /* Setting this.player at the end in case it's been overriden
    40     /* Setting this.player at the end in case it's been overriden
    41      * by a configuration option of the same name :-(
    41      * by a configuration option of the same name :-(
    42      */
    42      */