From 113b4ce125a125afd36b675e8d00844bca07c260 Mon Sep 17 00:00:00 2001
From: mehekj <mehek.jethani@gmail.com>
Date: Sun, 1 May 2022 23:17:09 -0400
Subject: centered controls

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

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

diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx
index 80ad63e72..0344295bb 100644
--- a/src/client/views/nodes/VideoBox.tsx
+++ b/src/client/views/nodes/VideoBox.tsx
@@ -383,7 +383,6 @@ export class VideoBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp
         return !field ? <div key="loading">Loading</div> :
             <div className="videoBox-contentContainer" key="container" style={{ mixBlendMode: "multiply" }}>
                 <div className={classname} ref={this.setContentRef} onPointerDown={(e) => this._fullScreen && e.stopPropagation()}>
-                    {/* {this._fullScreen && this.componentUI(0, 0)} */}
                     {this._fullScreen && <div className="videoBox-ui">
                         {this.UIButtons}
                     </div>}
@@ -702,9 +701,10 @@ export class VideoBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp
         const top = bounds?.top || 0;
         const height = (bounds?.bottom || 0) - top;
         const yPos = height * this.heightPercent / 100 - 60 + top;
-        const width = Math.max(right - left - 20, 300);
+        const width = Math.max(right - left, 300);
+        const overflow = (width - right + left) / 2;
         return this._fullScreen ? null : <div className="videoBox-ui-wrapper" style={{ clip: `rect(${boundsTop}px, 10000px, 10000px, ${boundsLeft}px)` }}>
-            <div className="videoBox-ui" style={{ left: left + 10, top: yPos, width: width }}>
+            <div className="videoBox-ui" style={{ left: left - overflow, top: yPos, width: width }}>
                 {this.UIButtons}
             </div>
         </div>
-- 
cgit v1.2.3-70-g09d2

