changeset 379:a3b45218c311

Move colour prop to base class
author Lucas Thompson <dev@lucas.im>
date Wed, 31 May 2017 14:49:46 +0100
parents 9fe6e00e0700
children b81ed55fdee3
files src/app/analysis-item/analysis-item.component.html src/app/visualisations/tracks/tracks.components.ts src/app/visualisations/waveform/waveform.component.ts src/app/visualisations/waves-base.component.ts
diffstat 4 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/app/analysis-item/analysis-item.component.html	Wed May 31 13:59:29 2017 +0100
+++ b/src/app/analysis-item/analysis-item.component.html	Wed May 31 14:49:46 2017 +0100
@@ -19,11 +19,13 @@
           >
           </ugly-live-play-head>
         </ng-template>
-        <ugly-waveform *ngIf="isAudioItem(); else notAudio"
+        <ugly-waveform
+          *ngIf="isAudioItem(); else notAudio"
           [timeline]="timeline"
           [width]="contentWidth"
           [audioBuffer]="item.audioData"
           [onSeek]="onSeek"
+          [colour]="'#0868ac'"
         ></ugly-waveform>
 
         <ng-template #notAudio>
--- a/src/app/visualisations/tracks/tracks.components.ts	Wed May 31 13:59:29 2017 +0100
+++ b/src/app/visualisations/tracks/tracks.components.ts	Wed May 31 14:49:46 2017 +0100
@@ -33,7 +33,6 @@
     this.currentState = generatePlotData(input);
     this.update();
   }
-  @Input() colour: string;
 
   get tracks(): TracksFeature {
     return this.mFeature;
--- a/src/app/visualisations/waveform/waveform.component.ts	Wed May 31 13:59:29 2017 +0100
+++ b/src/app/visualisations/waveform/waveform.component.ts	Wed May 31 14:49:46 2017 +0100
@@ -56,7 +56,7 @@
       const waveformLayer = new wavesUI.helpers.WaveformLayer(buffer, {
         top: (height - totalWaveHeight) / 2 + waveHeight * ch,
         height: waveHeight,
-        color: '#0868ac',
+        color: this.colour,
         channel: ch
       });
       this.addLayer(waveformLayer, this.waveTrack, this.timeline.timeContext);
--- a/src/app/visualisations/waves-base.component.ts	Wed May 31 13:59:29 2017 +0100
+++ b/src/app/visualisations/waves-base.component.ts	Wed May 31 14:49:46 2017 +0100
@@ -20,6 +20,7 @@
   }
   @Input() timeline: Timeline;
   @Input() onSeek: OnSeekHandler;
+  @Input() colour: string;
 
   protected layers: Layer[];
   protected zoomOnMouseDown: number;