Skip to content

Commit

Permalink
Merge pull request #11913 from miwig/jogwheelfix
Browse files Browse the repository at this point in the history
ComponentJS: make JogWheelBasic correctly switch which deck it controls
  • Loading branch information
Swiftb0y authored Sep 4, 2023
2 parents 138e285 + 80f5bc6 commit 72512c5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions res/controllers/midi-components-0.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,13 @@
input: function(_channel, control, _value, status, _group) {
throw "Called wrong input handler for " + status + ": " + control + ".\n" +
"Please bind jogwheel-related messages to inputWheel and inputTouch!\n";
},
// this is needed for features such as "deck switching" that work
// by changing the component group. It is assumed they call `connect`
// afterwards.
connect: function() {
Component.prototype.connect.call(this);
this.deck = parseInt(script.channelRegEx.exec(this.group)[1]);
}
});

Expand Down

0 comments on commit 72512c5

Please sign in to comment.