From 129d76df4f474a27fadf6c37a05aaee4cb767163 Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 8 Oct 2021 10:48:41 -0400 Subject: fixed dragging markers on video timelines. fixed moving timeline clips to write show/hide by default to the layout document but otherwise in place --- .../collections/CollectionStackedTimeline.tsx | 34 +++++++++++----------- src/client/views/nodes/VideoBox.tsx | 2 ++ 2 files changed, 19 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionStackedTimeline.tsx b/src/client/views/collections/CollectionStackedTimeline.tsx index 3ec7f27d3..b5c266526 100644 --- a/src/client/views/collections/CollectionStackedTimeline.tsx +++ b/src/client/views/collections/CollectionStackedTimeline.tsx @@ -348,11 +348,11 @@ export class CollectionStackedTimeline extends CollectionSubView< const x = localPt[0] - docDragData.offset[0]; const timelinePt = this.toTimeline(x, this.props.PanelWidth()); docDragData.droppedDocuments.forEach(drop => { - const d = Doc.GetProto(drop); - if (this.anchorEnd(d) !== undefined) { - d[d._timecodeToHide === undefined ? this.props.endTag : "_timecodeToHide"] = timelinePt + this.anchorEnd(d) - this.anchorStart(d); + const anchorEnd = this.anchorEnd(drop); + if (anchorEnd !== undefined) { + Doc.SetInPlace(drop, drop._timecodeToHide === undefined ? this.props.endTag : "timecodeToHide", timelinePt + anchorEnd - this.anchorStart(drop), false); } - d[d._timecodToShow === undefined ? this.props.startTag : "_timecodToShow"] = timelinePt; + Doc.SetInPlace(drop, drop._timecodeToShow === undefined ? this.props.startTag : "timecodeToShow", timelinePt, false); }); return true; @@ -868,19 +868,19 @@ class StackedTimelineAnchor extends React.Component {inner.view} {!inner.anchor.view || !SelectionManager.IsSelected(inner.anchor.view) ? null : ( - <> -
this.onAnchorDown(e, this.props.mark, true)} - /> -
this.onAnchorDown(e, this.props.mark, false)} - /> - - )} + <> +
this.onAnchorDown(e, this.props.mark, true)} + /> +
this.onAnchorDown(e, this.props.mark, false)} + /> + + )} ); } diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx index 23c90de8a..c22dbab5c 100644 --- a/src/client/views/nodes/VideoBox.tsx +++ b/src/client/views/nodes/VideoBox.tsx @@ -572,6 +572,8 @@ export class VideoBox extends ViewBoxAnnotatableComponent