Explicit check enumerated states instead of relying on order, per

feedback.
This commit is contained in:
howard-stearns 2016-06-15 15:06:36 -07:00
parent 2c7642a367
commit 1e3b20b66d

View file

@ -361,8 +361,9 @@ function MyController(hand) {
var _this = this;
var suppressedIn2D = [STATE_OFF, STATE_SEARCHING, STATE_HOLD_SEARCHING];
this.ignoreInput = function () {
return (_this.state <= STATE_HOLD_SEARCHING) && isIn2DMode();
return (-1 !== suppressedIn2D.indexOf(_this.state)) && isIn2DMode();
};
this.update = function() {