comparison src/app/waveform/waveform.component.ts @ 66:1b8dec9f6fe6

Fix region rendering bug caused by a negative height. Waves-ui calculates the height of a shape relative to the y-domain boundaries of the layer.
author Lucas Thompson <dev@lucas.im>
date Mon, 12 Dec 2016 16:40:26 +0000
parents 270f59ef3b83
children 7c34938470fb
comparison
equal deleted inserted replaced
65:57980a1a579d 66:1b8dec9f6fe6
240 featureData.map(feature => { 240 featureData.map(feature => {
241 return { 241 return {
242 x: toSeconds(feature.timestamp), 242 x: toSeconds(feature.timestamp),
243 y: feature.featureValues[0], 243 y: feature.featureValues[0],
244 width: toSeconds(feature.duration), 244 width: toSeconds(feature.duration),
245 height: 0.05 * max, 245 height: min + 0.05 * max,
246 color: colour, 246 color: colour,
247 opacity: 0.8 247 opacity: 0.8
248 } 248 }
249 }), 249 }),
250 {yDomain: [min, max + 0.05 * max], height: height} as any 250 {yDomain: [min, max + 0.05 * max], height: height} as any