diff --git a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html index c3bb1a43d..235a829c3 100644 --- a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html +++ b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html @@ -290,11 +290,7 @@ - + diff --git a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts index afb58a8a7..af046e117 100644 --- a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts @@ -133,8 +133,7 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy { filesAutoUpdateTimer: Subscription; fileReanalysedSubscription: Subscription; - // - areIgnoresVisible = false; + hideSkipped = true; updateViewMode() { const allAnnotations = this._instance.annotManager.getAnnotationsList(); @@ -558,7 +557,6 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy { this.fileData.manualRedactions = manualRedactions; this._rebuildFilters(); this._annotationDrawService.drawAnnotations(this._instance, this.annotationData.allAnnotations); - this._handleIgnoreAnnotationsDrawing(); }); } @@ -689,10 +687,10 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy { }); } - toggleIgnoresVisible($event) { + toggleSkipped($event) { $event.stopPropagation(); $event.preventDefault(); - this.areIgnoresVisible = !this.areIgnoresVisible; + this.hideSkipped = !this.hideSkipped; this._handleIgnoreAnnotationsDrawing(); @@ -702,7 +700,7 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy { private _handleIgnoreAnnotationsDrawing() { const allAnnotations = this._instance.annotManager.getAnnotationsList(); const ignoreAnnotations = allAnnotations.filter((a) => a.getCustomData('skipped')); - if (this.areIgnoresVisible) { + if (this.hideSkipped) { this._instance.annotManager.hideAnnotations(ignoreAnnotations); } else { this._instance.annotManager.showAnnotations(ignoreAnnotations); 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 a51b70916..c531aa6ef 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 @@ -16,7 +16,7 @@ export class AnnotationDrawService { private readonly _userPreferenceService: UserPreferenceService ) {} - public drawAnnotations(activeViewer: WebViewerInstance, annotationWrappers: AnnotationWrapper[]) { + public drawAnnotations(activeViewer: WebViewerInstance, annotationWrappers: AnnotationWrapper[], drawSkipped: boolean = false) { const annotations = []; annotationWrappers.forEach((annotation) => { annotations.push(this.computeAnnotation(activeViewer, annotation)); @@ -83,7 +83,7 @@ export class AnnotationDrawService { highlight.ReadOnly = true; // change log entries are drawn lighter highlight.Opacity = annotationWrapper.isChangeLogRemoved ? 0.2 : 1; - highlight.Hidden = annotationWrapper.isChangeLogRemoved; + highlight.Hidden = annotationWrapper.isChangeLogRemoved || annotationWrapper.isSkipped; highlight.setCustomData('redaction', annotationWrapper.isRedacted); highlight.setCustomData('skipped', annotationWrapper.isSkipped);