Mercurial > hg > ugly-duckling
diff src/app/waveform/waveform.component.ts @ 152:1c6ef6170056
Add labels & shading in instants layer
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Tue, 21 Mar 2017 16:40:05 +0000 |
parents | 38abcb4830f1 |
children | 28cb8530300b |
line wrap: on
line diff
--- a/src/app/waveform/waveform.component.ts Tue Mar 21 13:13:06 2017 +0000 +++ b/src/app/waveform/waveform.component.ts Tue Mar 21 16:40:05 2017 +0000 @@ -448,11 +448,16 @@ // TODO refactor, this is incomprehensible if (isMarker) { const plotData = featureData.map(feature => { - return {time: toSeconds(feature.timestamp)} + return { + time: toSeconds(feature.timestamp), + label: feature.label + } }); let featureLayer = new wavesUI.helpers.TickLayer(plotData, { height: height, color: colour, + labelPosition: 'bottom', + shadeSegments: true }); this.addLayer( featureLayer,