fix KeyMapper
This commit is contained in:
parent
fcd23a817d
commit
b132b4224f
10
app.js
10
app.js
@ -504,12 +504,12 @@ class KeyMapper {
|
|||||||
|
|
||||||
set key(key) {
|
set key(key) {
|
||||||
key = KEY_NAMES[key]
|
key = KEY_NAMES[key]
|
||||||
if (this._key in this.constructor.actions) delete this.constructor.actions[this._key]
|
if (this.constructor.actions[this.prevKey] == this.action) delete this.constructor.actions[this.prevKey]
|
||||||
this._key = key
|
this.prevKey = key
|
||||||
this.constructor.actions[key] = this.action
|
this.constructor.actions[key] = this.action
|
||||||
}
|
}
|
||||||
get key() {
|
get key() {
|
||||||
return KEY_NAMES[this._key]
|
return KEY_NAMES[this.prevKey]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -583,7 +583,9 @@ class Settings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (localStorage["teTraSettings"]) this.gui.load(JSON.parse(localStorage["teTraSettings"]))
|
if (localStorage["teTraSettings"]) {
|
||||||
|
this.gui.load(JSON.parse(localStorage["teTraSettings"]))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
save() {
|
save() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user