Mercurial > hg > ugly-duckling
view 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 |
line wrap: on
line source
/** * Created by lucas on 30/05/2017. */ import { ChangeDetectionStrategy, Component, Input } from "@angular/core"; import {OnSeekHandler} from "../../playhead/PlayHeadHelpers"; import {VectorFeature} from "piper/HigherLevelUtilities"; @Component({ selector: 'ugly-curve', template: `<ugly-tracks [timeline]="timeline" [width]="width" [onSeek]="onSeek" [colour]="colour" [tracks]="[curve]" ></ugly-tracks>`, changeDetection: ChangeDetectionStrategy.OnPush }) export class CurveComponent { @Input() timeline: Timeline; // TODO refactor WaveComponents to have own Timeline, sharing a TimeContext @Input() onSeek: OnSeekHandler; @Input() width: number; @Input() curve: VectorFeature; @Input() colour: string; }