RED-7673 - deselect annotations only if multi select mode is not active

This commit is contained in:
Valentin Mihai 2023-10-30 14:47:12 +02:00
parent 871ff5759e
commit 30058cdb5a

View File

@ -58,7 +58,11 @@ export class PdfProxyService {
readonly currentUser = getCurrentUser<User>();
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);
}