aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-08-28 16:02:13 -0400
committerbobzel <zzzman@gmail.com>2021-08-28 16:02:13 -0400
commit2d2e027f11253834a337680bbfd1ac549bb2a1f0 (patch)
tree2d07a728c65f267236e14e1c3ba4764dc15dbb0b
parent7c83bc30b3a6ed6061ef68bcef6a0e8941668b3c (diff)
made anchorMenu go away after user clicks the highlighter button
-rw-r--r--src/client/views/MarqueeAnnotator.tsx2
-rw-r--r--src/client/views/pdf/AnchorMenu.tsx1
2 files changed, 2 insertions, 1 deletions
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<MarqueeAnnotatorProps> {
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<AntimodeMenuProps> {
if (!this.Highlight(this.highlightColor, false) && this.Pinned) {
this.Highlighting = !this.Highlighting;
}
+ AnchorMenu.Instance.fadeOut(true);
}
@action