summaryrefslogtreecommitdiff
path: root/animism-align/frontend/views/align/components/timeline.component.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-06-30 16:32:37 +0200
committerJules Laplace <julescarbon@gmail.com>2020-06-30 16:32:37 +0200
commitb6378770cd30a03e9db0ce8b81670411087c998f (patch)
treeb109b2f6d9b1b14f7e6feced576d08be38dafaac /animism-align/frontend/views/align/components/timeline.component.js
parent534c90317badaadf341c8eb229d51d733d72fcee (diff)
vertical timeline
Diffstat (limited to 'animism-align/frontend/views/align/components/timeline.component.js')
-rw-r--r--animism-align/frontend/views/align/components/timeline.component.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/animism-align/frontend/views/align/components/timeline.component.js b/animism-align/frontend/views/align/components/timeline.component.js
index a1dad4c..eb851b7 100644
--- a/animism-align/frontend/views/align/components/timeline.component.js
+++ b/animism-align/frontend/views/align/components/timeline.component.js
@@ -42,7 +42,8 @@ class Timeline extends Component {
let secondsPerPixel = ZOOM_STEPS[zoom] * 0.1 // 0.1 sec / step
let widthTimeDuration = window.innerWidth * secondsPerPixel // secs per pixel
- start_ts = clamp(start_ts + e.deltaY * ZOOM_STEPS[zoom], 0, duration - widthTimeDuration / 2)
+ start_ts = clamp(start_ts + e.deltaY * ZOOM_STEPS[zoom], 0, Math.max(0, duration - widthTimeDuration / 2))
+ console.log(start_ts)
actions.align.setScrollPosition(start_ts)
}
render() {