Mercurial > hg > ugly-duckling
changeset 234:0833ddde6a83
Manually trigger change detection - as being a child of an OnPush component causes issues updating this.
author | Lucas Thompson <dev@lucas.im> |
---|---|
date | Mon, 24 Apr 2017 17:03:45 +0100 |
parents | bd2f5769e7fa |
children | 76f2cd2c5a68 |
files | src/app/waveform/waveform.component.html src/app/waveform/waveform.component.ts |
diffstat | 2 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/app/waveform/waveform.component.html Mon Apr 24 17:02:55 2017 +0100 +++ b/src/app/waveform/waveform.component.html Mon Apr 24 17:03:45 2017 +0100 @@ -3,5 +3,5 @@ (mousedown)="seekStart()" (mouseup)="seekEnd($event.clientX)"></div> <template [ngIf]="isLoading"> - <ugly-progress-spinner [isVisible]="true"></ugly-progress-spinner> + <ugly-progress-spinner></ugly-progress-spinner> </template>
--- a/src/app/waveform/waveform.component.ts Mon Apr 24 17:02:55 2017 +0100 +++ b/src/app/waveform/waveform.component.ts Mon Apr 24 17:03:45 2017 +0100 @@ -1,6 +1,6 @@ import { Component, OnInit, ViewChild, ElementRef, Input, AfterViewInit, NgZone, - OnDestroy + OnDestroy, ChangeDetectorRef } from '@angular/core'; import { AudioPlayerService, AudioResource, @@ -171,7 +171,8 @@ constructor(private audioService: AudioPlayerService, private piperService: FeatureExtractionService, - public ngZone: NgZone) { + private ngZone: NgZone, + private ref: ChangeDetectorRef) { this.isSubscribedToAudioService = true; this.isSeeking = true; this.layers = []; @@ -532,6 +533,7 @@ waveTrack.update(); this.isLoading = false; + this.ref.markForCheck(); this.animate(); } @@ -735,6 +737,7 @@ } this.isLoading = false; + this.ref.markForCheck(); this.timeline.tracks.update(); }