Mercurial > hg > ugly-duckling
comparison src/app/waveform/waveform.component.ts @ 334:f986426870d0
Add scale and highlight to notes tracks
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Fri, 19 May 2017 16:37:08 +0100 |
parents | 802fbba26afe |
children | 46435d5208e9 |
comparison
equal
deleted
inserted
replaced
333:802fbba26afe | 334:f986426870d0 |
---|---|
685 lineLayer.duration = duration; | 685 lineLayer.duration = duration; |
686 | 686 |
687 return lineLayer; | 687 return lineLayer; |
688 }); | 688 }); |
689 | 689 |
690 this.addScaleAndHighlight(waveTrack, lineLayers, unit, colour, min, max); | |
691 } | |
692 | |
693 private addScaleAndHighlight(waveTrack, | |
694 lineLayers, | |
695 unit: string, | |
696 colour: Colour, | |
697 min: number, | |
698 max: number) { | |
699 | |
700 const height = this.trackDiv.nativeElement.getBoundingClientRect().height; | |
701 | |
690 // And a single scale layer at left | 702 // And a single scale layer at left |
691 // !!! todo: unit in scale layer | 703 // !!! todo: unit in scale layer |
692 const scaleLayer = new wavesUI.helpers.ScaleLayer({ | 704 const scaleLayer = new wavesUI.helpers.ScaleLayer({ |
693 tickColor: colour, | 705 tickColor: colour, |
694 textColor: colour, | 706 textColor: colour, |
817 this.addLayer( | 829 this.addLayer( |
818 pianoRollLayer, | 830 pianoRollLayer, |
819 waveTrack, | 831 waveTrack, |
820 this.timeline.timeContext | 832 this.timeline.timeContext |
821 ); | 833 ); |
834 this.addScaleAndHighlight(waveTrack, [pianoRollLayer], "", | |
835 colour, min, max); | |
822 break; | 836 break; |
823 } | 837 } |
824 } catch (e) { | 838 } catch (e) { |
825 console.warn(e); // TODO display | 839 console.warn(e); // TODO display |
826 break; | 840 break; |