comparison src/app/visualisations/notes/notes.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 3ace7672638b
children ab43880f1cd5
comparison
equal deleted inserted replaced
487:f2bb5ddae867 488:64ed45a0bad3
1 /** 1 /**
2 * Created by lucast on 31/05/2017. 2 * Created by lucast on 31/05/2017.
3 */ 3 */
4 import { 4 import {
5 InspectableVerticallyBoundedComponent, 5 InspectableVerticallyBoundedComponent,
6 PlayheadRenderer,
6 VerticallyBounded, 7 VerticallyBounded,
7 VerticalScaleRenderer, 8 VerticalScaleRenderer,
8 VerticalValueInspectorRenderer, 9 VerticalValueInspectorRenderer,
9 WavesComponent 10 WavesComponent
10 } from '../waves-base.component'; 11 } from '../waves-base.component';
23 changeDetection: ChangeDetectionStrategy.OnPush, 24 changeDetection: ChangeDetectionStrategy.OnPush,
24 providers: [ 25 providers: [
25 { provide: VerticallyBounded, useExisting: NotesComponent }, 26 { provide: VerticallyBounded, useExisting: NotesComponent },
26 { provide: VerticalScaleRenderer, useExisting: NotesComponent }, 27 { provide: VerticalScaleRenderer, useExisting: NotesComponent },
27 {provide: VerticalValueInspectorRenderer, useExisting: NotesComponent }, 28 {provide: VerticalValueInspectorRenderer, useExisting: NotesComponent },
29 {provide: PlayheadRenderer, useExisting: NotesComponent},
28 {provide: WavesComponent, useExisting: NotesComponent} 30 {provide: WavesComponent, useExisting: NotesComponent}
29 ] 31 ]
30 }) 32 })
31 export class NotesComponent extends InspectableVerticallyBoundedComponent<Note[]> { 33 export class NotesComponent extends InspectableVerticallyBoundedComponent<Note[]> {
32 private currentVerticalRange: [number, number]; 34 private currentVerticalRange: [number, number];