Mercurial > hg > ugly-duckling
comparison 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 |
comparison
equal
deleted
inserted
replaced
389:29b817e49a22 | 390:26ca17e67364 |
---|---|
9 import {OnSeekHandler} from '../../playhead/PlayHeadHelpers'; | 9 import {OnSeekHandler} from '../../playhead/PlayHeadHelpers'; |
10 import {VectorFeature} from 'piper/HigherLevelUtilities'; | 10 import {VectorFeature} from 'piper/HigherLevelUtilities'; |
11 | 11 |
12 @Component({ | 12 @Component({ |
13 selector: 'ugly-curve', | 13 selector: 'ugly-curve', |
14 template: `<ugly-tracks | 14 template: `<ugly-vertical-scale> |
15 [timeline]="timeline" | 15 <ugly-tracks |
16 [width]="width" | 16 [timeline]="timeline" |
17 [onSeek]="onSeek" | 17 [width]="width" |
18 [colour]="colour" | 18 [onSeek]="onSeek" |
19 [tracks]="[curve]" | 19 [colour]="colour" |
20 ></ugly-tracks>`, | 20 [tracks]="[curve]" |
21 ></ugly-tracks> | |
22 </ugly-vertical-scale>`, | |
21 changeDetection: ChangeDetectionStrategy.OnPush | 23 changeDetection: ChangeDetectionStrategy.OnPush |
22 }) | 24 }) |
23 export class CurveComponent { | 25 export class CurveComponent { |
24 @Input() timeline: Timeline; // TODO refactor WaveComponents to have own Timeline, sharing a TimeContext | 26 @Input() timeline: Timeline; // TODO refactor WaveComponents to have own Timeline, sharing a TimeContext |
25 @Input() onSeek: OnSeekHandler; | 27 @Input() onSeek: OnSeekHandler; |