diff src/app/waveform/waveform.component.ts @ 8:a50a4e814ff3

Track div for the waves-ui track.
author Lucas Thompson <dev@lucas.im>
date Wed, 26 Oct 2016 17:26:31 +0100
parents ee4353d1aeeb
children 0b24b8ae62f8
line wrap: on
line diff
--- a/src/app/waveform/waveform.component.ts	Wed Oct 26 17:18:42 2016 +0100
+++ b/src/app/waveform/waveform.component.ts	Wed Oct 26 17:26:31 2016 +0100
@@ -1,4 +1,5 @@
-import { Component, OnInit } from '@angular/core';
+import {Component, OnInit, ViewChild, ElementRef} from '@angular/core';
+
 declare var wavesUI: any;
 
 @Component({
@@ -7,11 +8,13 @@
   styleUrls: ['./waveform.component.css']
 })
 export class WaveformComponent implements OnInit {
+  @ViewChild('track') trackDiv: ElementRef;
 
   constructor() {
     console.log(wavesUI.core);
   }
 
   ngOnInit() {
+    console.log(this.trackDiv.nativeElement.getBoundingClientRect().width);
   }
 }