Mercurial > hg > ugly-duckling
view 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 |
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-vertical-scale> <ugly-tracks [timeline]="timeline" [width]="width" [onSeek]="onSeek" [colour]="colour" [tracks]="[curve]" ></ugly-tracks> </ugly-vertical-scale>`, 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; }