diff options
author | bobzel <zzzman@gmail.com> | 2021-03-13 12:38:12 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-03-13 12:38:12 -0500 |
commit | e20a8916483734bb06d08409b6bc804c2391a289 (patch) | |
tree | 5c5c135a8894e8a2bd8d27eb03e004fedd291358 /src/client/views/nodes/PDFBox.tsx | |
parent | 280c24f1216a532e9f2157e6db0bf8c8030a16f3 (diff) |
fixed pdfs to show filtered annotations when a link follows to them by removing docFilters.
Diffstat (limited to 'src/client/views/nodes/PDFBox.tsx')
-rw-r--r-- | src/client/views/nodes/PDFBox.tsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx index e1ac8f16d..4e4db323c 100644 --- a/src/client/views/nodes/PDFBox.tsx +++ b/src/client/views/nodes/PDFBox.tsx @@ -28,6 +28,8 @@ import { FormattedTextBox } from './formattedText/FormattedTextBox'; import { pageSchema } from "./ImageBox"; import "./PDFBox.scss"; import React = require("react"); +import { DocFocusOptions } from './DocumentView'; +import { List } from '../../../fields/List'; type PdfDocument = makeInterface<[typeof documentSchema, typeof panZoomSchema, typeof pageSchema]>; const PdfDocument = makeInterface(documentSchema, panZoomSchema, pageSchema); @@ -87,6 +89,12 @@ export class PDFBox extends ViewBoxAnnotatableComponent<FieldViewProps, PdfDocum initialScrollTarget: Opt<Doc>; scrollFocus = (doc: Doc, smooth: boolean) => { + if (DocListCast(this.rootDoc[this.sidebarKey()]).includes(doc)) { + if (this.layoutDoc["_" + this.sidebarKey() + "-docFilters"]) { + this.layoutDoc["_" + this.sidebarKey() + "-docFilters"] = new List<string>(); + return 1; + } + } this.initialScrollTarget = doc; return this._pdfViewer?.scrollFocus(doc, smooth); } @@ -298,7 +306,6 @@ export class PDFBox extends ViewBoxAnnotatableComponent<FieldViewProps, PdfDocum </div> </div>; } - isChildActive = (outsideReaction?: boolean) => this._isChildActive; @computed get renderPdfView() { TraceMobx(); |