diff src/app/analysis-item/analysis-item.component.ts @ 381:b220ed78a250

Rig up instants and add dynamic colour selection to feature components. Structure of a derived WaveComponent is now pretty clear, some refactoring is in order.
author Lucas Thompson <dev@lucas.im>
date Wed, 31 May 2017 17:09:36 +0100
parents 9fe6e00e0700
children 3eab26a629e1
line wrap: on
line diff
--- a/src/app/analysis-item/analysis-item.component.ts	Wed May 31 15:15:55 2017 +0100
+++ b/src/app/analysis-item/analysis-item.component.ts	Wed May 31 17:09:36 2017 +0100
@@ -10,6 +10,7 @@
 import {naivePagingMapper} from '../visualisations/WavesJunk';
 import {OnSeekHandler, TimePixelMapper} from '../playhead/PlayHeadHelpers';
 import {
+  defaultColourGenerator,
   HigherLevelFeatureShape,
   KnownShapedFeature
 } from '../visualisations/FeatureUtilities';
@@ -109,4 +110,8 @@
     return !isPendingRootAudioItem(this.item) &&
     isAnalysisItem(this.item) ? this.item.shape : null;
   }
+
+  getNextColour(): string {
+    return defaultColourGenerator.next().value;
+  }
 }