summaryrefslogtreecommitdiff
path: root/src/components/app/timeline/TimelineComponent.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/app/timeline/TimelineComponent.js')
-rw-r--r--src/components/app/timeline/TimelineComponent.js50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/components/app/timeline/TimelineComponent.js b/src/components/app/timeline/TimelineComponent.js
index 950a25bd..0f88b8f4 100644
--- a/src/components/app/timeline/TimelineComponent.js
+++ b/src/components/app/timeline/TimelineComponent.js
@@ -4,34 +4,34 @@ import TimelineLabelsContainer from "../../../containers/app/timeline/TimelineLa
import "./Timeline.css";
class TimelineComponent extends React.Component {
- componentDidMount() {
- this.interval = setInterval(() => {
- if (!this.props.isPlaying) {
- return;
- }
+ componentDidMount() {
+ this.interval = setInterval(() => {
+ if (!this.props.isPlaying) {
+ return;
+ }
- if (this.props.currentTick < this.props.lastSimulatedTick) {
- this.props.incrementTick();
- } else {
- this.props.pauseSimulation();
- }
- }, 1000);
- }
+ if (this.props.currentTick < this.props.lastSimulatedTick) {
+ this.props.incrementTick();
+ } else {
+ this.props.pauseSimulation();
+ }
+ }, 1000);
+ }
- componentWillUnmount() {
- clearInterval(this.interval);
- }
+ componentWillUnmount() {
+ clearInterval(this.interval);
+ }
- render() {
- return (
- <div className="timeline-bar">
- <div className="timeline-container">
- <TimelineLabelsContainer/>
- <TimelineControlsContainer/>
- </div>
- </div>
- );
- }
+ render() {
+ return (
+ <div className="timeline-bar">
+ <div className="timeline-container">
+ <TimelineLabelsContainer />
+ <TimelineControlsContainer />
+ </div>
+ </div>
+ );
+ }
}
export default TimelineComponent;