diff options
author | Andy Rickert <andrew_rickert@brown.edu> | 2020-06-11 20:56:48 -0400 |
---|---|---|
committer | Andy Rickert <andrew_rickert@brown.edu> | 2020-06-11 20:56:48 -0400 |
commit | db97843dccf820231bec0f9a2f8d9de0b64bb71f (patch) | |
tree | 8305d2c9fe0e2e48e483a2e075a7a6b71491b79b /src/client/views/pdf/PDFViewer.tsx | |
parent | 78227f09b30db57c6f500bd2e2d02f43d133d1da (diff) |
ability to parse back and forth through internal seaarch results
Diffstat (limited to 'src/client/views/pdf/PDFViewer.tsx')
-rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index 5bad248be..882e48de7 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -333,6 +333,10 @@ export class PDFViewer extends ViewBoxAnnotatableComponent<IViewerProps, PdfDocu nextAnnotation = () => { this.Index = Math.min(this.Index + 1, this.allAnnotations.length - 1); this.scrollToAnnotation(this.allAnnotations.sort((a, b) => NumCast(a.y) - NumCast(b.y))[this.Index]); + this.Document.searchIndex = this.Index; + this.Document.length=this.allAnnotations.length; + console.log(this.Index); + } @action @@ -399,6 +403,9 @@ export class PDFViewer extends ViewBoxAnnotatableComponent<IViewerProps, PdfDocu phraseSearch: true, query: searchString }); + console.log(this.Index); + this.Document.searchIndex = this.Index; + this.Document.length=this.allAnnotations.length; } else if (this._mainCont.current) { const executeFind = () => { @@ -412,7 +419,11 @@ export class PDFViewer extends ViewBoxAnnotatableComponent<IViewerProps, PdfDocu }; this._mainCont.current.addEventListener("pagesloaded", executeFind); this._mainCont.current.addEventListener("pagerendered", executeFind); + console.log(this.Index); + this.Document.searchIndex = this.Index; + this.Document.length=this.allAnnotations.length; } + } @action |