Mercurial > hg > ugly-duckling
changeset 181:7cd274d296a3
Allow for sharing time context amongst some analysis items. This approach may be backed out.
author | Lucas Thompson <dev@lucas.im> |
---|---|
date | Wed, 22 Mar 2017 11:17:51 +0000 |
parents | a1983e30cdd7 |
children | 4c5b968a1056 |
files | src/app/analysis-item/analysis-item.component.html src/app/analysis-item/analysis-item.component.ts src/app/notebook-feed/notebook-feed.component.html src/app/notebook-feed/notebook-feed.component.ts |
diffstat | 4 files changed, 14 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/app/analysis-item/analysis-item.component.html Wed Mar 22 11:17:12 2017 +0000 +++ b/src/app/analysis-item/analysis-item.component.html Wed Mar 22 11:17:51 2017 +0000 @@ -6,6 +6,7 @@ <md-card-content> <app-waveform [audioBuffer]="audioBuffer" + [timeContext]="timeContext" ></app-waveform> </md-card-content> <md-card-actions>
--- a/src/app/analysis-item/analysis-item.component.ts Wed Mar 22 11:17:12 2017 +0000 +++ b/src/app/analysis-item/analysis-item.component.ts Wed Mar 22 11:17:51 2017 +0000 @@ -2,6 +2,7 @@ * Created by lucast on 21/03/2017. */ import {Component, Input} from "@angular/core"; +import Waves from 'waves-ui'; export interface Analysis { audioUri: string; @@ -15,7 +16,7 @@ }) export class AnalysisItemComponent { private _audioBuffer: AudioBuffer; - + @Input() timeContext: TimelineTimeContext; @Input() set audioBuffer(buffer: AudioBuffer) {
--- a/src/app/notebook-feed/notebook-feed.component.html Wed Mar 22 11:17:12 2017 +0000 +++ b/src/app/notebook-feed/notebook-feed.component.html Wed Mar 22 11:17:51 2017 +0000 @@ -1,6 +1,8 @@ +<ugly-analysis-item + [audioBuffer]="audioBuffer" + [timeContext]="sharedTimeContext"></ugly-analysis-item> +<ugly-analysis-item + [audioBuffer]="audioBuffer" + [timeContext]="sharedTimeContext"></ugly-analysis-item> <ugly-analysis-item [audioBuffer]="audioBuffer"></ugly-analysis-item> -<ugly-analysis-item - [audioBuffer]="audioBuffer"></ugly-analysis-item> -<ugly-analysis-item - [audioBuffer]="audioBuffer"></ugly-analysis-item>
--- a/src/app/notebook-feed/notebook-feed.component.ts Wed Mar 22 11:17:12 2017 +0000 +++ b/src/app/notebook-feed/notebook-feed.component.ts Wed Mar 22 11:17:51 2017 +0000 @@ -53,6 +53,7 @@ }) export class NotebookFeedComponent { private _audioBuffer: AudioBuffer; + sharedTimeContext: TimelineTimeContext; @Input() @@ -66,4 +67,8 @@ get audioBuffer(): AudioBuffer { return this._audioBuffer; } + + constructor() { + this.sharedTimeContext = new NotifyingTimeContext(100, 1000); + } }