diff options
author | Sophie Zhang <sophie_zhang@brown.edu> | 2024-05-14 12:19:29 -0400 |
---|---|---|
committer | Sophie Zhang <sophie_zhang@brown.edu> | 2024-05-14 12:19:29 -0400 |
commit | 255495874b3fd2644cf05f330d15194318adcc55 (patch) | |
tree | 41f73f8721acea1543432d0e4a42dfdb81069cee | |
parent | e2b4502f87cf5707a77736267a1d96261024874c (diff) |
bug fixing
-rw-r--r-- | src/client/views/nodes/trails/CubicBezierEditor.tsx | 1 | ||||
-rw-r--r-- | src/client/views/nodes/trails/PresBox.tsx | 32 | ||||
-rw-r--r-- | src/client/views/nodes/trails/PresElementBox.tsx | 3 |
3 files changed, 17 insertions, 19 deletions
diff --git a/src/client/views/nodes/trails/CubicBezierEditor.tsx b/src/client/views/nodes/trails/CubicBezierEditor.tsx index db3eb2e26..e12fca20c 100644 --- a/src/client/views/nodes/trails/CubicBezierEditor.tsx +++ b/src/client/views/nodes/trails/CubicBezierEditor.tsx @@ -8,7 +8,6 @@ type Props = { }; const ANIMATION_DURATION = 750; -// const ANIMATION_TIMING_FUNC = "cubic-bezier(.42,.97,.52,1.49)"; const ANIMATION_TIMING_FUNC = 'cubic-bezier(0.3, .2, .2, 1.4)'; const CONTAINER_WIDTH = 200; const EDITOR_WIDTH = 100; diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx index 248de5f4b..4890c115b 100644 --- a/src/client/views/nodes/trails/PresBox.tsx +++ b/src/client/views/nodes/trails/PresBox.tsx @@ -1848,19 +1848,19 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { </div> {[DocumentType.AUDIO, DocumentType.VID].includes(targetType as any as DocumentType) ? null : ( <> - <div className="ribbon-doubleButton presBox-ribbon"> + <div className="ribbon-doubleButton"> <div className="presBox-subheading">Slide Duration</div> <div className="ribbon-property" style={{ border: `solid 1px ${SettingsManager.userColor}` }}> <input className="presBox-input" type="number" readOnly={true} value={duration} onKeyDown={e => e.stopPropagation()} onChange={e => this.updateDurationTime(e.target.value)} /> s </div> - <div className="ribbon-propertyUpDown" style={{ color: SettingsManager.userBackgroundColor, background: SettingsManager.userColor }}> + {/* <div className="ribbon-propertyUpDown" style={{ color: SettingsManager.userBackgroundColor, background: SettingsManager.userColor }}> <div className="ribbon-propertyUpDownItem" onClick={() => this.updateDurationTime(String(duration), 1000)}> <FontAwesomeIcon icon={'caret-up'} /> </div> <div className="ribbon-propertyUpDownItem" onClick={() => this.updateDurationTime(String(duration), -1000)}> <FontAwesomeIcon icon={'caret-down'} /> </div> - </div> + </div> */} </div> {PresBox.inputter('0.1', '0.1', '20', duration, targetType !== DocumentType.AUDIO, this.updateDurationTime)} <div className={'slider-headers'} style={{ display: targetType === DocumentType.AUDIO ? 'none' : 'grid' }}> @@ -2068,7 +2068,6 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { /> </div> </div> - {/* Movement */} <div className={`presBox-ribbon ${this._transitionTools && this.layoutDoc.presentation_status === PresStatus.Edit ? 'active' : ''}`} @@ -2097,7 +2096,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { <div className="ribbon-doubleButton" style={{ display: activeItem.presentation_movement === PresMovement.Zoom ? 'inline-flex' : 'none' }}> <div className="presBox-subheading">Zoom (% screen filled)</div> <div className="ribbon-property" style={{ border: `solid 1px ${SettingsManager.userColor}` }}> - <input className="presBox-input" type="number" readOnly={true} value={zoom} onChange={e => this.updateZoom(e.target.value)} />% + <input className="presBox-input" readOnly={true} type="number" value={zoom} onChange={e => this.updateZoom(e.target.value)} />% </div> {/* <div className="ribbon-propertyUpDown" style={{ color: SettingsManager.userBackgroundColor, background: SettingsManager.userColor }}> <div className="ribbon-propertyUpDownItem" onClick={() => this.updateZoom(String(zoom), 0.1)}> @@ -2161,26 +2160,28 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { {`${this.showBezierEditor ? 'Hide' : 'Show'} Timing Editor`} <FontAwesomeIcon icon={this.showBezierEditor ? 'chevron-up' : 'chevron-down'} /> </div> - {this.showBezierEditor && ( - <> - <p className="presBox-submenu-label" style={{ alignSelf: 'flex-start' }}> - Custom Timing Function - </p> - <CubicBezierEditor setFunc={this.setBezierControlPoints} currPoints={this.currCPoints} easeFunc={StrCast(this.activeItem.presEaseFunc)} /> - </> - )} </div> </div> </div> - + <div className="presBox-option-block"> + {this.showBezierEditor && ( + <> + <p className="presBox-submenu-label" style={{ alignSelf: 'flex-start' }}> + Custom Timing Function + </p> + <CubicBezierEditor setFunc={this.setBezierControlPoints} currPoints={this.currCPoints} easeFunc={StrCast(this.activeItem.presEaseFunc)} /> + </> + )} + </div> {/* This chatbox is for getting slide effect transition suggestions from gpt and visualizing them */} <div className="presBox-gpt-chat"> + Effects <div className="pres-chat"> <div className="pres-chatbox-container"> <ReactTextareaAutosize ref={r => (this._inputref2 = r)} minRows={1} - placeholder="Get transition suggestions..." + placeholder="Get effect suggestions..." className="pres-chatbox" autoFocus={true} value={this.animationChat} @@ -2217,7 +2218,6 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { this._openBulletEffectDropdown = false; })}> <div className="presBox-option-block" style={{ padding: '16px' }}> - Effects <div className="presBox-option-block presBox-option-center"> {/* Chat for idea generation */} diff --git a/src/client/views/nodes/trails/PresElementBox.tsx b/src/client/views/nodes/trails/PresElementBox.tsx index 449b8e07f..268b1c803 100644 --- a/src/client/views/nodes/trails/PresElementBox.tsx +++ b/src/client/views/nodes/trails/PresElementBox.tsx @@ -517,10 +517,9 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps>() { <div className={'slideButton'} onClick={() => { - PresBox.Instance.navigateToActiveItem(); + this.presBoxView?.regularSelect(this.slideDoc, this._itemRef.current!, this._dragRef.current!, true, false); PresBox.Instance.openProperties(); PresBox.Instance.slideToModify = this.Document; - // PresBox.Instance.recordDictation(); }}> <FontAwesomeIcon icon={'edit'} onPointerDown={e => e.stopPropagation()} /> </div> |