diff options
author | yipstanley <stanley_yip@brown.edu> | 2019-11-16 14:33:07 -0500 |
---|---|---|
committer | yipstanley <stanley_yip@brown.edu> | 2019-11-16 14:33:07 -0500 |
commit | 68c9c230b3c98ec70adaa1dacb66215f09d2c1f6 (patch) | |
tree | c3ef95f57ff84c847aedd0125173b6c58cbeb239 /src/client/views/pdf/PDFViewer.tsx | |
parent | 0b19ecd4e65c30154a744085eb80b3b375acfe3e (diff) | |
parent | 22d1e65236bae11c508d5c34ebcbddd1a552bfd8 (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into interaction_stanley
Diffstat (limited to 'src/client/views/pdf/PDFViewer.tsx')
-rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 14 |
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); |