From 740d588a4cd5df9877664877149120bf4cacacaa Mon Sep 17 00:00:00 2001 From: geireann Date: Wed, 17 Jul 2024 16:06:20 -0400 Subject: fixed higlighting text targets with color and htmlOveraly --- src/client/views/pdf/Annotation.tsx | 1 + 1 file changed, 1 insertion(+) (limited to 'src/client/views/pdf/Annotation.tsx') diff --git a/src/client/views/pdf/Annotation.tsx b/src/client/views/pdf/Annotation.tsx index 7dd4047c1..3bd42873c 100644 --- a/src/client/views/pdf/Annotation.tsx +++ b/src/client/views/pdf/Annotation.tsx @@ -111,6 +111,7 @@ export class Annotation extends ObservableReactComponent { outline = () => (this.linkHighlighted ? 'solid 1px lightBlue' : undefined); background = () => (this._props.annoDoc[Highlight] ? 'orange' : StrCast(this._props.annoDoc.backgroundColor)); render() { + const forceRenderHack = [this.background(), this.outline(), this.opacity()]; // forces a re-render when these change -- because RegionAnnotation doesn't do this internally.. return (
{StrListCast(this._props.annoDoc.text_inlineAnnotations) -- cgit v1.2.3-70-g09d2 From 9776e4584b61d3c67622d8ea1f2338a7dfbe857d Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 27 Aug 2024 21:57:43 -0400 Subject: fixed type --- src/client/views/pdf/Annotation.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/client/views/pdf/Annotation.tsx') diff --git a/src/client/views/pdf/Annotation.tsx b/src/client/views/pdf/Annotation.tsx index 3bd42873c..1891cfd4c 100644 --- a/src/client/views/pdf/Annotation.tsx +++ b/src/client/views/pdf/Annotation.tsx @@ -13,6 +13,7 @@ import { FieldViewProps } from '../nodes/FieldView'; import { OpenWhere } from '../nodes/OpenWhere'; import { AnchorMenu } from './AnchorMenu'; import './Annotation.scss'; +import { Property } from 'csstype'; interface IRegionAnnotationProps { x: number; @@ -45,7 +46,7 @@ interface IAnnotationProps extends FieldViewProps { annoDoc: Doc; containerDataDoc: Doc; fieldKey: string; - pointerEvents?: () => Opt; + pointerEvents?: () => Opt; } @observer export class Annotation extends ObservableReactComponent { -- cgit v1.2.3-70-g09d2