diff options
author | yipstanley <stanley_yip@brown.edu> | 2019-06-10 10:58:00 -0400 |
---|---|---|
committer | yipstanley <stanley_yip@brown.edu> | 2019-06-10 10:58:00 -0400 |
commit | 81a502f81073e7fb15c75563cd557a6a2c5a31cd (patch) | |
tree | e53a10b6f6901231e47b61c474ce223b84faaabf /src | |
parent | 92cdb8dae6162b1aa7e41f3392c670e7c5d377eb (diff) |
annotation loading maybe idk not workign rn
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 2 | ||||
-rw-r--r-- | src/client/views/pdf/Page.tsx | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index 0711ead23..0a6886878 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -184,7 +184,7 @@ class Viewer extends React.Component<IViewerProps> { // render pages for any indices that don't already have pages (force rerender will make these render regardless) for (let i = startIndex; i <= endIndex; i++) { - if (!this._isPage[i] || forceRender) { + if (!this._isPage[i] || (this._isPage[i] && forceRender)) { this._visibleElements[i] = ( <Page pdf={this.props.pdf} diff --git a/src/client/views/pdf/Page.tsx b/src/client/views/pdf/Page.tsx index 940f31f41..0d86f22c1 100644 --- a/src/client/views/pdf/Page.tsx +++ b/src/client/views/pdf/Page.tsx @@ -163,6 +163,9 @@ export default class Page extends React.Component<IPageProps> { targetAnnotations.push(...annotationDocs); targetDoc.annotations = targetAnnotations; } + else { + targetDoc.annotations = new List<Doc>(annotationDocs); + } // temporary code (currently broken ? 6/7/19) to get annotations to rerender on pdf let thisAnnotations = Cast(this.props.parent.Document.annotations, listSpec(Doc)); if (thisAnnotations) { |