Adding reset to defaults button
This commit is contained in:
1 parent
a77838d550
commit
22f1e659fa
7 files changed
+94
-40
No files matched your search
@@ -3,12 +3,13 @@ import { OHIF } from 'meteor/ohif:core';
|
||||
export class HotkeysContext {
|
||||
constructor(name, definitions, enabled) {
|
||||
this.name = name;
|
||||
this.definitions = definitions;
|
||||
this.definitions = Object.assign({}, definitions);
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
extend(definitions={}) {
|
||||
if (typeof definitions !== 'object') return;
|
||||
this.definitions = Object.assign({}, definitions);
|
||||
Object.keys(definitions).forEach(command => {
|
||||
const hotkey = definitions[command];
|
||||
this.unregister(command);
|
||||
|
||||
Reference in new issue
Block a user