diff options
author | bobzel <zzzman@gmail.com> | 2023-11-29 10:02:34 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-11-29 10:02:34 -0500 |
commit | ba3b3f6f261074bd3f35012bde8730f5d4a36905 (patch) | |
tree | 6f6c7b141f8bc5881113378801d4b2940cfde36a /src/client/views/pdf/PDFViewer.tsx | |
parent | ac360607bee82f0fef769eada99dc0b3f85ae70a (diff) |
numerous changes to fix bugs and to fix/remove old or hacky code. fixed doc dec resizing. moving this.rootDoc => this.Document . fixing template artifacts.
Diffstat (limited to 'src/client/views/pdf/PDFViewer.tsx')
-rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index ca9bf7bd2..33a336de3 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -34,7 +34,6 @@ pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://unpkg.com/pdfjs-dist@2.16.105/ interface IViewerProps extends FieldViewProps { Document: Doc; - rootDoc: Doc; dataDoc: Doc; layoutDoc: Doc; fieldKey: string; @@ -168,7 +167,7 @@ export class PDFViewer extends React.Component<IViewerProps> { scrollFocus = (doc: Doc, scrollTop: number, options: DocFocusOptions) => { const mainCont = this._mainCont.current; let focusSpeed: Opt<number>; - if (doc !== this.props.rootDoc && mainCont) { + if (doc !== this.props.Document && mainCont) { const windowHeight = this.props.PanelHeight() / (this.props.NativeDimScaling?.() || 1); const scrollTo = Utils.scrollIntoView(scrollTop, doc[Height](), NumCast(this.props.layoutDoc._layout_scrollTop), windowHeight, windowHeight * 0.1, this._scrollHeight); if (scrollTo !== undefined && scrollTo !== this.props.layoutDoc._layout_scrollTop) { @@ -577,7 +576,7 @@ export class PDFViewer extends React.Component<IViewerProps> { {!this._mainCont.current || !this._annotationLayer.current ? null : ( <MarqueeAnnotator ref={this._marqueeref} - rootDoc={this.props.rootDoc} + Document={this.props.Document} getPageFromScroll={this.getPageFromScroll} anchorMenuClick={this.props.anchorMenuClick} scrollTop={0} |