diff --git a/res/controllers/midi-components-0.0.js b/res/controllers/midi-components-0.0.js index 0118c67bb86..60cc9abc056 100644 --- a/res/controllers/midi-components-0.0.js +++ b/res/controllers/midi-components-0.0.js @@ -31,7 +31,7 @@ if (Array.isArray(options) && typeof options[0] === 'number') { this.midi = options; } else { - _.assign(this, options); + Object.assign(this, options); } if (typeof this.unshift === 'function') { @@ -444,9 +444,7 @@ Encoder.prototype = new Component(); var ComponentContainer = function (initialLayer) { - if (typeof initialLayer === 'object') { - this.applyLayer(initialLayer); - } + Object.assign(this, initialLayer); }; ComponentContainer.prototype = { forEachComponent: function (operation, recursive) { @@ -534,25 +532,6 @@ this.isShifted = false; }); }, - applyLayer: function (newLayer, reconnectComponents) { - if (reconnectComponents !== false) { - reconnectComponents = true; - } - if (reconnectComponents === true) { - this.forEachComponent(function (component) { - component.disconnect(); - }); - } - - _.merge(this, newLayer); - - if (reconnectComponents === true) { - this.forEachComponent(function (component) { - component.connect(); - component.trigger(); - }); - } - }, }; var Deck = function (deckNumbers) {