feat(hp): add onStageChange callback (#5165)

This commit is contained in:
Ibrahim authored and GitHub committed 2025-06-27 13:08:21 -04:00
1 parent c2b75e1a50
commit 4bddd53fcd
2 files changed
+7

No files matched your search

@@ -1064,6 +1064,11 @@ export default class HangingProtocolService extends PubSubService {
throw new Error(`Can't find applicable stage ${protocol.id} ${options?.stageIndex}`);
}
this.stageIndex = stage as number;
if (this.protocol?.callbacks?.onStageChange) {
this._commandsManager.run(this.protocol.callbacks.onStageChange);
}
this._updateViewports(options);
} catch (error) {
console.log(error);