Added the enter or return key command on numberField elements of numberController

This commit is contained in:
Jono Brandel 2011-02-17 15:15:25 -08:00
parent ae5ccdd736
commit aab996398e

View File

@ -66,6 +66,10 @@ GUI.NumberController = function() {
numberField.addEventListener('keydown', function(e) {
var newVal;
switch(e.keyCode) {
case 13:
newVal = this.getValue();
_this.setValue(newVal);
break;
case 38: // up
newVal = _this.getValue() + step;
_this.setValue(newVal);