# HG changeset patch # User Chris Cannam # Date 1490023554 0 # Node ID 38abcb4830f1e4c13b763e2160a155324b914d70 # Parent 81b83ed94831ad283ac0e469a17900fe0f6846e1 Use tick layer instead of marker layer for instants (it's faster) diff -r 81b83ed94831 -r 38abcb4830f1 src/app/waveform/waveform.component.ts --- a/src/app/waveform/waveform.component.ts Mon Mar 20 14:12:33 2017 +0000 +++ b/src/app/waveform/waveform.component.ts Mon Mar 20 15:25:54 2017 +0000 @@ -442,21 +442,25 @@ && featureData[0].featureValues == null; const isRegion = hasDuration && featureData[0].timestamp != null; + console.log("Have list features: length " + featureData.length + + ", isMarker " + isMarker + ", isRegion " + isRegion + + ", hasDuration " + hasDuration); // TODO refactor, this is incomprehensible if (isMarker) { const plotData = featureData.map(feature => { - return {x: toSeconds(feature.timestamp)} + return {time: toSeconds(feature.timestamp)} }); - let markerLayer = new wavesUI.helpers.MarkerLayer(plotData, { + let featureLayer = new wavesUI.helpers.TickLayer(plotData, { height: height, color: colour, }); this.addLayer( - markerLayer, + featureLayer, waveTrack, this.timeline.timeContext ); } else if (isRegion) { + console.log("Output is of region type"); const binCount = outputDescriptor.configured.binCount || 0; const isBarRegion = featureData[0].featureValues.length >= 1 || binCount >= 1 ; const getSegmentArgs = () => {