aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/pdf/Annotation.tsx
diff options
context:
space:
mode:
authorAnika Ahluwalia <anika.ahluwalia@gmail.com>2020-09-29 14:38:09 -0500
committerAnika Ahluwalia <anika.ahluwalia@gmail.com>2020-09-29 14:38:09 -0500
commit5c872c454b04ebfb0b18f1eb173e058781d6dd15 (patch)
tree8559da2281355c6743ed98648d19032f3c70a042 /src/client/views/pdf/Annotation.tsx
parentc26d63873e3dd4304088b84fa52bffcc78ca2896 (diff)
parent1cb5ac5e07ad90589670a788e3144d9d9581a393 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into anika_bug_fixes
Diffstat (limited to 'src/client/views/pdf/Annotation.tsx')
-rw-r--r--src/client/views/pdf/Annotation.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/pdf/Annotation.tsx b/src/client/views/pdf/Annotation.tsx
index b7c7dae38..84b14cd61 100644
--- a/src/client/views/pdf/Annotation.tsx
+++ b/src/client/views/pdf/Annotation.tsx
@@ -1,7 +1,7 @@
import React = require("react");
import { action, IReactionDisposer, observable, reaction, runInAction } from "mobx";
import { observer } from "mobx-react";
-import { Doc, DocListCast, HeightSym, WidthSym, Field } from "../../../fields/Doc";
+import { Doc, DocListCast, HeightSym, WidthSym, Field, Opt } from "../../../fields/Doc";
import { Id } from "../../../fields/FieldSymbols";
import { List } from "../../../fields/List";
import { Cast, FieldValue, BoolCast, NumCast, StrCast, PromiseValue } from "../../../fields/Types";
@@ -17,7 +17,7 @@ interface IAnnotationProps {
focus: (doc: Doc) => void;
dataDoc: Doc;
fieldKey: string;
- showInfo: (anno: Doc) => void;
+ showInfo: (anno: Opt<Doc>) => void;
}
@observer
@@ -25,7 +25,7 @@ export
class Annotation extends React.Component<IAnnotationProps> {
render() {
return DocListCast(this.props.anno.annotations).map(a =>
- <RegionAnnotation {...this.props} pinToPres={this.props.pinToPres} document={a} x={NumCast(a.x)} y={NumCast(a.y)} width={a[WidthSym]()} height={a[HeightSym]()} key={a[Id]} />);
+ <RegionAnnotation {...this.props} showInfo={this.props.showInfo} pinToPres={this.props.pinToPres} document={a} x={NumCast(a.x)} y={NumCast(a.y)} width={a[WidthSym]()} height={a[HeightSym]()} key={a[Id]} />);
}
}
@@ -40,7 +40,7 @@ interface IRegionAnnotationProps {
document: Doc;
dataDoc: Doc;
fieldKey: string;
- showInfo: (anno: Doc) => void;
+ showInfo: (anno: Opt<Doc>) => void;
}
@observer