From ddc7c4019eff459be9e81583aa956720c687818d Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Fri, 23 Sep 2022 16:08:31 -0400
Subject: fixed pinWithVIew for videos to capture timecode.  fixed formatting
 of time labels in presBox panel.

---
 src/client/views/nodes/trails/PresBox.tsx | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

(limited to 'src/client/views/nodes/trails/PresBox.tsx')

diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx
index de19f831d..3d9c38186 100644
--- a/src/client/views/nodes/trails/PresBox.tsx
+++ b/src/client/views/nodes/trails/PresBox.tsx
@@ -1447,9 +1447,9 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
                                         <div id={'startTime'} className="slider-number" style={{ backgroundColor: Colors.LIGHT_GRAY }}>
                                             <input
                                                 className="presBox-input"
-                                                style={{ textAlign: 'center', width: 30, height: 15, fontSize: 10 }}
+                                                style={{ textAlign: 'center', width: '100%', height: 15, fontSize: 10 }}
                                                 type="number"
-                                                value={NumCast(activeItem.presStartTime)}
+                                                value={NumCast(activeItem.presStartTime).toFixed(2)}
                                                 onKeyDown={e => e.stopPropagation()}
                                                 onChange={action((e: React.ChangeEvent<HTMLInputElement>) => {
                                                     activeItem.presStartTime = Number(e.target.value);
@@ -1473,9 +1473,9 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
                                             <input
                                                 className="presBox-input"
                                                 onKeyDown={e => e.stopPropagation()}
-                                                style={{ textAlign: 'center', width: 30, height: 15, fontSize: 10 }}
+                                                style={{ textAlign: 'center', width: '100%', height: 15, fontSize: 10 }}
                                                 type="number"
-                                                value={NumCast(activeItem.presEndTime)}
+                                                value={NumCast(activeItem.presEndTime).toFixed(2)}
                                                 onChange={action((e: React.ChangeEvent<HTMLInputElement>) => {
                                                     activeItem.presEndTime = Number(e.target.value);
                                                 })}
@@ -1493,13 +1493,14 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
                                         style={{ gridColumn: 1, gridRow: 1 }}
                                         className={`toolbar-slider ${'end'}`}
                                         id="toolbar-slider"
-                                        onPointerDown={() => {
+                                        onPointerDown={e => {
                                             this._batch = UndoManager.StartBatch('presEndTime');
                                             const endBlock = document.getElementById('endTime');
                                             if (endBlock) {
                                                 endBlock.style.color = Colors.LIGHT_GRAY;
                                                 endBlock.style.backgroundColor = Colors.MEDIUM_BLUE;
                                             }
+                                            e.stopPropagation();
                                         }}
                                         onPointerUp={() => {
                                             this._batch?.end();
@@ -1523,13 +1524,14 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
                                         style={{ gridColumn: 1, gridRow: 1 }}
                                         className={`toolbar-slider ${'start'}`}
                                         id="toolbar-slider"
-                                        onPointerDown={() => {
+                                        onPointerDown={e => {
                                             this._batch = UndoManager.StartBatch('presStartTime');
                                             const startBlock = document.getElementById('startTime');
                                             if (startBlock) {
                                                 startBlock.style.color = Colors.LIGHT_GRAY;
                                                 startBlock.style.backgroundColor = Colors.MEDIUM_BLUE;
                                             }
+                                            e.stopPropagation();
                                         }}
                                         onPointerUp={() => {
                                             this._batch?.end();
@@ -1545,10 +1547,10 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
                                         }}
                                     />
                                 </div>
-                                <div className={`slider-headers ${activeItem.presMovement === PresMovement.Pan || activeItem.presMovement === PresMovement.Zoom ? '' : 'none'}`}>
-                                    <div className="slider-text">{clipStart} s</div>
+                                <div className="slider-headers">
+                                    <div className="slider-text">{clipStart.toFixed(2)} s</div>
                                     <div className="slider-text"></div>
-                                    <div className="slider-text">{clipEnd} s</div>
+                                    <div className="slider-text">{clipEnd.toFixed(2)} s</div>
                                 </div>
                             </div>
                             <div className="ribbon-final-box">
-- 
cgit v1.2.3-70-g09d2

