Use ids in key actions instead of references (#239)

Partially reverts e48fdea
This commit is contained in:
József Farkas
2016-12-30 11:51:46 +01:00
committed by GitHub
parent 6a7efcc2b1
commit 9b2aa188e6
13 changed files with 165 additions and 164 deletions

View File

@@ -83,14 +83,7 @@ export class DataStorage {
initUHKJson() {
this.uhkConfiguration = new UhkConfiguration().fromJsonObject(require('json!../../config-serializer/uhk-config.json'));
this.uhkPresets = (<any[]>require('json!../../config-serializer/preset-keymaps.json'))
/* TODO: Remove passing getters, because there shouldn't be any SwitchKeymapAction or PlayMacroAction in presets,
* so they shouldn't be needed.
*/
.map(keymap => new Keymap().fromJsonObject(
keymap,
this.uhkConfiguration.getKeymap.bind(this.uhkConfiguration),
this.uhkConfiguration.getMacro.bind(this.uhkConfiguration)
));
.map(keymap => new Keymap().fromJsonObject(keymap));
}
getConfiguration(): UhkConfiguration {