Mercurial > hg > ugly-duckling
comparison src/app/visualisations/waveform/waveform.component.ts @ 488:64ed45a0bad3
Introduce PlayheadRenderer, implement in the waves base. Make VerticallyBounded and VerticalScaleRenderer generic and remove bin equivalents. Forward calls for a PlayheadRenderer from VerticalScaleComponent on to its children. Also update other components accordingly.
author | Lucas Thompson <dev@lucas.im> |
---|---|
date | Wed, 05 Jul 2017 18:42:12 +0100 |
parents | 0329495fd822 |
children |
comparison
equal
deleted
inserted
replaced
487:f2bb5ddae867 | 488:64ed45a0bad3 |
---|---|
2 Component, | 2 Component, |
3 Input, | 3 Input, |
4 ChangeDetectionStrategy | 4 ChangeDetectionStrategy |
5 } from '@angular/core'; | 5 } from '@angular/core'; |
6 import wavesUI from 'waves-ui-piper'; | 6 import wavesUI from 'waves-ui-piper'; |
7 import {WavesComponent} from '../waves-base.component'; | 7 import {PlayheadRenderer, WavesComponent} from '../waves-base.component'; |
8 | 8 |
9 | 9 |
10 @Component({ | 10 @Component({ |
11 selector: 'ugly-waveform', | 11 selector: 'ugly-waveform', |
12 templateUrl: '../waves-template.html', | 12 templateUrl: '../waves-template.html', |
13 styleUrls: ['../waves-template.css'], | 13 styleUrls: ['../waves-template.css'], |
14 changeDetection: ChangeDetectionStrategy.OnPush, | 14 changeDetection: ChangeDetectionStrategy.OnPush, |
15 providers: [ | 15 providers: [ |
16 {provide: PlayheadRenderer, useExisting: WaveformComponent }, | |
16 {provide: WavesComponent, useExisting: WaveformComponent} | 17 {provide: WavesComponent, useExisting: WaveformComponent} |
17 ] | 18 ] |
18 }) | 19 }) |
19 export class WaveformComponent extends WavesComponent<AudioBuffer> { | 20 export class WaveformComponent extends WavesComponent<AudioBuffer> { |
20 @Input() set audioBuffer(buffer: AudioBuffer) { | 21 @Input() set audioBuffer(buffer: AudioBuffer) { |