Skip to content

Commit

Permalink
fix(datasource/graphene) fix multicut annotation list not appearing i…
Browse files Browse the repository at this point in the history
…n graph tab
  • Loading branch information
chrisj committed Jan 31, 2025
1 parent acb6a43 commit 19d90bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
14 changes: 1 addition & 13 deletions src/datasource/graphene/frontend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1964,14 +1964,11 @@ const GRAPHENE_MULTICUT_SEGMENTS_TOOL_ID = "grapheneMulticutSegments";
const GRAPHENE_MERGE_SEGMENTS_TOOL_ID = "grapheneMergeSegments";

class MulticutAnnotationLayerView extends AnnotationLayerView {
private _annotationStates: MergedAnnotationStates;

constructor(
public layer: SegmentationUserLayer,
public displayState: AnnotationDisplayState,
) {
super(layer, displayState);

super(layer, displayState, new MergedAnnotationStates());
const {
graphConnection: { value: graphConnection },
} = layer;
Expand All @@ -1981,15 +1978,6 @@ class MulticutAnnotationLayerView extends AnnotationLayerView {
}
}
}

get annotationStates() {
if (this._annotationStates === undefined) {
this._annotationStates = this.registerDisposer(
new MergedAnnotationStates(),
);
}
return this._annotationStates;
}
}

const synchronizeAnnotationSource = (
Expand Down
5 changes: 1 addition & 4 deletions src/ui/annotations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,6 @@ export class AnnotationLayerView extends Tab {
private mutableControls = document.createElement("div");
private headerRow = document.createElement("div");

get annotationStates() {
return this.layer.annotationStates;
}

private attachedAnnotationStates = new Map<
AnnotationLayerState,
AnnotationLayerViewAttachedState
Expand Down Expand Up @@ -379,6 +375,7 @@ export class AnnotationLayerView extends Tab {
constructor(
public layer: Borrowed<UserLayerWithAnnotations>,
public displayState: AnnotationDisplayState,
protected readonly annotationStates: MergedAnnotationStates = layer.annotationStates,
) {
super();
this.element.classList.add("neuroglancer-annotation-layer-view");
Expand Down

0 comments on commit 19d90bb

Please sign in to comment.