Mercurial > hg > ugly-duckling
diff src/app/analysis-item/analysis-item.component.ts @ 410:523858455430
Spinner whilst items are pending.
author | Lucas Thompson <dev@lucas.im> |
---|---|
date | Sun, 04 Jun 2017 21:00:11 +0100 |
parents | f2d43724a578 |
children | 89674c064cda |
line wrap: on
line diff
--- a/src/app/analysis-item/analysis-item.component.ts Sun Jun 04 20:20:30 2017 +0100 +++ b/src/app/analysis-item/analysis-item.component.ts Sun Jun 04 21:00:11 2017 +0100 @@ -53,7 +53,7 @@ } export function isRootAudioItem(item: Item): item is RootAudioItem { - return isPendingRootAudioItem(item) && + return item && isPendingRootAudioItem(item) && (item as RootAudioItem).audioData instanceof AudioBuffer; } @@ -135,6 +135,12 @@ return this.item && isRootAudioItem(this.item); } + isPending(): boolean { + return this.item && + !isRootAudioItem(this.item) && !isAnalysisItem(this.item) && + (isPendingAnalysisItem(this.item) || isPendingRootAudioItem(this.item)); + } + getFeatureShape(): HigherLevelFeatureShape | null { return !isPendingRootAudioItem(this.item) && isAnalysisItem(this.item) ? this.item.shape : null;