diff options
author | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-03-11 10:38:30 +0100 |
---|---|---|
committer | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-03-11 10:38:30 +0100 |
commit | f3a954e46c50f5e40885a4d41c6f2229d9054acf (patch) | |
tree | 9f73d85289b14986b746cea842f207c3c9b423dc /res/controllers/midi-components-0.0.js | |
parent | 05012ec7795e5785ec06ad0502bc3ea91b0e4f60 (diff) |
res/controllers/midi-components-0.0.js: Add range change to outputColor()
Diffstat (limited to 'res/controllers/midi-components-0.0.js')
-rw-r--r-- | res/controllers/midi-components-0.0.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/res/controllers/midi-components-0.0.js b/res/controllers/midi-components-0.0.js index fa3efe1f98..7294809e52 100644 --- a/res/controllers/midi-components-0.0.js +++ b/res/controllers/midi-components-0.0.js @@ -321,6 +321,11 @@ } }, outputColor: function(colorCode) { + if (colorCode === undefined || colorCode < 0) { + print("Ignoring invalid color code in outputColor()"); + return; + } + if (this.colorMapper !== undefined) { var nearestColorValue = this.colorMapper.getValueForNearestColor(colorCode); this.send(nearestColorValue); |