aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/InkingCanvas.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-07-12 16:06:15 -0400
committerbob <bcz@cs.brown.edu>2019-07-12 16:06:15 -0400
commit6a477918f2f16bdc023c76d6a145bb6435e918a6 (patch)
tree57d81b5ba0d596d695e8ab4219aaaebcb91e8e7d /src/client/views/InkingCanvas.tsx
parent2eb9dd20456762b8f6038447adef36b2cb7bad87 (diff)
fixed annotations on video timecodes. added start of youtube support.
Diffstat (limited to 'src/client/views/InkingCanvas.tsx')
-rw-r--r--src/client/views/InkingCanvas.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/InkingCanvas.tsx b/src/client/views/InkingCanvas.tsx
index 2c54054a5..37a6bbab7 100644
--- a/src/client/views/InkingCanvas.tsx
+++ b/src/client/views/InkingCanvas.tsx
@@ -13,6 +13,7 @@ import { Cast, PromiseValue, NumCast } from "../../new_fields/Types";
interface InkCanvasProps {
getScreenTransform: () => Transform;
+ AnnotationDocument: Doc;
Document: Doc;
inkFieldKey: string;
children: () => JSX.Element[];
@@ -41,7 +42,7 @@ export class InkingCanvas extends React.Component<InkCanvasProps> {
}
componentDidMount() {
- PromiseValue(Cast(this.props.Document[this.props.inkFieldKey], InkField)).then(ink => runInAction(() => {
+ PromiseValue(Cast(this.props.AnnotationDocument[this.props.inkFieldKey], InkField)).then(ink => runInAction(() => {
if (ink) {
let bounds = Array.from(ink.inkData).reduce(([mix, max, miy, may], [id, strokeData]) =>
strokeData.pathData.reduce(([mix, max, miy, may], p) =>
@@ -56,12 +57,12 @@ export class InkingCanvas extends React.Component<InkCanvasProps> {
@computed
get inkData(): Map<string, StrokeData> {
- let map = Cast(this.props.Document[this.props.inkFieldKey], InkField);
+ let map = Cast(this.props.AnnotationDocument[this.props.inkFieldKey], InkField);
return !map ? new Map : new Map(map.inkData);
}
set inkData(value: Map<string, StrokeData>) {
- this.props.Document[this.props.inkFieldKey] = new InkField(value);
+ this.props.AnnotationDocument[this.props.inkFieldKey] = new InkField(value);
}
@action