Viewers
Viewers copied to clipboard
Allow HotkeyManager runCommands with options
Description
Currently we only store for a hotkey configuration:
{
commandName: <string>,
keys: <array[string]>,
label: <string>,
}
We should be able to store options as well, to be used in the runCommand() so we can accomplish changes where we have dinamic options, e.g.:
{
commandName: 'setVOI',
keys: ['V'],
label: 'Set Window/Level',
options: {
window: 500,
level: 100,
}
}
Adittional Items that must be considered:
- Make sure window level presets data are store into hotkeys and nuke it from redux state
- Make sure
setZoomToolcommand is worked by this new changes, and we can just use the current command ofsetActiveTool - Make sure
nextViewportDisplaySetandprevViewportDisplaySetis also refactored to have a single command moving next/prev usingoptions
Related:
- https://github.com/OHIF/Viewers/pull/1429/files/48897599f6ccd0332b41d0baaa738e3d86f2c921#diff-4c16e239269d3929f2d1e13e891e0490
- https://github.com/OHIF/Viewers/pull/1429/files/48897599f6ccd0332b41d0baaa738e3d86f2c921#diff-71595f419c1b47eac605e7332dbb9073
Done in master