Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(datasource/graphene) fix multicut annotation list not appearing in graph tab #706

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading