diff options
| author | Georgios Andreadis <info@gandreadis.com> | 2020-07-01 13:33:31 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-08-24 19:47:17 +0200 |
| commit | de8f12d74faef5fa3f9e38d1340948cab2d06ea3 (patch) | |
| tree | 678bf1af3e5fa2334f0df43388d45294785bbf1e /frontend/src/containers/app/timeline/TimelineControlsContainer.js | |
| parent | 44236756c4cf689806dc17c6950a2cff3e9227bf (diff) | |
Manually generate IDs
Diffstat (limited to 'frontend/src/containers/app/timeline/TimelineControlsContainer.js')
| -rw-r--r-- | frontend/src/containers/app/timeline/TimelineControlsContainer.js | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/frontend/src/containers/app/timeline/TimelineControlsContainer.js b/frontend/src/containers/app/timeline/TimelineControlsContainer.js index ac851b2e..92e03e6a 100644 --- a/frontend/src/containers/app/timeline/TimelineControlsContainer.js +++ b/frontend/src/containers/app/timeline/TimelineControlsContainer.js @@ -1,36 +1,36 @@ -import { connect } from "react-redux"; -import { goToTick } from "../../../actions/simulation/tick"; -import TimelineControlsComponent from "../../../components/app/timeline/TimelineControlsComponent"; +import { connect } from 'react-redux' +import { goToTick } from '../../../actions/simulation/tick' +import TimelineControlsComponent from '../../../components/app/timeline/TimelineControlsComponent' const mapStateToProps = state => { - let sectionTicks = []; - if (state.currentExperimentId !== -1) { - const sectionIds = - state.objects.path[ - state.objects.experiment[state.currentExperimentId].pathId - ].sectionIds; - if (sectionIds) { - sectionTicks = sectionIds - .filter(sectionId => state.objects.section[sectionId].startTick !== 0) - .map(sectionId => state.objects.section[sectionId].startTick); + let sectionTicks = [] + if (state.currentExperimentId !== -1) { + const sectionIds = + state.objects.path[ + state.objects.experiment[state.currentExperimentId].pathId + ].sectionIds + if (sectionIds) { + sectionTicks = sectionIds + .filter(sectionId => state.objects.section[sectionId].startTick !== 0) + .map(sectionId => state.objects.section[sectionId].startTick) + } } - } - return { - currentTick: state.currentTick, - lastSimulatedTick: state.lastSimulatedTick, - sectionTicks - }; -}; + return { + currentTick: state.currentTick, + lastSimulatedTick: state.lastSimulatedTick, + sectionTicks, + } +} const mapDispatchToProps = dispatch => { - return { - goToTick: tick => dispatch(goToTick(tick)) - }; -}; + return { + goToTick: tick => dispatch(goToTick(tick)), + } +} const TimelineControlsContainer = connect(mapStateToProps, mapDispatchToProps)( - TimelineControlsComponent -); + TimelineControlsComponent, +) -export default TimelineControlsContainer; +export default TimelineControlsContainer |
