From d6720fa48d78cc313d6418acd8cbdaeda965285c Mon Sep 17 00:00:00 2001 From: bobzel Date: Thu, 25 Apr 2024 17:15:20 -0400 Subject: changed marqueeAnnotator to save inline annotations as text strings instead of Docs. enabled making image crops of text selections on PDFs. cleaned up webboxrendered lint promses, and Annotation render --- src/client/views/nodes/PDFBox.tsx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/client/views/nodes/PDFBox.tsx') diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx index b03b90418..fdba9ff49 100644 --- a/src/client/views/nodes/PDFBox.tsx +++ b/src/client/views/nodes/PDFBox.tsx @@ -110,6 +110,10 @@ export class PDFBox extends ViewBoxAnnotatableComponent() implem crop = (region: Doc | undefined, addCrop?: boolean) => { if (!region) return undefined; const cropping = Doc.MakeCopy(region, true); + cropping.layout_unrendered = false; // text selection have this + cropping.text_inlineAnnotations = undefined; // text selections have this -- it causes them not to be rendered. + cropping.backgroundColor = undefined; // text selections have this -- it causes images to be fully transparent + cropping.opacity = undefined; // text selections have this -- it causes images to be fully transparent const regionData = region[DocData]; regionData.lockedPosition = true; regionData.title = 'region:' + this.Document.title; -- cgit v1.2.3-70-g09d2