feat(hotkeys): Migrate hotkeys to customization service and fix issues with overrides (#4777)
This commit is contained in:
1 parent
4559d39a91
commit
3e6913b097
39 files changed
+814
-1552
No files matched your search
@@ -102,6 +102,22 @@ function modeFactory() {
|
||||
'Crosshairs',
|
||||
'MoreTools',
|
||||
]);
|
||||
|
||||
customizationService.setCustomizations(
|
||||
{
|
||||
'ohif.hotkeyBindings': {
|
||||
$push: [
|
||||
{
|
||||
commandName: 'undo',
|
||||
label: 'Undo',
|
||||
keys: ['ctrl+z'],
|
||||
isEditable: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
'mode'
|
||||
);
|
||||
},
|
||||
onModeExit: ({ servicesManager }: withAppTypes) => {
|
||||
const {
|
||||
@@ -209,7 +225,6 @@ function modeFactory() {
|
||||
// Don't store the hotkeys for basic-test-mode under the same key
|
||||
// because they get customized by tests
|
||||
name: 'basic-test-hotkeys',
|
||||
hotkeys: [...hotkeys.defaults.hotkeyBindings],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user