Skip to content

Commit ca81d23

Browse files
committed
fix for typescriont 3.7/useDefineForClassFields
1 parent 12195d0 commit ca81d23

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

src/datasource/graphene/frontend.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2503,14 +2503,11 @@ const GRAPHENE_MERGE_SEGMENTS_TOOL_ID = "grapheneMergeSegments";
25032503
const GRAPHENE_FIND_PATH_TOOL_ID = "grapheneFindPath";
25042504

25052505
class MulticutAnnotationLayerView extends AnnotationLayerView {
2506-
private _annotationStates: MergedAnnotationStates;
2507-
25082506
constructor(
25092507
public layer: SegmentationUserLayer,
25102508
public displayState: AnnotationDisplayState,
25112509
) {
2512-
super(layer, displayState);
2513-
2510+
super(layer, displayState, new MergedAnnotationStates());
25142511
const {
25152512
graphConnection: { value: graphConnection },
25162513
} = layer;
@@ -2520,15 +2517,6 @@ class MulticutAnnotationLayerView extends AnnotationLayerView {
25202517
}
25212518
}
25222519
}
2523-
2524-
get annotationStates() {
2525-
if (this._annotationStates === undefined) {
2526-
this._annotationStates = this.registerDisposer(
2527-
new MergedAnnotationStates(),
2528-
);
2529-
}
2530-
return this._annotationStates;
2531-
}
25322520
}
25332521

25342522
const addSelection = (

src/ui/annotations.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,10 +323,6 @@ export class AnnotationLayerView extends Tab {
323323
private mutableControls = document.createElement("div");
324324
private headerRow = document.createElement("div");
325325

326-
get annotationStates() {
327-
return this.layer.annotationStates;
328-
}
329-
330326
private attachedAnnotationStates = new Map<
331327
AnnotationLayerState,
332328
AnnotationLayerViewAttachedState
@@ -446,6 +442,7 @@ export class AnnotationLayerView extends Tab {
446442
constructor(
447443
public layer: Borrowed<UserLayerWithAnnotations>,
448444
public displayState: AnnotationDisplayState,
445+
protected readonly annotationStates: MergedAnnotationStates = layer.annotationStates,
449446
) {
450447
super();
451448
this.element.classList.add("neuroglancer-annotation-layer-view");

0 commit comments

Comments
 (0)