|
@@ -235,16 +235,22 @@ export namespace VolumeStreaming {
|
|
|
});
|
|
|
|
|
|
this.subscribeObservable(this.plugin.managers.structure.focus.events.changed, () => {
|
|
|
- const entry = this.plugin.managers.structure.focus.current
|
|
|
- console.log(entry)
|
|
|
- const loci = entry ? entry.loci : EmptyLoci
|
|
|
-
|
|
|
- if (this.params.entry.params.view.name !== 'selection-box') {
|
|
|
- this.lastLoci = loci;
|
|
|
- } else {
|
|
|
- this.updateInteraction(loci)
|
|
|
- }
|
|
|
+ this.updateFromFocus()
|
|
|
});
|
|
|
+
|
|
|
+ // ensure current focus is shown if needed upon registering
|
|
|
+ this.updateFromFocus()
|
|
|
+ }
|
|
|
+
|
|
|
+ private updateFromFocus() {
|
|
|
+ const entry = this.plugin.managers.structure.focus.current
|
|
|
+ const loci = entry ? entry.loci : EmptyLoci
|
|
|
+
|
|
|
+ if (this.params.entry.params.view.name !== 'selection-box') {
|
|
|
+ this.lastLoci = loci;
|
|
|
+ } else {
|
|
|
+ this.updateInteraction(loci)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private getBoxFromLoci(loci: StructureElement.Loci | EmptyLoci): Box3D {
|