summaryrefslogtreecommitdiff
path: root/animism-align/frontend/views/align/containers/timeline.container.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-07-05 17:17:59 +0200
committerJules Laplace <julescarbon@gmail.com>2020-07-05 17:17:59 +0200
commit349ee65db67aa0d28d3861530e8e7e1b5cc27c48 (patch)
tree0d2703eb7f2c844e5ae2b4103cae664f6871ee88 /animism-align/frontend/views/align/containers/timeline.container.js
parent9ceecc1561fbd7d8d704b2f491957eebdb202ab7 (diff)
selected paragraph actions
Diffstat (limited to 'animism-align/frontend/views/align/containers/timeline.container.js')
-rw-r--r--animism-align/frontend/views/align/containers/timeline.container.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/animism-align/frontend/views/align/containers/timeline.container.js b/animism-align/frontend/views/align/containers/timeline.container.js
index 591af03..760da82 100644
--- a/animism-align/frontend/views/align/containers/timeline.container.js
+++ b/animism-align/frontend/views/align/containers/timeline.container.js
@@ -23,7 +23,8 @@ class Timeline extends Component {
this.handleKeydown = this.handleKeydown.bind(this)
this.handleMouseMove = this.handleMouseMove.bind(this)
this.handleWheel = this.handleWheel.bind(this)
- this.handleClick = this.handleClick.bind(this)
+ this.handleContainerClick = this.handleContainerClick.bind(this)
+ this.handleTimelineClick = this.handleTimelineClick.bind(this)
}
componentDidMount() {
this.bind()
@@ -103,7 +104,11 @@ class Timeline extends Component {
const cursor_ts = positionToTime(e.pageY, this.props.timeline)
actions.align.setCursor(cursor_ts)
}
- handleClick(e) {
+ handleContainerClick(e) {
+ console.log('container click')
+ actions.align.clearSelectedAnnotation()
+ }
+ handleTimelineClick(e) {
const play_ts = positionToTime(e.pageY, this.props.timeline)
if (e.pageX < WAVEFORM_SIZE * 0.67) {
actions.audio.seek(play_ts)
@@ -115,11 +120,12 @@ class Timeline extends Component {
return (
<div
className='timeline'
+ onClick={this.handleContainerClick}
onWheel={this.handleWheel}
onMouseMove={this.handleMouseMove}
>
<div className='timelineColumn'>
- <Waveform onClick={this.handleClick} />
+ <Waveform onClick={this.handleTimelineClick} />
<Ticks timeline={this.props.timeline} />
<Cursor timeline={this.props.timeline} annotation={this.props.annotation} />
</div>