Adding reset to defaults button

This commit is contained in:
Bruno Alves de Faria authored and Erik Ziegler committed 2017-06-14 09:19:49 +02:00
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);