disable rectangle in preview

This commit is contained in:
Timo 2021-02-22 11:14:13 +02:00
parent 6617a3a696
commit 2b54468a48

View File

@ -335,11 +335,13 @@ export class PdfViewerComponent implements OnInit, AfterViewInit, OnChanges {
private _handleCustomActions() {
if (this.canPerformActions) {
this.instance.enableTools(['AnnotationCreateRectangle']);
this.instance.enableElements(['add-redaction', 'add-rectangle', 'add-false-positive', 'shapeToolGroupButton']);
if (this._selectedText.length > 2) {
this.instance.enableElements(['add-dictionary', 'add-false-positive']);
}
} else {
this.instance.disableTools(['AnnotationCreateRectangle']);
this.instance.disableElements(['add-redaction', 'add-dictionary', 'add-false-positive', 'add-rectangle', 'shapeToolGroupButton']);
}
}