annotate src/app/visualisations/instants/instants.component.ts @ 446:be88a0e965d7

Fall back to RecordRtcMediaRecorder when MediaRecorder not available in browser.
author Lucas Thompson <dev@lucas.im>
date Mon, 26 Jun 2017 16:16:44 +0100
parents 3ace7672638b
children 64ed45a0bad3
rev   line source
dev@381 1 /**
dev@381 2 * Created by lucast on 31/05/2017.
dev@381 3 */
dev@381 4 import {WavesComponent} from '../waves-base.component';
dev@381 5 import {
dev@381 6 ChangeDetectionStrategy,
dev@381 7 Component,
dev@381 8 Input,
dev@381 9 } from '@angular/core';
dev@381 10 import {Instant} from '../FeatureUtilities';
dev@381 11 import Waves from 'waves-ui-piper';
dev@381 12
dev@381 13 @Component({
dev@381 14 selector: 'ugly-instants',
dev@381 15 templateUrl: '../waves-template.html',
dev@381 16 styleUrls: ['../waves-template.css'],
dev@405 17 changeDetection: ChangeDetectionStrategy.OnPush,
dev@405 18 providers: [
dev@405 19 {provide: WavesComponent, useExisting: InstantsComponent}
dev@405 20 ]
dev@381 21 })
dev@383 22 export class InstantsComponent extends WavesComponent<Instant[]> {
dev@381 23 @Input() set instants(instants: Instant[]) {
dev@383 24 this.feature = instants;
dev@381 25 }
dev@381 26
dev@383 27 protected get featureLayers(): Layer[] {
dev@383 28 return [
dev@381 29 new Waves.helpers.TickLayer(
dev@383 30 this.feature,
dev@381 31 {
dev@381 32 height: this.height,
dev@381 33 color: this.colour,
dev@381 34 labelPosition: 'bottom',
dev@381 35 shadeSegments: true
dev@381 36 }
dev@383 37 )
dev@383 38 ];
dev@381 39 }
dev@381 40 }