changeset 149:38abcb4830f1

Use tick layer instead of marker layer for instants (it's faster)
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 20 Mar 2017 15:25:54 +0000
parents 81b83ed94831
children 384b17a32c7a
files src/app/waveform/waveform.component.ts
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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 = () => {