Mercurial > hg > ugly-duckling
view src/app/analysis-item/analysis-item.component.ts @ 308:2cc5e1c39ba5
Use multiple line layers for tracks shape.
Currently the highlight layer is disabled; it'll take a bit more work to
restore this.
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Fri, 12 May 2017 09:48:35 +0100 |
parents | 2d7da410ba46 |
children | d17d5038b11a |
line wrap: on
line source
/** * Created by lucast on 21/03/2017. */ import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core'; export interface AnalysisItem { rootAudioUri: string; hasSharedTimeline: boolean; isRoot: boolean; extractorKey: string; title?: string; description?: string; id?: string; progress?: number; } @Component({ selector: 'ugly-analysis-item', templateUrl: './analysis-item.component.html', styleUrls: ['./analysis-item.component.css'], changeDetection: ChangeDetectionStrategy.OnPush }) export class AnalysisItemComponent implements OnInit { @Input() timeline: Timeline; @Input() isActive: boolean; @Input() item: AnalysisItem; @Input() contentWidth: number; private hasProgressOnInit = false; ngOnInit(): void { this.hasProgressOnInit = this.item.progress != null; } isLoading(): boolean { return this.hasProgressOnInit && this.item.progress < 100; } }