From 30058cdb5aac7b94616b2b29278c1b833a0de155 Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Mon, 30 Oct 2023 14:47:12 +0200 Subject: [PATCH] RED-7673 - deselect annotations only if multi select mode is not active --- .../modules/file-preview/services/pdf-proxy.service.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts b/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts index 4fdb5b0bb..efc7871cf 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts @@ -58,7 +58,11 @@ export class PdfProxyService { readonly currentUser = getCurrentUser(); readonly pageChanged$ = this._pdf.pageChanged$.pipe( tap(() => this.#handleExcludedPageActions()), - tap(() => this._annotationManager.deselect()), + tap(() => { + if (this._multiSelectService.inactive()) { + this._annotationManager.deselect(); + } + }), shareDistinctLast(), ); readonly canPerformActions = computed(() => { @@ -386,7 +390,7 @@ export class PdfProxyService { actions.push(visibilityButton); } - actions = [...actions, ...this._pdfAnnotationActionsService.get(annotationWrappers)]; + actions = this._multiSelectService.inactive() ? [...actions, ...this._pdfAnnotationActionsService.get(annotationWrappers)] : []; this._pdf.instance.UI.annotationPopup.update(actions); }