Saving the hotkeys definitions
This commit is contained in:
1 parent
20f274962b
commit
a77838d550
3 files changed
+13
-2
No files matched your search
@@ -7,6 +7,15 @@ import { OHIF } from 'meteor/ohif:core';
|
||||
Template.hotkeysForm.onCreated(() => {
|
||||
const instance = Template.instance();
|
||||
|
||||
instance.api = {
|
||||
save() {
|
||||
const { contextName } = instance.data;
|
||||
const form = instance.$('form').first().data('component');
|
||||
const definitions = form.value();
|
||||
OHIF.hotkeys.store(contextName, definitions);
|
||||
}
|
||||
};
|
||||
|
||||
const rg = (start, end) => _.range(start, end + 1);
|
||||
instance.allowedKeys = _.union(rg(32, 40), rg(48, 57), rg(65, 90), rg(112, 121), [123]);
|
||||
|
||||
|
||||
Reference in new issue
Block a user