Skip to content

Commit

Permalink
fix for typescriont 3.7/useDefineForClassFields
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisj committed Jan 29, 2025
1 parent 12195d0 commit d7b6521
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
14 changes: 1 addition & 13 deletions src/datasource/graphene/frontend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2503,14 +2503,11 @@ const GRAPHENE_MERGE_SEGMENTS_TOOL_ID = "grapheneMergeSegments";
const GRAPHENE_FIND_PATH_TOOL_ID = "grapheneFindPath";

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 @@ -2520,15 +2517,6 @@ class MulticutAnnotationLayerView extends AnnotationLayerView {
}
}
}

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

const addSelection = (
Expand Down
3 changes: 2 additions & 1 deletion src/ui/annotations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ export class AnnotationLayerView extends Tab {
private headerRow = document.createElement("div");

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

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

0 comments on commit d7b6521

Please sign in to comment.