diff options
author | bobzel <zzzman@gmail.com> | 2020-08-05 17:15:02 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-08-05 17:15:02 -0400 |
commit | d254d35d8d1fc10e9ca7ef5b9db06cd138b2d102 (patch) | |
tree | f006424685a8971cc430a1eb9afb4483465a5d64 /src/client/views/pdf/PDFViewer.tsx | |
parent | a9fbb81375d3e97b808d2cb90e68c9716ee916b7 (diff) | |
parent | 201da4ecf5c91595dc1c7fb51e360bb75af613f8 (diff) |
Merge branch 'schema_search'
Diffstat (limited to 'src/client/views/pdf/PDFViewer.tsx')
-rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index 5a43a076b..264d3e6c6 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -106,6 +106,7 @@ export class PDFViewer extends ViewBoxAnnotatableComponent<IViewerProps, PdfDocu private _scrollTopReactionDisposer?: IReactionDisposer; private _filterReactionDisposer?: IReactionDisposer; private _searchReactionDisposer?: IReactionDisposer; + private _searchReactionDisposer2?: IReactionDisposer; private _viewer: React.RefObject<HTMLDivElement> = React.createRef(); private _mainCont: React.RefObject<HTMLDivElement> = React.createRef(); private _selectionText: string = ""; @@ -336,6 +337,8 @@ 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; + } @action @@ -403,6 +406,7 @@ export class PDFViewer extends ViewBoxAnnotatableComponent<IViewerProps, PdfDocu phraseSearch: true, query: searchString }); + this.Document.searchIndex = this.Index; } else if (this._mainCont.current) { const executeFind = () => { @@ -416,7 +420,9 @@ export class PDFViewer extends ViewBoxAnnotatableComponent<IViewerProps, PdfDocu }; this._mainCont.current.addEventListener("pagesloaded", executeFind); this._mainCont.current.addEventListener("pagerendered", executeFind); + this.Document.searchIndex = this.Index; } + } @action |