summaryrefslogtreecommitdiff
path: root/frontend/src/components/app/timeline/TimelineControlsComponent.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/components/app/timeline/TimelineControlsComponent.js')
-rw-r--r--frontend/src/components/app/timeline/TimelineControlsComponent.js36
1 files changed, 0 insertions, 36 deletions
diff --git a/frontend/src/components/app/timeline/TimelineControlsComponent.js b/frontend/src/components/app/timeline/TimelineControlsComponent.js
deleted file mode 100644
index 01911aff..00000000
--- a/frontend/src/components/app/timeline/TimelineControlsComponent.js
+++ /dev/null
@@ -1,36 +0,0 @@
-import React from 'react'
-import PlayButtonContainer from '../../../containers/app/timeline/PlayButtonContainer'
-import { convertTickToPercentage } from '../../../util/timeline'
-
-class TimelineControlsComponent extends React.Component {
- onTimelineClick(e) {
- const percentage = e.nativeEvent.offsetX / this.timeline.clientWidth
- const tick = Math.floor(percentage * (this.props.lastSimulatedTick + 1))
- this.props.goToTick(tick)
- }
-
- render() {
- return (
- <div className="timeline-controls">
- <PlayButtonContainer/>
- <div
- className="timeline"
- ref={timeline => (this.timeline = timeline)}
- onClick={this.onTimelineClick.bind(this)}
- >
- <div
- className="time-marker"
- style={{
- left: convertTickToPercentage(
- this.props.currentTick,
- this.props.lastSimulatedTick,
- ),
- }}
- />
- </div>
- </div>
- )
- }
-}
-
-export default TimelineControlsComponent