comparison src/app/visualisations/curve/curve.component.ts @ 412:89674c064cda

Set duration on the LayerTimeContext to the length of the underlying audio file.
author Lucas Thompson <dev@lucas.im>
date Mon, 05 Jun 2017 14:25:54 +0100
parents 3ace7672638b
children 64ed45a0bad3
comparison
equal deleted inserted replaced
411:7e6b9b557179 412:89674c064cda
24 [timeline]="timeline" 24 [timeline]="timeline"
25 [width]="width" 25 [width]="width"
26 [onSeek]="onSeek" 26 [onSeek]="onSeek"
27 [colour]="colour" 27 [colour]="colour"
28 [tracks]="[curve]" 28 [tracks]="[curve]"
29 [duration]="duration"
29 ></ugly-tracks>`, 30 ></ugly-tracks>`,
30 changeDetection: ChangeDetectionStrategy.OnPush, 31 changeDetection: ChangeDetectionStrategy.OnPush,
31 providers: [ 32 providers: [
32 {provide: VerticallyBounded, useExisting: CurveComponent }, 33 {provide: VerticallyBounded, useExisting: CurveComponent },
33 {provide: VerticalScaleRenderer, useExisting: CurveComponent}, 34 {provide: VerticalScaleRenderer, useExisting: CurveComponent},
39 @Input() timeline: Timeline; // TODO refactor WaveComponents to have own Timeline, sharing a TimeContext 40 @Input() timeline: Timeline; // TODO refactor WaveComponents to have own Timeline, sharing a TimeContext
40 @Input() onSeek: OnSeekHandler; 41 @Input() onSeek: OnSeekHandler;
41 @Input() width: number; 42 @Input() width: number;
42 @Input() curve: VectorFeature; 43 @Input() curve: VectorFeature;
43 @Input() colour: string; 44 @Input() colour: string;
45 @Input() duration: number;
44 @ViewChild(TracksComponent) tracksComponent: TracksComponent; 46 @ViewChild(TracksComponent) tracksComponent: TracksComponent;
45 47
46 renderInspector(range: [number, number], unit?: string): void { 48 renderInspector(range: [number, number], unit?: string): void {
47 this.tracksComponent.renderInspector(range, unit); 49 this.tracksComponent.renderInspector(range, unit);
48 } 50 }