summaryrefslogtreecommitdiff
path: root/animism-align/frontend/views/align/components/timeline/waveform.component.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-07-05 17:02:39 +0200
committerJules Laplace <julescarbon@gmail.com>2020-07-05 17:02:39 +0200
commit3e5bc2f5581890f2d7d9f679ab5171c0637ff460 (patch)
treefc88ac2387974ba0bd8377957732fdf697cef961 /animism-align/frontend/views/align/components/timeline/waveform.component.js
parentbc1515b965e02641cab2a984410a3cb5cfae891c (diff)
notion of selected annotation
Diffstat (limited to 'animism-align/frontend/views/align/components/timeline/waveform.component.js')
-rw-r--r--animism-align/frontend/views/align/components/timeline/waveform.component.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/animism-align/frontend/views/align/components/timeline/waveform.component.js b/animism-align/frontend/views/align/components/timeline/waveform.component.js
index 0a118cf..785b020 100644
--- a/animism-align/frontend/views/align/components/timeline/waveform.component.js
+++ b/animism-align/frontend/views/align/components/timeline/waveform.component.js
@@ -48,8 +48,8 @@ class Waveform extends Component {
let widthTimeDuration = h * secondsPerPixel // secs per pixel
- let timeMin = start_ts
- let timeMax = Math.min(start_ts + widthTimeDuration, duration)
+ let timeMin = Math.round(start_ts / secondsPerPixel) * secondsPerPixel
+ let timeMax = Math.min(timeMin + widthTimeDuration, duration)
let timeWidth = timeMax - timeMin
let stepMin = Math.floor(timeMin * 10)