diff options
author | bob <bcz@cs.brown.edu> | 2019-10-03 11:55:47 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-10-03 11:55:47 -0400 |
commit | 9085a369738fbe9ee1a9f74c9aba9a9ca1e5c962 (patch) | |
tree | 52e219b26402d6570e6dba288fa02aead0dc145f | |
parent | 3eae5e99f1c313f25ad26534712c1608a73e8cb4 (diff) |
changed brushing of annotations.
-rw-r--r-- | src/client/views/pdf/Annotation.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/views/pdf/Annotation.tsx b/src/client/views/pdf/Annotation.tsx index 98e04d93e..26de12a0d 100644 --- a/src/client/views/pdf/Annotation.tsx +++ b/src/client/views/pdf/Annotation.tsx @@ -51,10 +51,10 @@ class RegionAnnotation extends React.Component<IRegionAnnotationProps> { ); this._brushDisposer = reaction( - () => FieldValue(Cast(this.props.document.group, Doc)) && Doc.IsBrushed(FieldValue(Cast(this.props.document.group, Doc))!), + () => FieldValue(Cast(this.props.document.group, Doc)) && Doc.isBrushedHighlightedDegree(FieldValue(Cast(this.props.document.group, Doc))!), (brushed) => { if (brushed !== undefined) { - runInAction(() => this._brushed = brushed); + runInAction(() => this._brushed = brushed !== 0); } } ); @@ -122,7 +122,9 @@ class RegionAnnotation extends React.Component<IRegionAnnotationProps> { left: this.props.x, width: this.props.width, height: this.props.height, - backgroundColor: this._brushed ? "green" : StrCast(this.props.document.color) + transition: "background-color 0.5s, opacity 0.5s", + opacity: this._brushed ? 0.5 : undefined, + backgroundColor: this._brushed ? "orange" : StrCast(this.props.document.color) }} />); } }
\ No newline at end of file |