diff options
| author | bobzel <zzzman@gmail.com> | 2024-01-11 13:18:29 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-01-11 13:18:29 -0500 |
| commit | 6f278fdf5882bd7c936d64f4da8bf75c34196311 (patch) | |
| tree | c4cea30f585ab562585c6b203813b4f52fb65d94 /src/client/views/MarqueeAnnotator.tsx | |
| parent | 06aaa5d58b62e7c85a81ce6b592c96cd13d16dd3 (diff) | |
fixed obervable values not updateing because of component functions being defined as vairables
Diffstat (limited to 'src/client/views/MarqueeAnnotator.tsx')
| -rw-r--r-- | src/client/views/MarqueeAnnotator.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/views/MarqueeAnnotator.tsx b/src/client/views/MarqueeAnnotator.tsx index ed09d3bf3..9d828364d 100644 --- a/src/client/views/MarqueeAnnotator.tsx +++ b/src/client/views/MarqueeAnnotator.tsx @@ -53,14 +53,13 @@ export class MarqueeAnnotator extends ObservableReactComponent<MarqueeAnnotatorP @computed get top() { return Math.min(this._start.y, this._start.y + this._height); } // prettier-ignore @computed get left() { return Math.min(this._start.x, this._start.x + this._width);} // prettier-ignore - @action - static clearAnnotations(savedAnnotations: ObservableMap<number, HTMLDivElement[]>) { + static clearAnnotations = action((savedAnnotations: ObservableMap<number, HTMLDivElement[]>) => { AnchorMenu.Instance.Status = 'marquee'; AnchorMenu.Instance.fadeOut(true); // clear out old marquees and initialize menu for new selection Array.from(savedAnnotations.values()).forEach(v => v.forEach(a => a.remove())); savedAnnotations.clear(); - } + }); @undoBatch makeAnnotationDocument = (color: string, isLinkButton?: boolean, savedAnnotations?: ObservableMap<number, HTMLDivElement[]>): Opt<Doc> => { |
