From 3956e91fe6d2f649a4bf0e557cbaba253dc177b7 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Mon, 10 Feb 2025 15:11:47 -0500
Subject: fixed presbox numerical text input to be editable

---
 src/client/views/nodes/trails/PresBox.tsx | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 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 b98a7f96e..9ab5fb1bd 100644
--- a/src/client/views/nodes/trails/PresBox.tsx
+++ b/src/client/views/nodes/trails/PresBox.tsx
@@ -1604,7 +1604,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
                                     </div>
                                 </div>
                                 <div className="ribbon-property" style={{ border: `solid 1px ${SnappingManager.userColor}`, display: 'flex', maxWidth: 60, width: '100%' }}>
-                                    <input className="presBox-inputNumber" type="number" readOnly value={duration} onKeyDown={e => e.stopPropagation()} onChange={action(e => this.updateDurationTime(e.target.value))} />
+                                    <input className="presBox-inputNumber" type="number" value={duration} onChange={action(e => this.updateDurationTime(e.target.value))} />
                                     <span>s</span>
                                 </div>
                             </div>
@@ -1893,8 +1893,8 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
                     {/* Movement */}
                     <div
                         className={`presBox-ribbon ${this._transitionTools && this.layoutDoc.presentation_status === PresStatus.Edit ? 'active' : ''}`}
-                        onPointerDown={StopEvent}
-                        onPointerUp={StopEvent}
+                        onPointerDown={e => e.stopPropagation()}
+                        onPointerUp={e => e.stopPropagation()}
                         onClick={action(e => {
                             e.stopPropagation();
                             this._openMovementDropdown = false;
@@ -1914,7 +1914,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
                                     </div>
                                 </div>
                                 <div className="ribbon-property" style={{ border: `solid 1px ${SnappingManager.userColor}`, display: 'flex', maxWidth: 60, width: '100%' }}>
-                                    <input className="presBox-inputNumber" type="number" readOnly value={transitionSpeed} onKeyDown={e => e.stopPropagation()} onChange={action(e => this.updateTransitionTime(e.target.value))} />
+                                    <input className="presBox-inputNumber" type="number" value={transitionSpeed} onKeyDown={e => e.stopPropagation()} onChange={action(e => this.updateTransitionTime(e.target.value))} />
                                     <span>s</span>
                                 </div>
                             </div>
@@ -1935,7 +1935,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
                                 </Tooltip>
                                 <div className="presBox-subheading-slider">{PresBox.inputter('0', '1', '100', zoom, activeItem.presentation_movement === PresMovement.Zoom, this.updateZoom)}</div>
                                 <div className="ribbon-property" style={{ border: `solid 1px ${SnappingManager.userColor}`, display: 'flex', maxWidth: 60, width: '100%' }}>
-                                    <input className="presBox-inputNumber" readOnly type="number" value={zoom} onChange={e => this.updateZoom(e.target.value)} />
+                                    <input className="presBox-inputNumber" type="number" value={zoom} onChange={e => this.updateZoom(e.target.value)} />
                                     <span>%</span>
                                 </div>
                             </div>
@@ -1957,7 +1957,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
                     </div>
 
                     {/* Cubic bezier editor */}
-                    {this.showEaseFunctions && StrCast(activeItem.presentation_easeFunc).includes('cubic-bezier') && (
+                    {!this.showEaseFunctions || !StrCast(activeItem.presentation_easeFunc).includes('cubic-bezier') ? null : (
                         <div className="presBox-option-block" style={{ paddingTop: 0, alignItems: 'center' }}>
                             <CubicBezierEditor setFunc={this.setBezierControlPoints} currPoints={this.currCPoints} />
                         </div>
@@ -1965,8 +1965,8 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
 
                     <div
                         className={`presBox-ribbon ${this._transitionTools && this.layoutDoc.presentation_status === PresStatus.Edit ? 'active' : ''}`}
-                        onPointerDown={StopEvent}
-                        onPointerUp={StopEvent}
+                        onPointerDown={e => e.stopPropagation()}
+                        onPointerUp={e => e.stopPropagation()}
                         onClick={action(e => {
                             e.stopPropagation();
                             this._openMovementDropdown = false;
@@ -2004,6 +2004,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
                                     MORE
                                 </div>
                             </div>
+
                             {this.aiEffects}
                             <div className="presBox-gpt-chat">
                                 {/* Effect direction */}
-- 
cgit v1.2.3-70-g09d2

