diff options
| author | bobzel <zzzman@gmail.com> | 2021-08-24 02:30:06 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2021-08-24 02:30:06 -0400 |
| commit | 707038795f7129d30a1d4ed5f2311f18a282fecb (patch) | |
| tree | 04eb6bb00883f8c3c88a9c1c771c5899f0355f07 /src/client/views/MarqueeAnnotator.tsx | |
| parent | e81bb4e087d7bdb9521bfed1c84ba4d4dac8aa75 (diff) | |
fixed following link from ink stroke. made interacting with annotatable documents consistent when selections are cleared by clicking. fixed undo for webboxes. fixed limiting size of links button.
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() { |
