summaryrefslogtreecommitdiff
path: root/src/components/timeline/TimelineComponent.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-22 08:48:38 +0200
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-23 10:06:06 +0200
commit3bf073f46e74667df4d2be9488a9f8f44ac84421 (patch)
tree75731c952d6965cf5075b03f504193936348780f /src/components/timeline/TimelineComponent.js
parentd6455f1c9e57934b76ce95b3fb204072300a1991 (diff)
Make timeline clickable
Diffstat (limited to 'src/components/timeline/TimelineComponent.js')
-rw-r--r--src/components/timeline/TimelineComponent.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/components/timeline/TimelineComponent.js b/src/components/timeline/TimelineComponent.js
index b400a378..119c396b 100644
--- a/src/components/timeline/TimelineComponent.js
+++ b/src/components/timeline/TimelineComponent.js
@@ -11,15 +11,9 @@ class TimelineComponent extends React.Component {
}
if (this.props.currentTick < this.props.lastSimulatedTick) {
- for (let i in this.props.sections.reverse()) {
- if (this.props.currentTick + 1 >= this.props.sections[i].startTick) {
- if (this.props.currentDatacenterId !== this.props.sections[i].datacenterId) {
- this.props.setCurrentDatacenter(this.props.sections[i].datacenterId);
- }
- break;
- }
- }
this.props.incrementTick();
+ } else {
+ this.props.pauseSimulation();
}
}, 1000);
}