RED-3367: Disable redaction with rectangle tool
This commit is contained in:
parent
5677f5c899
commit
607452cedf
@ -457,7 +457,7 @@ export class PdfViewerComponent extends AutoUnsubscribe implements OnInit, OnCha
|
||||
this.instance.UI.annotationPopup.update([]);
|
||||
|
||||
if (annotationWrappers.length === 0) {
|
||||
this._configureRectangleAnnotationPopup();
|
||||
this._configureRectangleAnnotationPopup(viewerAnnotations[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -497,16 +497,18 @@ export class PdfViewerComponent extends AutoUnsubscribe implements OnInit, OnCha
|
||||
this.instance.UI.annotationPopup.add(actions);
|
||||
}
|
||||
|
||||
private _configureRectangleAnnotationPopup() {
|
||||
this.instance.UI.annotationPopup.add([
|
||||
{
|
||||
type: 'actionButton',
|
||||
dataElement: dataElements.ADD_RECTANGLE,
|
||||
img: this._convertPath('/assets/icons/general/pdftron-action-add-redaction.svg'),
|
||||
title: this._translateService.instant(this._manualAnnotationService.getTitle('REDACTION', this.dossier)),
|
||||
onClick: () => this._addRectangleManualRedaction(),
|
||||
},
|
||||
]);
|
||||
private _configureRectangleAnnotationPopup(annotation: Annotation) {
|
||||
if (!this.viewModeService.isCompare || annotation.getPageNumber() % 2 === 1) {
|
||||
this.instance.UI.annotationPopup.add([
|
||||
{
|
||||
type: 'actionButton',
|
||||
dataElement: dataElements.ADD_RECTANGLE,
|
||||
img: this._convertPath('/assets/icons/general/pdftron-action-add-redaction.svg'),
|
||||
title: this._translateService.instant(this._manualAnnotationService.getTitle('REDACTION', this.dossier)),
|
||||
onClick: () => this._addRectangleManualRedaction(),
|
||||
},
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
private _addRectangleManualRedaction() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user