summaryrefslogtreecommitdiff
path: root/animism-align/frontend/views/align/containers/timeline.container.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-07-06 17:57:25 +0200
committerJules Laplace <julescarbon@gmail.com>2020-07-06 17:57:25 +0200
commit6f5ff3cdfac3fc154281fdda7c1ec9ff7ebbd1fa (patch)
tree9a51dd4b32edf3b1bc8c24d95273575dab774d34 /animism-align/frontend/views/align/containers/timeline.container.js
parent349ee65db67aa0d28d3861530e8e7e1b5cc27c48 (diff)
paragraph list view
Diffstat (limited to 'animism-align/frontend/views/align/containers/timeline.container.js')
-rw-r--r--animism-align/frontend/views/align/containers/timeline.container.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/animism-align/frontend/views/align/containers/timeline.container.js b/animism-align/frontend/views/align/containers/timeline.container.js
index 760da82..ba6b7e0 100644
--- a/animism-align/frontend/views/align/containers/timeline.container.js
+++ b/animism-align/frontend/views/align/containers/timeline.container.js
@@ -10,10 +10,10 @@ import Annotations from '../containers/annotations.container'
import Waveform from '../components/timeline/waveform.component'
import Ticks from '../components/timeline/ticks.component'
import Cursor from '../components/timeline/cursor.component'
-import PlayButton from '../components/timeline/playButton.component'
+import PlayButton from '../components/player/playButton.component'
import PlayCursor from '../components/timeline/playCursor.component'
-import { WAVEFORM_SIZE, ZOOM_STEPS } from '../constants'
+import { WAVEFORM_SIZE, ZOOM_STEPS, INNER_HEIGHT } from '../constants'
import { clamp } from '../../../util'
import { positionToTime } from '../align.util'
@@ -84,7 +84,7 @@ class Timeline extends Component {
let { start_ts, zoom, duration } = this.props.timeline
let { deltaY } = e
let secondsPerPixel = ZOOM_STEPS[zoom] * 0.1 // 0.1 sec / step
- let widthTimeDuration = window.innerHeight * secondsPerPixel // secs per pixel
+ let widthTimeDuration = INNER_HEIGHT * secondsPerPixel // secs per pixel
start_ts += Math.round((deltaY / 8) * ZOOM_STEPS[zoom])
start_ts = clamp(start_ts, 0, Math.max(0, duration - widthTimeDuration / 2))
if (e.shiftKey) {
@@ -105,8 +105,8 @@ class Timeline extends Component {
actions.align.setCursor(cursor_ts)
}
handleContainerClick(e) {
- console.log('container click')
actions.align.clearSelectedAnnotation()
+ actions.align.clearSelectedParagraph()
}
handleTimelineClick(e) {
const play_ts = positionToTime(e.pageY, this.props.timeline)
@@ -131,7 +131,6 @@ class Timeline extends Component {
</div>
<Annotations timeline={this.props.timeline} />
<PlayCursor />
- <PlayButton />
</div>
)
}