aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/pdf/PDFViewer.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-09-11 18:07:08 -0400
committerbobzel <zzzman@gmail.com>2020-09-11 18:07:08 -0400
commit1aacedfa3f558e243f2bca92c62fc0d0cfdce58a (patch)
treeaafcbac134fdaccd8b26908d0fb40c12052eeff2 /src/client/views/pdf/PDFViewer.tsx
parent1b8eb5a59edfcef36e8f6450aca82de46d2044eb (diff)
parente3c8534e129a3ce70a2673c92cadccec26f6cdc7 (diff)
Merge branch 'master' into bug_fixes
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);
}
},