# HG changeset patch # User Lucas Thompson # Date 1496255391 -3600 # Node ID ee6c4e3dc461b442788f8d9f4810039199a2e71b # Parent afe2fa4a32150c4a148197913de6c9190c6bbcb8 Some visibility changes and unnecessary method args. diff -r afe2fa4a3215 -r ee6c4e3dc461 src/app/visualisations/waves-base.component.ts --- a/src/app/visualisations/waves-base.component.ts Wed May 31 19:24:21 2017 +0100 +++ b/src/app/visualisations/waves-base.component.ts Wed May 31 19:29:51 2017 +0100 @@ -52,15 +52,15 @@ ngAfterViewInit(): void { this.height = this.trackContainer.nativeElement.getBoundingClientRect().height; - this.renderTimeline(this.trackContainer); + this.renderTimeline(); this.update(); } - update(): void { + private update(): void { if (!this.waveTrack || !this.mFeature) { return; } - this.clearTimeline(this.trackContainer); + this.clearTimeline(); const layers = this.featureLayers; for (const layer of layers) { this.addLayer(layer, this.waveTrack, this.timeline.timeContext); @@ -71,8 +71,8 @@ } - protected renderTimeline($el: ElementRef): Timeline { - const track: HTMLElement = $el.nativeElement; + private renderTimeline(): Timeline { + const track: HTMLElement = this.trackContainer.nativeElement; track.innerHTML = ''; if (this.duration >= 0) { const width: number = track.getBoundingClientRect().width; @@ -87,7 +87,7 @@ if ('ontouchstart' in window) { attachTouchHandlerBodges( - $el.nativeElement, + track, this.timeline ); } @@ -95,7 +95,7 @@ } // TODO can likely be removed, or use waves-ui methods - protected clearTimeline($el: ElementRef): void { + private clearTimeline(): void { // loop through layers and remove them, waves-ui provides methods for this but it seems to not work properly const timeContextChildren = this.timeline.timeContext._children; for (const track of this.timeline.tracks) { @@ -130,10 +130,10 @@ // TODO can likely use methods in waves-ui directly - protected addLayer(layer: Layer, - track: Track, - timeContext: any, - isAxis: boolean = false): void { + private addLayer(layer: Layer, + track: Track, + timeContext: any, + isAxis: boolean = false): void { if (!layer.timeContext) { layer.setTimeContext(isAxis ? timeContext : new Waves.core.LayerTimeContext(timeContext));