RED-6361, fix OCR documents image hint annotations showing the hide button when already hidden.

This commit is contained in:
George 2023-03-17 17:23:39 +02:00
parent da3842ae88
commit cef0f8beaf

View File

@ -146,10 +146,13 @@ export class AnnotationDrawService {
annotation.Id = annotationWrapper.id;
annotation.ReadOnly = true;
const isOCR = annotationWrapper.isOCR && !annotationWrapper.isSuggestionResize;
if (isOCR && !this._annotationManager.isHidden(annotationWrapper.annotationId)) {
this._annotationManager.addToHidden(annotationWrapper.annotationId);
}
annotation.Hidden =
annotationWrapper.isChangeLogRemoved ||
(hideSkipped && annotationWrapper.isSkipped) ||
(annotationWrapper.isOCR && !annotationWrapper.isSuggestionResize) ||
this._annotationManager.isHidden(annotationWrapper.annotationId);
annotation.setCustomData('redact-manager', 'true');
annotation.setCustomData('redaction', String(annotationWrapper.previewAnnotation));