From 75194d8218e1747d177ec018e3cf025b8d8906bc Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 12 Mar 2021 11:48:54 -0500 Subject: 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. --- src/client/views/pdf/AnchorMenu.tsx | 3 ++- src/client/views/pdf/PDFViewer.tsx | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src/client/views/pdf') diff --git a/src/client/views/pdf/AnchorMenu.tsx b/src/client/views/pdf/AnchorMenu.tsx index e3d14d620..5a3c2103e 100644 --- a/src/client/views/pdf/AnchorMenu.tsx +++ b/src/client/views/pdf/AnchorMenu.tsx @@ -42,6 +42,7 @@ export class AnchorMenu extends AntimodeMenu { @observable public Highlighting: boolean = false; @observable public Status: "marquee" | "annotation" | "" = ""; + public OnClick: (e: PointerEvent) => void = unimplementedFunction; public StartDrag: (e: PointerEvent, ele: HTMLElement) => void = unimplementedFunction; public Highlight: (color: string, isPushpin: boolean) => Opt = (color: string, isPushpin: boolean) => undefined; public Delete: () => void = unimplementedFunction; @@ -71,7 +72,7 @@ export class AnchorMenu extends AntimodeMenu { setupMoveUpEvents(this, e, (e: PointerEvent) => { this.StartDrag(e, this._commentCont.current!); return true; - }, returnFalse, returnFalse); + }, returnFalse, e => this.OnClick?.(e)); } @action diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index d2fa1089e..18e167b7a 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -55,6 +55,7 @@ interface IViewerProps extends FieldViewProps { setPdfViewer: (view: PDFViewer) => void; ContentScaling?: () => number; sidebarWidth: () => number; + anchorMenuClick: (anchor: Doc) => void; } /** @@ -567,7 +568,11 @@ export class PDFViewer extends ViewBoxAnnotatableComponent} + } ; } } \ No newline at end of file -- cgit v1.2.3-70-g09d2