summaryrefslogtreecommitdiff
path: root/src/containers/timeline
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/containers/timeline
parentd6455f1c9e57934b76ce95b3fb204072300a1991 (diff)
Make timeline clickable
Diffstat (limited to 'src/containers/timeline')
-rw-r--r--src/containers/timeline/TimelineContainer.js2
-rw-r--r--src/containers/timeline/TimelineControlsContainer.js10
2 files changed, 11 insertions, 1 deletions
diff --git a/src/containers/timeline/TimelineContainer.js b/src/containers/timeline/TimelineContainer.js
index 32756b6d..d52d5477 100644
--- a/src/containers/timeline/TimelineContainer.js
+++ b/src/containers/timeline/TimelineContainer.js
@@ -1,4 +1,5 @@
import {connect} from "react-redux";
+import {pauseSimulation} from "../../actions/simulation/playback";
import {incrementTick} from "../../actions/simulation/tick";
import {setCurrentDatacenter} from "../../actions/topology/building";
import TimelineComponent from "../../components/timeline/TimelineComponent";
@@ -25,6 +26,7 @@ const mapStateToProps = state => {
const mapDispatchToProps = dispatch => {
return {
incrementTick: () => dispatch(incrementTick()),
+ pauseSimulation: () => dispatch(pauseSimulation()),
setCurrentDatacenter: id => dispatch(setCurrentDatacenter(id))
};
};
diff --git a/src/containers/timeline/TimelineControlsContainer.js b/src/containers/timeline/TimelineControlsContainer.js
index 16d44052..e7f27fbf 100644
--- a/src/containers/timeline/TimelineControlsContainer.js
+++ b/src/containers/timeline/TimelineControlsContainer.js
@@ -1,4 +1,5 @@
import {connect} from "react-redux";
+import {goToTick} from "../../actions/simulation/tick";
import TimelineControlsComponent from "../../components/timeline/TimelineControlsComponent";
const mapStateToProps = state => {
@@ -19,8 +20,15 @@ const mapStateToProps = state => {
};
};
+const mapDispatchToProps = dispatch => {
+ return {
+ goToTick: (tick) => dispatch(goToTick(tick)),
+ };
+};
+
const TimelineControlsContainer = connect(
- mapStateToProps
+ mapStateToProps,
+ mapDispatchToProps
)(TimelineControlsComponent);
export default TimelineControlsContainer;