fix: for incorrect toolbar state between routes (#2082)

This commit is contained in:
Danny Brown authored and GitHub committed 2020-10-05 21:42:30 -04:00
1 parent 5689bf5369
commit 380acc1331
3 files changed
+22 -3

No files matched your search

+19
View File
@@ -23,6 +23,25 @@ export default function mode({ modeConfiguration }) {
// We should not be.
id: 'viewer',
displayName: 'Basic Viewer',
/**
* Lifecycle hooks
*/
onModeEnter: ({ servicesManager, extensionManager }) => {
// Note: If tool's aren't initialized, this doesn't have viewport/tools
// to "set active". This is mostly for the toolbar UI state?
// Could update tool manager to be always persistent, and to set state
// on load?
const { ToolBarService } = servicesManager.services;
const interaction = {
groupId: 'primary',
itemId: 'Wwwc',
interactionType: 'tool',
commandOptions: undefined,
};
ToolBarService.recordInteraction(interaction);
},
onModeExit: () => {},
validationTags: {
study: [],
series: [],