Mercurial > hg > ugly-duckling
annotate src/app/visualisations/curve/curve.component.ts @ 389:29b817e49a22
Introduce interface VerticallyBounded, which describes a component with a vertical range and the ability to render a scale on itself. VerticallyBoundedWavesComponent partially implements this interface, in that it adds a ScaleLayer to itself - derived instances provide the means of obtaining the scale.
author | Lucas Thompson <dev@lucas.im> |
---|---|
date | Thu, 01 Jun 2017 10:04:41 +0100 |
parents | 9fe6e00e0700 |
children | 26ca17e67364 |
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@372 | 14 template: `<ugly-tracks |
dev@372 | 15 [timeline]="timeline" |
dev@372 | 16 [width]="width" |
dev@372 | 17 [onSeek]="onSeek" |
dev@372 | 18 [colour]="colour" |
dev@372 | 19 [tracks]="[curve]" |
dev@372 | 20 ></ugly-tracks>`, |
dev@359 | 21 changeDetection: ChangeDetectionStrategy.OnPush |
dev@359 | 22 }) |
dev@372 | 23 export class CurveComponent { |
dev@376 | 24 @Input() timeline: Timeline; // TODO refactor WaveComponents to have own Timeline, sharing a TimeContext |
dev@372 | 25 @Input() onSeek: OnSeekHandler; |
dev@372 | 26 @Input() width: number; |
dev@372 | 27 @Input() curve: VectorFeature; |
dev@368 | 28 @Input() colour: string; |
dev@359 | 29 } |