feat(hp callback): Add viewport ready callback (#3772)

Co-authored-by: Ouwen Huang <ouwen.huang@duke.edu>
This commit is contained in:
AlirezaandOuwen Huang authored and GitHub committed 2023-11-08 09:19:49 -05:00
1 parent 1a68c06c3b
commit bf252bcec2
10 files changed
+143 -44

No files matched your search

-11
View File
@@ -241,7 +241,6 @@ const commandsModule = ({
];
stateSyncService.store(stateSyncReduce);
// This is a default action applied
const { protocol } = hangingProtocolService.getActiveProtocol();
actions.toggleHpTools();
// try to use the same tool in the new hanging protocol stage
@@ -264,16 +263,6 @@ const commandsModule = ({
});
}
}
// Send the notification about updating the state
if (protocolId !== hpInfo.protocolId) {
// The old protocol callbacks are used for turning off things
// like crosshairs when moving to the new HP
commandsManager.run(oldProtocol.callbacks?.onProtocolExit);
// The new protocol callback is used for things like
// activating modes etc.
}
commandsManager.run(protocol.callbacks?.onProtocolEnter);
return true;
} catch (e) {
console.error(e);