Skip to content

Commit

Permalink
refactor(midi-components): remove setLayer()
Browse files Browse the repository at this point in the history
References mixxxdj#14203
  • Loading branch information
git-developer committed Jan 25, 2025
1 parent 675d427 commit 58700c8
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions res/controllers/midi-components-0.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -653,33 +653,8 @@
/**
* @param newLayer Layer to apply to this
* @param reconnectComponents Whether components should be reconnected or not
* @deprecated since 2.5.0. Use @{ComponentContainer#setLayer} instead
*/
applyLayer: function(newLayer, reconnectComponents) {
console.warn("ComponentContainer.applyLayer is deprecated; use ComponentContainer.setLayer instead");
if (reconnectComponents !== false) {
reconnectComponents = true;
}
if (reconnectComponents === true) {
this.forEachComponent(function(component) {
component.disconnect();
});
}

script.deepMerge(this, newLayer);

if (reconnectComponents === true) {
this.forEachComponent(function(component) {
component.connect();
component.trigger();
});
}
},
/**
* @param newLayer Layer to apply to this
* @param reconnectComponents Whether components should be reconnected or not
*/
setLayer(newLayer, reconnectComponents) {
if (reconnectComponents !== false) {
reconnectComponents = true;
}
Expand All @@ -697,7 +672,6 @@
component.trigger();
});
}

},
shutdown: function() {
this.forEachComponent(function(component) {
Expand Down

0 comments on commit 58700c8

Please sign in to comment.