From 8b343f7069ec726b9757a76889eeeea7b2d55f04 Mon Sep 17 00:00:00 2001 From: Timo Date: Thu, 28 Jan 2021 10:08:04 +0200 Subject: [PATCH] updated service calls --- .../file/service/annotation-draw.service.ts | 15 +++++++++++---- .../file/service/single-file-download.service.ts | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/apps/red-ui/src/app/screens/file/service/annotation-draw.service.ts b/apps/red-ui/src/app/screens/file/service/annotation-draw.service.ts index 1e9f8eef0..0f62190d2 100644 --- a/apps/red-ui/src/app/screens/file/service/annotation-draw.service.ts +++ b/apps/red-ui/src/app/screens/file/service/annotation-draw.service.ts @@ -27,9 +27,11 @@ export class AnnotationDrawService { annotationManager.drawAnnotationsFromList(annotations); if (this._userPreferenceService.areDevFeaturesEnabled) { - this._redactionLogControllerService.getSectionGrid(this._appStateService.activeFileId).subscribe((sectionGrid) => { - this.drawSections(activeViewer, sectionGrid); - }); + this._redactionLogControllerService + .getSectionGrid(this._appStateService.activeProjectId, this._appStateService.activeFileId) + .subscribe((sectionGrid) => { + this.drawSections(activeViewer, sectionGrid); + }); } } @@ -52,7 +54,12 @@ export class AnnotationDrawService { public computeSection(activeViewer: WebViewerInstance, pageNumber: number, sectionRectangle: SectionRectangle) { const rectangleAnnot = new activeViewer.Annotations.RectangleAnnotation(); const pageHeight = activeViewer.docViewer.getPageHeight(pageNumber); - const rectangle = { topLeft: sectionRectangle.topLeft, page: pageNumber, height: sectionRectangle.height, width: sectionRectangle.width }; + const rectangle = { + topLeft: sectionRectangle.topLeft, + page: pageNumber, + height: sectionRectangle.height, + width: sectionRectangle.width + }; rectangleAnnot.PageNumber = pageNumber; rectangleAnnot.X = rectangle.topLeft.x - 1; rectangleAnnot.Y = pageHeight - (rectangle.topLeft.y + rectangle.height) - 1; diff --git a/apps/red-ui/src/app/screens/file/service/single-file-download.service.ts b/apps/red-ui/src/app/screens/file/service/single-file-download.service.ts index ff0216ee8..6636b0a7e 100644 --- a/apps/red-ui/src/app/screens/file/service/single-file-download.service.ts +++ b/apps/red-ui/src/app/screens/file/service/single-file-download.service.ts @@ -32,7 +32,7 @@ export class SingleFileDownloadService { loadActiveFileData(): Observable { const fileObs = this.loadFile('ORIGINAL', this._appStateService.activeFile); - const reactionLogObs = this._redactionLogControllerService.getRedactionLog(this._appStateService.activeFileId); + const reactionLogObs = this._redactionLogControllerService.getRedactionLog(this._appStateService.activeProjectId, this._appStateService.activeFileId); const manualRedactionsObs = this._manualRedactionControllerService.getManualRedaction( this._appStateService.activeProjectId, this._appStateService.activeFileId