aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/pdf/PDFViewer.tsx2
-rw-r--r--src/client/views/pdf/Page.tsx3
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) {