aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/pdf/PDFViewer.tsx
diff options
context:
space:
mode:
authorkimdahey <claire_kim1@brown.edu>2019-11-12 16:09:38 -0500
committerkimdahey <claire_kim1@brown.edu>2019-11-12 16:09:38 -0500
commit190ab79a986981580d39fcf42b0875f76876fccc (patch)
tree9fe613d248859bf06423271e831c090d7d3d7eb2 /src/client/views/pdf/PDFViewer.tsx
parent461af95c312fc7aff85551c014fb93dc7a89cecd (diff)
parentecbe527575bab2cb5f1ced278039ec0a6fc50809 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into claire_settings
Diffstat (limited to 'src/client/views/pdf/PDFViewer.tsx')
-rw-r--r--src/client/views/pdf/PDFViewer.tsx14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx
index 060ba8613..0cb671156 100644
--- a/src/client/views/pdf/PDFViewer.tsx
+++ b/src/client/views/pdf/PDFViewer.tsx
@@ -199,7 +199,7 @@ export class PDFViewer extends DocAnnotatableComponent<IViewerProps, PdfDocument
this._annotationReactionDisposer = reaction(
() => this.extensionDoc && DocListCast(this.extensionDoc.annotations),
- annotations => annotations && annotations.length && this.renderAnnotations(annotations, true),
+ annotations => annotations && annotations.length && (this._annotations = annotations),
{ fireImmediately: true });
this._filterReactionDisposer = reaction(
@@ -297,18 +297,6 @@ export class PDFViewer extends DocAnnotatableComponent<IViewerProps, PdfDocument
this.Index = -1;
return mainAnnoDoc;
}
-
- @action
- renderAnnotations = (annotations: Doc[], removeOldAnnotations: boolean): void => {
- if (removeOldAnnotations) {
- this._annotations = annotations;
- }
- else {
- this._annotations.push(...annotations);
- this._annotations = new Array<Doc>(...this._annotations);
- }
- }
-
@action
prevAnnotation = () => {
this.Index = Math.max(this.Index - 1, 0);