comparison src/app/waveform/waveform.component.ts @ 342:b5f2ee789fb3

Merge branch 'master' of github.com:piper-audio/ugly-duckling
author Lucas Thompson <dev@lucas.im>
date Tue, 23 May 2017 10:25:54 +0100
parents 684619d3fad5 46435d5208e9
children 8bfd9586c78a
comparison
equal deleted inserted replaced
341:684619d3fad5 342:b5f2ee789fb3
684 lineLayer.duration = duration; 684 lineLayer.duration = duration;
685 685
686 return lineLayer; 686 return lineLayer;
687 }); 687 });
688 688
689 this.addScaleAndHighlight(waveTrack, lineLayers, unit, colour, min, max);
690 }
691
692 private addScaleAndHighlight(waveTrack,
693 lineLayers,
694 unit: string,
695 colour: Colour,
696 min: number,
697 max: number) {
698
699 const height = this.trackDiv.nativeElement.getBoundingClientRect().height;
700
689 // And a single scale layer at left 701 // And a single scale layer at left
690 // !!! todo: unit in scale layer 702 // !!! todo: unit in scale layer
691 const scaleLayer = new wavesUI.helpers.ScaleLayer({ 703 const scaleLayer = new wavesUI.helpers.ScaleLayer({
692 tickColor: colour, 704 tickColor: colour,
693 textColor: colour, 705 textColor: colour,
815 this.addLayer( 827 this.addLayer(
816 pianoRollLayer, 828 pianoRollLayer,
817 this.waveTrack, 829 this.waveTrack,
818 this.timeline.timeContext 830 this.timeline.timeContext
819 ); 831 );
832 this.addScaleAndHighlight(waveTrack, [pianoRollLayer], "",
833 colour, min, max);
820 break; 834 break;
821 } 835 }
822 } catch (e) { 836 } catch (e) {
823 console.warn(e); // TODO display 837 console.warn(e); // TODO display
824 break; 838 break;