Mercurial > hg > ugly-duckling
view 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 |
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; }