Mercurial > hg > ugly-duckling
changeset 410:523858455430
Spinner whilst items are pending.
author | Lucas Thompson <dev@lucas.im> |
---|---|
date | Sun, 04 Jun 2017 21:00:11 +0100 |
parents | 81b1ff474bc6 |
children | 7e6b9b557179 |
files | src/app/analysis-item/analysis-item.component.html src/app/analysis-item/analysis-item.component.ts |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/app/analysis-item/analysis-item.component.html Sun Jun 04 20:20:30 2017 +0100 +++ b/src/app/analysis-item/analysis-item.component.html Sun Jun 04 21:00:11 2017 +0100 @@ -12,6 +12,7 @@ ></ugly-progress-bar> </ng-template> <ng-template [ngIf]="!isLoading()"> + <ugly-progress-spinner *ngIf="isPending()"></ugly-progress-spinner> <ugly-waves-play-head [colour]="'#c33c54'" [isActive]="isActive"
--- 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;