From 2b54468a48cdc296173d247b943ceab6d23b9ebd Mon Sep 17 00:00:00 2001 From: Timo Date: Mon, 22 Feb 2021 11:14:13 +0200 Subject: [PATCH] disable rectangle in preview --- .../src/app/screens/file/pdf-viewer/pdf-viewer.component.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/red-ui/src/app/screens/file/pdf-viewer/pdf-viewer.component.ts b/apps/red-ui/src/app/screens/file/pdf-viewer/pdf-viewer.component.ts index 68f25faf9..700f0a799 100644 --- a/apps/red-ui/src/app/screens/file/pdf-viewer/pdf-viewer.component.ts +++ b/apps/red-ui/src/app/screens/file/pdf-viewer/pdf-viewer.component.ts @@ -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']); } }