mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
Added the enter or return key command on numberField elements of numberController
This commit is contained in:
parent
ae5ccdd736
commit
aab996398e
@ -66,6 +66,10 @@ GUI.NumberController = function() {
|
|||||||
numberField.addEventListener('keydown', function(e) {
|
numberField.addEventListener('keydown', function(e) {
|
||||||
var newVal;
|
var newVal;
|
||||||
switch(e.keyCode) {
|
switch(e.keyCode) {
|
||||||
|
case 13:
|
||||||
|
newVal = this.getValue();
|
||||||
|
_this.setValue(newVal);
|
||||||
|
break;
|
||||||
case 38: // up
|
case 38: // up
|
||||||
newVal = _this.getValue() + step;
|
newVal = _this.getValue() + step;
|
||||||
_this.setValue(newVal);
|
_this.setValue(newVal);
|
||||||
|
Loading…
Reference in New Issue
Block a user