view 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 source
import {Component, OnInit, ViewChild, ElementRef} from '@angular/core';

declare var wavesUI: any;

@Component({
  selector: 'app-waveform',
  templateUrl: './waveform.component.html',
  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);
  }
}