diff options
| author | bobzel <zzzman@gmail.com> | 2021-03-12 11:48:54 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2021-03-12 11:48:54 -0500 |
| commit | 75194d8218e1747d177ec018e3cf025b8d8906bc (patch) | |
| tree | 2f7faf642a9977620f9a83b3e8feddec3fad8d48 /src/client/views/MarqueeAnnotator.tsx | |
| parent | 2f5051296883d3473e2eb1df648d27a0102d04ed (diff) | |
changed setDocFilter to not take undefined as a modfied & added toggle param. added single click on marquee annotator to create an annotation. extended PDF sidebar to have filter buttons.
Diffstat (limited to 'src/client/views/MarqueeAnnotator.tsx')
| -rw-r--r-- | src/client/views/MarqueeAnnotator.tsx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client/views/MarqueeAnnotator.tsx b/src/client/views/MarqueeAnnotator.tsx index 63439586c..503c284aa 100644 --- a/src/client/views/MarqueeAnnotator.tsx +++ b/src/client/views/MarqueeAnnotator.tsx @@ -29,6 +29,7 @@ export interface MarqueeAnnotatorProps { addDocument: (doc: Doc) => boolean; getPageFromScroll?: (top: number) => number; finishMarquee: () => void; + anchorMenuClick?: (anchor: Doc) => void; } @observer export class MarqueeAnnotator extends React.Component<MarqueeAnnotatorProps> { @@ -59,6 +60,7 @@ export class MarqueeAnnotator extends React.Component<MarqueeAnnotatorProps> { document.addEventListener("pointermove", this.onSelectMove); document.addEventListener("pointerup", this.onSelectEnd); + AnchorMenu.Instance.OnClick = (e: PointerEvent) => this.props.anchorMenuClick?.(this.highlight("rgba(173, 216, 230, 0.75)", true)); AnchorMenu.Instance.Highlight = this.highlight; /** * This function is used by the AnchorMenu to create an anchor highlight and a new linked text annotation. |
