From fb7e5e6fa98f32a657538704fa5441ddda8e0bb8 Mon Sep 17 00:00:00 2001
From: mehekj <mehek.jethani@gmail.com>
Date: Wed, 22 Jun 2022 12:55:42 -0400
Subject: fixed timeline label bug removed "NaN"

---
 src/client/views/collections/CollectionStackedTimeline.tsx | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'src/client/views/collections/CollectionStackedTimeline.tsx')

diff --git a/src/client/views/collections/CollectionStackedTimeline.tsx b/src/client/views/collections/CollectionStackedTimeline.tsx
index 77ed83278..3e85edac8 100644
--- a/src/client/views/collections/CollectionStackedTimeline.tsx
+++ b/src/client/views/collections/CollectionStackedTimeline.tsx
@@ -458,7 +458,7 @@ export class CollectionStackedTimeline extends CollectionSubView<CollectionStack
         if (anchorStartTime === undefined) return rootDoc;
         const anchor = docAnchor ?? Docs.Create.LabelDocument({
             title: ComputedField.MakeFunction(
-                `"#" + formatToTime(self["${startTag}"]) + "-" + formatToTime(self["${endTag}"])`
+                `self["${endTag}"] ? "#" + formatToTime(self["${startTag}"]) + "-" + formatToTime(self["${endTag}"]) : "#" + formatToTime(self["${startTag}"])`
             ) as any,
             _minFontSize: 12,
             _maxFontSize: 24,
@@ -833,7 +833,6 @@ class StackedTimelineAnchor extends React.Component<StackedTimelineAnchorProps>
         return `#${formatTime(start)}-${formatTime(end)}`;
     }
 
-
     componentDidMount() {
         this._disposer = reaction(
             () => this.props.currentTimecode(),
@@ -924,7 +923,7 @@ class StackedTimelineAnchor extends React.Component<StackedTimelineAnchorProps>
 
     // context menu
     contextMenuItems = () => {
-        const resetTitle = { script: ScriptField.MakeFunction(`self.title = "#" + formatToTime(self["${this.props.startTag}"]) + "-" + formatToTime(self["${this.props.endTag}"])`)!, icon: "folder-plus", label: "Reset Title" };
+        const resetTitle = { script: ScriptField.MakeFunction(`self.title = self["${this.props.endTag}"] ? "#" + formatToTime(self["${this.props.startTag}"]) + "-" + formatToTime(self["${this.props.endTag}"]) : "#" + formatToTime(self["${this.props.startTag}"])`)!, icon: "folder-plus", label: "Reset Title" };
         return [resetTitle];
     }
 
-- 
cgit v1.2.3-70-g09d2


From 1a47021a14a7b3b6da1a46765228cd4a99940184 Mon Sep 17 00:00:00 2001
From: mehekj <mehek.jethani@gmail.com>
Date: Thu, 30 Jun 2022 10:24:28 -0400
Subject: stacked timeline timecode fix

---
 src/client/views/collections/CollectionStackedTimeline.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/client/views/collections/CollectionStackedTimeline.tsx')

diff --git a/src/client/views/collections/CollectionStackedTimeline.tsx b/src/client/views/collections/CollectionStackedTimeline.tsx
index 3e85edac8..b00017453 100644
--- a/src/client/views/collections/CollectionStackedTimeline.tsx
+++ b/src/client/views/collections/CollectionStackedTimeline.tsx
@@ -725,12 +725,12 @@ export class CollectionStackedTimeline extends CollectionSubView<CollectionStack
                     />
                     {/* {this.renderDictation} */}
 
-                    { /* check time to prevent weird div overflow */ this._hoverTime < this.clipDuration && <div
+                    <div
                         className="collectionStackedTimeline-hover"
                         style={{
                             left: `${((this._hoverTime - this.clipStart) / this.clipDuration) * 100}%`,
                         }}
-                    />}
+                    />
 
                     <div
                         className="collectionStackedTimeline-current"
@@ -775,7 +775,7 @@ export class CollectionStackedTimeline extends CollectionSubView<CollectionStack
                 </div>
             </div>
             <div className="timeline-hoverUI" style={{ left: `calc(${((this._hoverTime - this.clipStart) / this.clipDuration) * 100}%` }}>
-                <div className="hoverTime">{formatTime(this._hoverTime)}</div>
+                <div className="hoverTime">{formatTime(this._hoverTime - this.clipStart)}</div>
                 {this._thumbnail && <img className="videoBox-thumbnail" src={this._thumbnail} />}
             </div>
         </div >);
-- 
cgit v1.2.3-70-g09d2

