Sfoglia il codice sorgente

Fixed a bug in Input

dev
Bryan Miller 6 anni fa
parent
commit
698cfa8bae
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. +2
    -2
      app/js/ui/Input.js

+ 2
- 2
app/js/ui/Input.js Vedi File

} }


// Now handle keyboard event names. // Now handle keyboard event names.
else if (!(key in Object.keys(KEYBYNAME))){
else if (!(key in KEYBYNAME)){
if (!isNaN(key)) if (!isNaN(key))
ecodes.push(parseInt(key)); ecodes.push(parseInt(key));
else else
} else { } else {
ename = ReorderEventName(ename); ename = ReorderEventName(ename);
if (ename === ""){ if (ename === ""){
throw new ValueError("Failed to parse key or key combination.");
throw new Error("Failed to parse key or key combination.");
} }
this.__emitter.listen(ename, func, owner, once); this.__emitter.listen(ename, func, owner, once);
} }

Loading…
Annulla
Salva