From 72b95c76f156a15f645703ba77c05aeb62c903ff Mon Sep 17 00:00:00 2001
From: Lionel Han <47760119+IGoByJoe@users.noreply.github.com>
Date: Thu, 6 Aug 2020 17:34:09 -0700
Subject: minor fixes

---
 src/client/views/nodes/AudioBox.tsx | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'src/client/views/nodes/AudioBox.tsx')

diff --git a/src/client/views/nodes/AudioBox.tsx b/src/client/views/nodes/AudioBox.tsx
index 11dfe5fe6..f01382d43 100644
--- a/src/client/views/nodes/AudioBox.tsx
+++ b/src/client/views/nodes/AudioBox.tsx
@@ -191,7 +191,6 @@ export class AudioBox extends ViewBoxAnnotatableComponent<FieldViewProps, AudioD
 
     // pause play back
     pause = action(() => {
-        console.log("pause");
         this._ele!.pause();
         this.audioState = "paused";
     });
@@ -215,7 +214,6 @@ export class AudioBox extends ViewBoxAnnotatableComponent<FieldViewProps, AudioD
                     this.pause();
                 }
             } else if (seekTimeInSeconds <= this._ele.duration) {
-                console.log("playing");
                 this._ele.currentTime = seekTimeInSeconds;
                 this._ele.play();
                 runInAction(() => this.audioState = "playing");
@@ -425,7 +423,6 @@ export class AudioBox extends ViewBoxAnnotatableComponent<FieldViewProps, AudioD
     onPointerMove = async (e: PointerEvent) => {
         e.stopPropagation();
         e.preventDefault();
-        console.log("drag");
 
         if (!this._isPointerDown) {
             return;
@@ -592,6 +589,12 @@ export class AudioBox extends ViewBoxAnnotatableComponent<FieldViewProps, AudioD
                 if (context) {
                     context.scale(ratio1, ratio2)
                 }
+
+                let parent = canvas1.parentElement;
+                if (parent) {
+                    parent.style.width = `${width}`;
+                    parent.style.height = `${this._height}`;
+                }
             }
         }
     }
@@ -604,7 +607,6 @@ export class AudioBox extends ViewBoxAnnotatableComponent<FieldViewProps, AudioD
     reset = () => this._first = true;
 
     render() {
-        trace();
         const interactive = this.active() ? "-interactive" : "";
         this.reset();
         this.path && this._buckets.length !== 100 ? this.peaks : null; // render waveform if audio is done recording
-- 
cgit v1.2.3-70-g09d2

