annotate src/app/notebook-feed/notebook-feed.component.ts @ 201:d179cf7df697

First attempt at the feed containing items. Currently breaks analyses into distinct, separated segments, based on each item marked as root.
author Lucas Thompson <dev@lucas.im>
date Fri, 24 Mar 2017 11:07:26 +0000
parents a50feba0d7f0
children 77ada2e07997
rev   line source
dev@171 1 /**
dev@171 2 * Created by lucast on 21/03/2017.
dev@171 3 */
dev@171 4 import {Component, Input} from "@angular/core";
dev@178 5 import Waves from 'waves-ui';
dev@201 6 import {AnalysisItem} from "../analysis-item/analysis-item.component";
dev@171 7
dev@171 8 @Component({
dev@171 9 selector: 'ugly-notebook-feed',
dev@171 10 templateUrl: './notebook-feed.component.html',
dev@171 11 styleUrls: ['./notebook-feed.component.css']
dev@171 12 })
dev@171 13 export class NotebookFeedComponent {
dev@189 14 sharedTimeline: Timeline;
dev@201 15 @Input() analyses: AnalysisItem[];
dev@201 16 @Input() set rootAudioUri(uri: string) {
dev@201 17 this._rootAudioUri = uri;
dev@171 18
dev@201 19 // TODO is this safe? will the fact references are held elsewhere
dev@201 20 // keep the previous instance alive? Or will it get garbage collected in
dev@201 21 // screw previous layers up?
dev@201 22 this.sharedTimeline = new Waves.core.Timeline();
dev@171 23 }
dev@171 24
dev@201 25 get rootAudioUri(): string {
dev@201 26 return this._rootAudioUri;
dev@171 27 }
dev@201 28 private _rootAudioUri: string;
dev@181 29
dev@181 30 constructor() {
dev@189 31 this.sharedTimeline = new Waves.core.Timeline();
dev@201 32 this.analyses = [];
dev@181 33 }
dev@171 34 }