From 2d2e027f11253834a337680bbfd1ac549bb2a1f0 Mon Sep 17 00:00:00 2001 From: bobzel Date: Sat, 28 Aug 2021 16:02:13 -0400 Subject: made anchorMenu go away after user clicks the highlighter button --- src/client/views/MarqueeAnnotator.tsx | 2 +- src/client/views/pdf/AnchorMenu.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/views/MarqueeAnnotator.tsx b/src/client/views/MarqueeAnnotator.tsx index 1897572f8..eee365ed8 100644 --- a/src/client/views/MarqueeAnnotator.tsx +++ b/src/client/views/MarqueeAnnotator.tsx @@ -77,7 +77,7 @@ export class MarqueeAnnotator extends React.Component { e.stopPropagation(); const sourceAnchorCreator = () => { const annoDoc = this.highlight("rgba(173, 216, 230, 0.75)", true); // hyperlink color - this.props.addDocument(annoDoc); + annoDoc && this.props.addDocument(annoDoc); return annoDoc; }; const targetCreator = (annotationOn: Doc | undefined) => { diff --git a/src/client/views/pdf/AnchorMenu.tsx b/src/client/views/pdf/AnchorMenu.tsx index 17979ef4b..3bf1f0828 100644 --- a/src/client/views/pdf/AnchorMenu.tsx +++ b/src/client/views/pdf/AnchorMenu.tsx @@ -85,6 +85,7 @@ export class AnchorMenu extends AntimodeMenu { if (!this.Highlight(this.highlightColor, false) && this.Pinned) { this.Highlighting = !this.Highlighting; } + AnchorMenu.Instance.fadeOut(true); } @action -- cgit v1.2.3-70-g09d2