RED-9944 - Action Items don't appear in document area in webviewer when bulk-select is still unintenionally active
This commit is contained in:
parent
ba3cb01f02
commit
90e8af9765
@ -133,14 +133,14 @@ export class AnnotationActionsComponent {
|
||||
const viewerAnnotations = untracked(this.viewerAnnotations);
|
||||
this._annotationManager.hide(viewerAnnotations);
|
||||
this._annotationManager.deselect();
|
||||
this._annotationManager.addToHidden(viewerAnnotations[0].Id);
|
||||
viewerAnnotations.forEach(a => this._annotationManager.addToHidden(a.Id));
|
||||
}
|
||||
|
||||
showAnnotation() {
|
||||
const viewerAnnotations = untracked(this.viewerAnnotations);
|
||||
this._annotationManager.show(viewerAnnotations);
|
||||
this._annotationManager.deselect();
|
||||
this._annotationManager.removeFromHidden(viewerAnnotations[0].Id);
|
||||
viewerAnnotations.forEach(a => this._annotationManager.removeFromHidden(a.Id));
|
||||
}
|
||||
|
||||
resize() {
|
||||
|
||||
@ -72,6 +72,7 @@ import { FileHeaderComponent } from './components/file-header/file-header.compon
|
||||
import { StructuredComponentManagementComponent } from './components/structured-component-management/structured-component-management.component';
|
||||
import { DocumentInfoService } from './services/document-info.service';
|
||||
import { RectangleAnnotationDialog } from './dialogs/rectangle-annotation-dialog/rectangle-annotation-dialog.component';
|
||||
import { ANNOTATION_ACTION_ICONS, ANNOTATION_ACTIONS } from './utils/constants';
|
||||
|
||||
@Component({
|
||||
templateUrl: './file-preview-screen.component.html',
|
||||
@ -284,9 +285,11 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
|
||||
this._ngZone.run(() => {
|
||||
if (event.isTrusted) {
|
||||
const clickedElement = event.target as HTMLElement;
|
||||
const editingAnnotation =
|
||||
(clickedElement as HTMLImageElement).src?.includes('edit.svg') || clickedElement.getAttribute('aria-label') === 'Edit';
|
||||
if (this._multiSelectService.active() && !editingAnnotation) {
|
||||
const actionIconClicked = ANNOTATION_ACTION_ICONS.some(action =>
|
||||
(clickedElement as HTMLImageElement).src?.includes(action),
|
||||
);
|
||||
const actionClicked = ANNOTATION_ACTIONS.some(action => clickedElement.getAttribute('aria-label')?.includes(action));
|
||||
if (this._multiSelectService.active() && !actionIconClicked && !actionClicked) {
|
||||
if (
|
||||
clickedElement.querySelector('#selectionrect') ||
|
||||
clickedElement.id === `pageWidgetContainer${this.pdf.currentPage()}`
|
||||
|
||||
@ -389,10 +389,10 @@ export class PdfProxyService {
|
||||
this._ngZone.run(() => {
|
||||
if (allAreVisible) {
|
||||
this._annotationManager.hide(viewerAnnotations);
|
||||
this._annotationManager.addToHidden(viewerAnnotations[0].Id);
|
||||
viewerAnnotations.forEach(a => this._annotationManager.addToHidden(a.Id));
|
||||
} else {
|
||||
this._annotationManager.show(viewerAnnotations);
|
||||
this._annotationManager.removeFromHidden(viewerAnnotations[0].Id);
|
||||
viewerAnnotations.forEach(a => this._annotationManager.removeFromHidden(a.Id));
|
||||
}
|
||||
this._annotationManager.deselect();
|
||||
});
|
||||
|
||||
@ -45,3 +45,31 @@ export const TextPopups = {
|
||||
} as const;
|
||||
|
||||
export const HIDE_SKIPPED = 'hide-skipped';
|
||||
|
||||
export const ANNOTATION_ACTION_ICONS = [
|
||||
'resize',
|
||||
'edit',
|
||||
'trash',
|
||||
'check',
|
||||
'thumb-up',
|
||||
'pdftron-action-add-redaction',
|
||||
'visibility-off',
|
||||
] as const;
|
||||
export const ANNOTATION_ACTIONS = [
|
||||
'Resize',
|
||||
'Größe ändern',
|
||||
'Edit',
|
||||
'Bearbeiten',
|
||||
'Remove',
|
||||
'Entfernen',
|
||||
'Accept recommendation',
|
||||
'Empfehlung annehmen',
|
||||
'Force redaction',
|
||||
'Schwärzung erzwingen',
|
||||
'Force hint',
|
||||
'Hinweis erzwingen',
|
||||
'Redact',
|
||||
'Schwärzen',
|
||||
'Hide',
|
||||
'Ausblenden',
|
||||
] as const;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user