diff src/app/app.component.ts @ 436:d2af14e0b949

No need to close the tray programmatically, can do it in the template.
author Lucas Thompson <dev@lucas.im>
date Wed, 07 Jun 2017 15:45:29 +0100
parents b0415f8837d9
children 8113b6f5a75e
line wrap: on
line diff
--- a/src/app/app.component.ts	Wed Jun 07 15:34:26 2017 +0100
+++ b/src/app/app.component.ts	Wed Jun 07 15:45:29 2017 +0100
@@ -1,4 +1,4 @@
-import {Component, OnDestroy, ViewChild} from '@angular/core';
+import {Component, OnDestroy} from '@angular/core';
 import {
   AudioPlayerService,
   AudioResourceError, AudioResource
@@ -14,7 +14,6 @@
   Item, PendingAnalysisItem, PendingRootAudioItem, RootAudioItem
 } from './analysis-item/analysis-item.component';
 import {OnSeekHandler} from './playhead/PlayHeadHelpers';
-import {ActionTrayComponent} from "./actions/action-tray.component";
 
 class PersistentStack<T> {
   private stack: T[];
@@ -72,7 +71,6 @@
   styleUrls: ['./app.component.css']
 })
 export class AppComponent implements OnDestroy {
-  @ViewChild(ActionTrayComponent) tray: ActionTrayComponent;
   audioBuffer: AudioBuffer; // TODO consider revising
   canExtract: boolean;
   private onAudioDataSubscription: Subscription;
@@ -82,7 +80,6 @@
   private countingId: number; // TODO improve uniquely identifying items
   private rootAudioItem: RootAudioItem;
   private onSeek: OnSeekHandler;
-  private closeTray: () => void;
 
   constructor(private audioService: AudioPlayerService,
               private featureService: FeatureExtractionService,
@@ -145,9 +142,6 @@
         );
       }
     );
-    this.closeTray = () => {
-      this.tray.toggle();
-    };
   }
 
   onFileOpened(file: File | Blob) {