aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionStackedTimeline.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-01-28 14:28:27 -0500
committerbobzel <zzzman@gmail.com>2021-01-28 14:28:27 -0500
commitbc4cabf751097e847f0c64cc5acc25bc1ee09243 (patch)
treee752ae8a8dcdb7e2b71f11ef85cdb585443f7772 /src/client/views/collections/CollectionStackedTimeline.tsx
parent61076c3ca711a8d3af01010b2375e3683e26fb8d (diff)
more cleanup for switching back to parameterized audioTag/videoTag instead of anchorStartTag
Diffstat (limited to 'src/client/views/collections/CollectionStackedTimeline.tsx')
-rw-r--r--src/client/views/collections/CollectionStackedTimeline.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/collections/CollectionStackedTimeline.tsx b/src/client/views/collections/CollectionStackedTimeline.tsx
index 893f2c53b..1d7e40e96 100644
--- a/src/client/views/collections/CollectionStackedTimeline.tsx
+++ b/src/client/views/collections/CollectionStackedTimeline.tsx
@@ -88,7 +88,7 @@ export class CollectionStackedTimeline extends CollectionSubView<PanZoomDocument
}
anchorStart = (anchor: Doc) => NumCast(anchor._timecodeToShow, NumCast(anchor[this.props.startTag]));
- anchorEnd = (anchor: Doc, val: any = null) => NumCast(anchor._timecodeToHide, NumCast(anchor[this.props.endTag]));
+ anchorEnd = (anchor: Doc, val: any = null) => NumCast(anchor._timecodeToHide, NumCast(anchor[this.props.endTag], val));
getLinkData(l: Doc) {
let la1 = l.anchor1 as Doc;
@@ -111,7 +111,7 @@ export class CollectionStackedTimeline extends CollectionSubView<PanZoomDocument
changeAnchor = (anchor: Opt<Doc>, time: number) => {
if (anchor) {
const timelineOnly = Cast(anchor[this.props.startTag], "number", null) !== undefined;
- if (timelineOnly) this._left ? anchor[this.props.startTag] = time : anchor[this.props.endTag] = time;
+ if (timelineOnly) Doc.SetInPlace(anchor, this._left ? this.props.startTag : this.props.endTag, time, true);
else this._left ? anchor._timecodeToShow = time : anchor._timecodeToHide = time;
}
}
@@ -177,8 +177,8 @@ export class CollectionStackedTimeline extends CollectionSubView<PanZoomDocument
hideLinkButton: true,
annotationOn: this.props.Document
});
- anchor[this.props.startTag] = anchorStartTime;
- anchor[this.props.endTag] = anchorEndTime;
+ Doc.GetProto(anchor)[this.props.startTag] = anchorStartTime;
+ Doc.GetProto(anchor)[this.props.endTag] = anchorEndTime;
if (Cast(this.dataDoc[this.props.fieldKey], listSpec(Doc), null) !== undefined) {
Cast(this.dataDoc[this.props.fieldKey], listSpec(Doc), []).push(anchor);
} else {