aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/pdf/PDFViewer.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-09-10 11:57:01 -0400
committerbobzel <zzzman@gmail.com>2020-09-10 11:57:01 -0400
commitd673482563d161171568682d745996598228baf2 (patch)
treebe14514794686a5d3eb4a9399bcc545a918c939b /src/client/views/pdf/PDFViewer.tsx
parent75fa8e7e798566962d88fc3012c41c3179580e39 (diff)
fixiing behavior of following link to target in a PDF that hasn't loaded its contents yet... need to wait. also fixed pdf titltes in lod view
Diffstat (limited to 'src/client/views/pdf/PDFViewer.tsx')
-rw-r--r--src/client/views/pdf/PDFViewer.tsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx
index 4e28116c7..79bd190c5 100644
--- a/src/client/views/pdf/PDFViewer.tsx
+++ b/src/client/views/pdf/PDFViewer.tsx
@@ -175,7 +175,11 @@ export class PDFViewer extends ViewBoxAnnotatableComponent<IViewerProps, PdfDocu
(scrollY) => {
if (scrollY !== undefined) {
(this._showCover || this._showWaiting) && this.setupPdfJsViewer();
- (this.props.renderDepth === -1 || (!LinkDocPreview.TargetDoc && !FormattedTextBoxComment.linkDoc)) && this._mainCont.current && smoothScroll(1000, this._mainCont.current, (this.Document._scrollY || 0));
+ if ((this.props.renderDepth === -1 || (!LinkDocPreview.TargetDoc && !FormattedTextBoxComment.linkDoc)) && this._mainCont.current) {
+ smoothScroll(1000, this._mainCont.current, (this.Document._scrollY || 0));
+ } else {
+ console.log("Waiting for preview");
+ }
setTimeout(() => this.Document._scrollY = undefined, 1000);
}
},