diff options
author | Uwe Klotz <uklotz@mixxx.org> | 2020-08-16 13:50:51 +0200 |
---|---|---|
committer | Uwe Klotz <uklotz@mixxx.org> | 2020-08-16 13:50:51 +0200 |
commit | d44c98793395412cff947a57232fdad16967a626 (patch) | |
tree | ce82e72c223fafcd3472f2f7be72a917481a2541 /res/controllers/midi-components-0.0.js | |
parent | a0e1228b96799b463c408c6d5c1fbc6d14457d06 (diff) | |
parent | de8cee1bf185cd36508876153f120c84d1f298cf (diff) |
Merge branch '2.3' of git@github.com:mixxxdj/mixxx.git
Diffstat (limited to 'res/controllers/midi-components-0.0.js')
-rw-r--r-- | res/controllers/midi-components-0.0.js | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/res/controllers/midi-components-0.0.js b/res/controllers/midi-components-0.0.js index bdb31ae256..42e3f53c47 100644 --- a/res/controllers/midi-components-0.0.js +++ b/res/controllers/midi-components-0.0.js @@ -664,22 +664,19 @@ }; var Deck = function(deckNumbers) { - if (deckNumbers !== undefined) { - if (Array.isArray(deckNumbers)) { - // These must be unique to each instance, - // so they cannot be in the prototype. - this.currentDeck = "[Channel" + deckNumbers[0] + "]"; - this.deckNumbers = deckNumbers; - } else if (typeof deckNumbers === "number" && - Math.floor(deckNumbers) === deckNumbers && - isFinite(deckNumbers)) { - this.currentDeck = "[Channel" + deckNumbers + "]"; - this.deckNumbers = [deckNumbers]; - } + if (deckNumbers !== undefined && Array.isArray(deckNumbers)) { + // These must be unique to each instance, + // so they cannot be in the prototype. + this.deckNumbers = deckNumbers; + } else if (deckNumbers !== undefined && typeof deckNumbers === "number" && + Math.floor(deckNumbers) === deckNumbers && + isFinite(deckNumbers)) { + this.deckNumbers = [deckNumbers]; } else { print("ERROR! new Deck() called without specifying any deck numbers"); return; } + this.currentDeck = "[Channel" + deckNumbers[0] + "]"; }; Deck.prototype = new ComponentContainer({ setCurrentDeck: function(newGroup) { @@ -818,21 +815,20 @@ this.setCurrentUnit(this.unitNumbers[index]); }; - if (unitNumbers !== undefined) { - if (Array.isArray(unitNumbers)) { - this.unitNumbers = unitNumbers; - this.setCurrentUnit(unitNumbers[0]); - } else if (typeof unitNumbers === "number" && - Math.floor(unitNumbers) === unitNumbers && - isFinite(unitNumbers)) { - this.unitNumbers = [unitNumbers]; - this.setCurrentUnit(unitNumbers); - } + if (unitNumbers !== undefined && Array.isArray(unitNumbers)) { + this.unitNumbers = unitNumbers; + } else if (unitNumbers !== undefined && typeof unitNumbers === "number" && + Math.floor(unitNumbers) === unitNumbers && + isFinite(unitNumbers)) { + this.unitNumbers = [unitNumbers]; } else { print("ERROR! new EffectUnit() called without specifying any unit numbers!"); return; } + this.group = "[EffectRack1_EffectUnit" + this.unitNumbers[0] + "]"; + this.setCurrentUnit(this.unitNumbers[0]); + this.dryWetKnob = new Pot({ group: this.group, unshift: function() { |