diff options
| author | geireann <geireann.lindfield@gmail.com> | 2021-08-24 19:07:24 -0400 |
|---|---|---|
| committer | geireann <geireann.lindfield@gmail.com> | 2021-08-24 19:07:24 -0400 |
| commit | 5e12fe1f5dfe73aeb5744d61ecbee02fbf14c59e (patch) | |
| tree | f6e40215834974d3692bce12af09f7f461deb860 /src/client/views/MarqueeAnnotator.tsx | |
| parent | 0c5a95f37e91a07041699514155fd214f544a0de (diff) | |
| parent | e221001a24e8615aa6113dd3f25b8c6e10c74999 (diff) | |
Merge branch 'master' into menu_updates_geireann
Diffstat (limited to 'src/client/views/MarqueeAnnotator.tsx')
| -rw-r--r-- | src/client/views/MarqueeAnnotator.tsx | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/client/views/MarqueeAnnotator.tsx b/src/client/views/MarqueeAnnotator.tsx index a3a3bce56..c08734c3e 100644 --- a/src/client/views/MarqueeAnnotator.tsx +++ b/src/client/views/MarqueeAnnotator.tsx @@ -43,15 +43,13 @@ export class MarqueeAnnotator extends React.Component<MarqueeAnnotatorProps> { @observable private _width: number = 0; @observable private _height: number = 0; - constructor(props: any) { - super(props); - runInAction(() => { - AnchorMenu.Instance.Status = "marquee"; - AnchorMenu.Instance.fadeOut(true); - // clear out old marquees and initialize menu for new selection - Array.from(this.props.savedAnnotations.values()).forEach(v => v.forEach(a => a.remove())); - this.props.savedAnnotations.clear(); - }); + @action + static clearAnnotations(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(); } @action componentDidMount() { |
