Mercurial > hg > ugly-duckling
annotate src/app/visualisations/curve/curve.component.ts @ 390:26ca17e67364
Implement VerticallyBoundedWavesComponent for tracks, notes. Wrap curves in a vertical-scale component, and use scales by default for supported components dynamically instantiated in analysis-item.
author | Lucas Thompson <dev@lucas.im> |
---|---|
date | Thu, 01 Jun 2017 10:06:31 +0100 |
parents | 9fe6e00e0700 |
children | a02e6ec4a9d2 |
rev | line source |
---|---|
dev@359 | 1 /** |
dev@359 | 2 * Created by lucas on 30/05/2017. |
dev@359 | 3 */ |
dev@366 | 4 import { |
dev@366 | 5 ChangeDetectionStrategy, |
dev@366 | 6 Component, |
dev@372 | 7 Input |
dev@378 | 8 } from '@angular/core'; |
dev@378 | 9 import {OnSeekHandler} from '../../playhead/PlayHeadHelpers'; |
dev@378 | 10 import {VectorFeature} from 'piper/HigherLevelUtilities'; |
dev@359 | 11 |
dev@359 | 12 @Component({ |
dev@359 | 13 selector: 'ugly-curve', |
dev@390 | 14 template: `<ugly-vertical-scale> |
dev@390 | 15 <ugly-tracks |
dev@390 | 16 [timeline]="timeline" |
dev@390 | 17 [width]="width" |
dev@390 | 18 [onSeek]="onSeek" |
dev@390 | 19 [colour]="colour" |
dev@390 | 20 [tracks]="[curve]" |
dev@390 | 21 ></ugly-tracks> |
dev@390 | 22 </ugly-vertical-scale>`, |
dev@359 | 23 changeDetection: ChangeDetectionStrategy.OnPush |
dev@359 | 24 }) |
dev@372 | 25 export class CurveComponent { |
dev@376 | 26 @Input() timeline: Timeline; // TODO refactor WaveComponents to have own Timeline, sharing a TimeContext |
dev@372 | 27 @Input() onSeek: OnSeekHandler; |
dev@372 | 28 @Input() width: number; |
dev@372 | 29 @Input() curve: VectorFeature; |
dev@368 | 30 @Input() colour: string; |
dev@359 | 31 } |