Use ids in key actions instead of references (#239)
Partially reverts e48fdea
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user