aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormonikahedman <monika_hedman@brown.edu>2020-02-09 14:55:25 -0500
committermonikahedman <monika_hedman@brown.edu>2020-02-09 14:55:25 -0500
commitfb9cbca164800c26baee2d0bde171e9e052b7866 (patch)
treef3f58212eef15d2a5d089c026eab033e6b1b285a /src
parent92068acedc3d6f5bed25dc1a0dacbe19d0338829 (diff)
taking out right information
Diffstat (limited to 'src')
-rw-r--r--src/client/views/animationtimeline/Timeline.tsx23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/client/views/animationtimeline/Timeline.tsx b/src/client/views/animationtimeline/Timeline.tsx
index 2ac7e6c92..e4af43e0a 100644
--- a/src/client/views/animationtimeline/Timeline.tsx
+++ b/src/client/views/animationtimeline/Timeline.tsx
@@ -433,6 +433,8 @@ export class Timeline extends React.Component<FieldViewProps> {
lengthString = "";
}
+ // let rightInfo = this.timeIndicator;
+
return (
<div key="timeline_toolbox" className="timeline-toolbox" style={{ height: `${size}px` }}>
<div className="playbackControls">
@@ -452,15 +454,30 @@ export class Timeline extends React.Component<FieldViewProps> {
</div>
</div>
<div className="time-box overview-tool" style={{ display: this._timelineVisible ? "flex" : "none" }}>
- <div key="time-text" className="animation-text" style={{ visibility: this.props.Document.isATOn ? "visible" : "hidden", display: this.props.Document.isATOn ? "flex" : "none" }}>{lengthString}</div>
- <input className="time-input" disabled style={{ visibility: this.props.Document.isATOn ? "visible" : "hidden", display: this.props.Document.isATOn ? "flex" : "none" }} placeholder={String(Math.floor(this._time) / 1000) + " s"} ref={this._timeInputRef} onKeyDown={this.onTimeInput} />
- <div style={{ width: "100%", display: !this.props.Document.isATOn ? "flex" : "none" }}>Current: {this.getCurrentTime()}</div>
+ {this.timeIndicator(lengthString)}
+ {/* {rightInfo} */}
</div>
</div>
</div>
);
}
+ timeIndicator(lengthString: string) {
+ if (this.props.Document.isATOn) {
+ return (
+ <>
+ <div key="time-text" className="animation-text" style={{ visibility: this.props.Document.isATOn ? "visible" : "hidden", display: this.props.Document.isATOn ? "flex" : "none" }}>{lengthString}</div>
+ <input className="time-input" disabled style={{ visibility: this.props.Document.isATOn ? "visible" : "hidden", display: this.props.Document.isATOn ? "flex" : "none" }} placeholder={String(Math.floor(this._time) / 1000) + " s"} ref={this._timeInputRef} onKeyDown={this.onTimeInput} />
+ </>
+ );
+ }
+ else {
+ return (
+ <div style={{ width: "100%", display: !this.props.Document.isATOn ? "flex" : "none" }}>Current: {this.getCurrentTime()}</div>
+ );
+ }
+ }
+
/**
* manual time input (kinda broken right now)
*/