Mercurial > hg > ugly-duckling
diff src/app/waveform/waveform.component.ts @ 34:35350929f23b
Only update all layers when paging, safari freaks out otherwise - probably better this way regardless.
author | Lucas Thompson <dev@lucas.im> |
---|---|
date | Wed, 30 Nov 2016 14:12:14 +0000 |
parents | 7e155ee93db3 |
children | e58fb181a11d |
line wrap: on
line diff
--- a/src/app/waveform/waveform.component.ts Wed Nov 30 11:41:28 2016 +0000 +++ b/src/app/waveform/waveform.component.ts Wed Nov 30 14:12:14 2016 +0000 @@ -78,11 +78,14 @@ const updateSeekingCursor = () => { cursorLayer.currentPosition = this.audioService.getCurrentTime(); cursorLayer.update(); - if (timeline.timeContext.offset + this.audioService.getCurrentTime() >= timeline.timeContext.visibleDuration) + if (timeline.timeContext.offset + this.audioService.getCurrentTime() >= timeline.timeContext.visibleDuration) { timeline.timeContext.offset -= timeline.timeContext.visibleDuration; - if (-this.audioService.getCurrentTime() > timeline.timeContext.offset) + timeline.tracks.update(); + } + if (-this.audioService.getCurrentTime() > timeline.timeContext.offset) { timeline.timeContext.offset += timeline.timeContext.visibleDuration; - timeline.tracks.update(); + timeline.tracks.update(); + } requestAnimationFrame(updateSeekingCursor); }; updateSeekingCursor();