From dda3d092ba9f071f567d279aed369efe185ffbde Mon Sep 17 00:00:00 2001 From: mehekj Date: Thu, 7 Oct 2021 16:08:30 -0400 Subject: fix presentation play bounds to fit trim bounds --- src/client/views/collections/TabDocView.tsx | 4 ++-- src/client/views/nodes/trails/PresBox.tsx | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/TabDocView.tsx b/src/client/views/collections/TabDocView.tsx index eb95bb913..9f24d60d8 100644 --- a/src/client/views/collections/TabDocView.tsx +++ b/src/client/views/collections/TabDocView.tsx @@ -220,8 +220,8 @@ export class TabDocView extends React.Component { if (!pinProps?.audioRange && duration !== undefined) { pinDoc.mediaStart = "manual"; pinDoc.mediaStop = "manual"; - pinDoc.presStartTime = 0; - pinDoc.presEndTime = duration; + pinDoc.presStartTime = doc.clipStart; + pinDoc.presEndTime = doc.clipEnd; } //save position if (pinProps?.setPosition || pinDoc.isInkMask) { diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx index f4892d77c..ba21a7bfb 100644 --- a/src/client/views/nodes/trails/PresBox.tsx +++ b/src/client/views/nodes/trails/PresBox.tsx @@ -1431,6 +1431,8 @@ export class PresBox extends ViewBoxBaseComponent @computed get mediaOptionsDropdown() { const activeItem: Doc = this.activeItem; const targetDoc: Doc = this.targetDoc; + const clipStart: number = NumCast(activeItem.clipStart); + const clipEnd: number = NumCast(activeItem.clipEnd); const duration = Math.round(NumCast(activeItem[`${Doc.LayoutFieldKey(activeItem)}-duration`]) * 10); const mediaStopDocInd: number = NumCast(activeItem.mediaStopDoc); const mediaStopDocStr: string = mediaStopDocInd ? mediaStopDocInd + ". " + this.childDocs[mediaStopDocInd - 1].title : ""; @@ -1476,7 +1478,7 @@ export class PresBox extends ViewBoxBaseComponent
- e.stopPropagation(); activeItem.presEndTime = Number(e.target.value); }} /> - }} />
-
0 s
+
{clipStart} s
-
{duration / 10} s
+
{clipEnd} s
-- cgit v1.2.3-70-g09d2