aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/pdf/Annotation.tsx
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2019-11-19 11:28:49 -0500
committerSam Wilkins <samwilkins333@gmail.com>2019-11-19 11:28:49 -0500
commit3f86ea5556ab7a1fc13cd9c74ef4305f2f5cd778 (patch)
tree4d13f3401ecc80fb5bce22d2a3382545102fda7f /src/client/views/pdf/Annotation.tsx
parent611bb858265b6667f2b7db858d183cea16f273aa (diff)
parentd259cf7b16e64794bc12ae420f9b512a75eee46c (diff)
merged with master
Diffstat (limited to 'src/client/views/pdf/Annotation.tsx')
-rw-r--r--src/client/views/pdf/Annotation.tsx9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/client/views/pdf/Annotation.tsx b/src/client/views/pdf/Annotation.tsx
index ad6240c70..936af9ab8 100644
--- a/src/client/views/pdf/Annotation.tsx
+++ b/src/client/views/pdf/Annotation.tsx
@@ -52,11 +52,7 @@ class RegionAnnotation extends React.Component<IRegionAnnotationProps> {
this._brushDisposer = reaction(
() => FieldValue(Cast(this.props.document.group, Doc)) && Doc.isBrushedHighlightedDegree(FieldValue(Cast(this.props.document.group, Doc))!),
- (brushed) => {
- if (brushed !== undefined) {
- runInAction(() => this._brushed = brushed !== 0);
- }
- }
+ brushed => brushed !== undefined && runInAction(() => this._brushed = brushed !== 0)
);
}
@@ -100,8 +96,9 @@ class RegionAnnotation extends React.Component<IRegionAnnotationProps> {
let annoGroup = await Cast(this.props.document.group, Doc);
if (annoGroup) {
DocumentManager.Instance.FollowLink(undefined, annoGroup,
- (doc: Doc, maxLocation: string) => this.props.addDocTab(doc, undefined, e.ctrlKey ? "onRight" : "inTab"),
+ (doc: Doc, maxLocation: string) => this.props.addDocTab(doc, undefined, e.ctrlKey ? "inTab" : "onRight"),
false, false, undefined);
+ e.stopPropagation();
}
}
}