Mercurial > hg > ugly-duckling
view src/app/visualisations/instants/instants.component.ts @ 509:041468f553e1 tip master
Merge pull request #57 from LucasThompson/fix/session-stack-max-call-stack
Fix accidental recursion in PersistentStack
author | Lucas Thompson <LucasThompson@users.noreply.github.com> |
---|---|
date | Mon, 27 Nov 2017 11:04:30 +0000 |
parents | 64ed45a0bad3 |
children |
line wrap: on
line source
/** * Created by lucast on 31/05/2017. */ import {PlayheadRenderer, WavesComponent} from '../waves-base.component'; import { ChangeDetectionStrategy, Component, Input, } from '@angular/core'; import {Instant} from '../FeatureUtilities'; import Waves from 'waves-ui-piper'; @Component({ selector: 'ugly-instants', templateUrl: '../waves-template.html', styleUrls: ['../waves-template.css'], changeDetection: ChangeDetectionStrategy.OnPush, providers: [ {provide: PlayheadRenderer, useExisting: InstantsComponent}, {provide: WavesComponent, useExisting: InstantsComponent} ] }) export class InstantsComponent extends WavesComponent<Instant[]> { @Input() set instants(instants: Instant[]) { this.feature = instants; } protected get featureLayers(): Layer[] { return [ new Waves.helpers.TickLayer( this.feature, { height: this.height, color: this.colour, labelPosition: 'bottom', shadeSegments: true } ) ]; } }