comparison src/app/visualisations/curve/curve.component.ts @ 376:35234006c3c3

Use module scoped id generator instead of passing in an id to components.
author Lucas Thompson <dev@lucas.im>
date Wed, 31 May 2017 12:55:03 +0100
parents 2df7b3722eb9
children 9fe6e00e0700
comparison
equal deleted inserted replaced
375:9f9d5731a941 376:35234006c3c3
11 11
12 @Component({ 12 @Component({
13 selector: 'ugly-curve', 13 selector: 'ugly-curve',
14 template: `<ugly-tracks 14 template: `<ugly-tracks
15 [timeline]="timeline" 15 [timeline]="timeline"
16 [trackIdPrefix]="id"
17 [width]="width" 16 [width]="width"
18 [onSeek]="onSeek" 17 [onSeek]="onSeek"
19 [colour]="colour" 18 [colour]="colour"
20 [tracks]="[curve]" 19 [tracks]="[curve]"
21 ></ugly-tracks>`, 20 ></ugly-tracks>`,
22 changeDetection: ChangeDetectionStrategy.OnPush 21 changeDetection: ChangeDetectionStrategy.OnPush
23 }) 22 })
24 export class CurveComponent { 23 export class CurveComponent {
25 @Input() id: string; // TODO refactor WaveComponents to have own Timeline, sharing a TimeContext 24 @Input() timeline: Timeline; // TODO refactor WaveComponents to have own Timeline, sharing a TimeContext
26 @Input() timeline: Timeline; // TODO as above
27 @Input() onSeek: OnSeekHandler; 25 @Input() onSeek: OnSeekHandler;
28 @Input() width: number; 26 @Input() width: number;
29 @Input() curve: VectorFeature; 27 @Input() curve: VectorFeature;
30 @Input() colour: string; 28 @Input() colour: string;
31 } 29 }