changeset 415:95d1f10129a3

Update cross-hair position to the current time on initial render.
author Lucas Thompson <dev@lucas.im>
date Mon, 05 Jun 2017 14:56:58 +0100
parents 0329495fd822
children 2dbe167a95fd
files src/app/visualisations/cross-hair-inspector.component.ts
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/app/visualisations/cross-hair-inspector.component.ts	Mon Jun 05 14:34:03 2017 +0100
+++ b/src/app/visualisations/cross-hair-inspector.component.ts	Mon Jun 05 14:56:58 2017 +0100
@@ -17,6 +17,7 @@
   RenderLoopService,
   TaskRemover
 } from '../services/render-loop/render-loop.service';
+import {AudioPlayerService} from '../services/audio-player/audio-player.service';
 
 @Component({
   selector: 'ugly-cross-hair-inspector',
@@ -43,7 +44,8 @@
   private removers: TaskRemover[];
   private mIsAnimated: boolean;
 
-  constructor(private renderLoop: RenderLoopService) {
+  constructor(private renderLoop: RenderLoopService,
+              private player: AudioPlayerService) {
     super();
     this.removers = [];
   }
@@ -52,6 +54,7 @@
     super.ngAfterViewInit();
     this.inspectorRenderers.forEach(renderer => {
       renderer.renderInspector(this.cachedRange, this.unit);
+      renderer.updatePosition(this.player.getCurrentTime());
     });
     this.addTasks();
   }