From 9675e948be8a7ea2d86c8ca68a89c09452ece0e7 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Thu, 23 Sep 2021 23:22:39 -0400
Subject: added code for editing the original waveform, not a clip when
 trimming is activated.

---
 src/client/views/nodes/AudioBox.tsx | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 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 f6d6ff440..6a25ffaeb 100644
--- a/src/client/views/nodes/AudioBox.tsx
+++ b/src/client/views/nodes/AudioBox.tsx
@@ -577,9 +577,16 @@ export class AudioBox extends ViewBoxAnnotatableComponent<
                 PanelWidth={this.timelineWidth}
                 PanelHeight={this.timelineHeight}
                 rawDuration={this.rawDuration}
-                clipStart={this.clipStart}
-                clipEnd={this.clipEnd}
-                clipDuration={this.duration}
+
+                // this edits the entire waveform when trimming is activated
+                clipStart={this._trimming ? 0 : this.clipStart}
+                clipEnd={this._trimming ? this.rawDuration : this.clipEnd}
+                clipDuration={this._trimming ? this.rawDuration : this.duration}
+                // this edits just the current waveform clip when trimming is activated
+                // clipStart={this.clipStart}
+                // clipEnd={this.clipEnd}
+                // clipDuration={this.duration}
+
                 trimming={this._trimming}
                 trimStart={this.trimStartFunc}
                 trimEnd={this.trimEndFunc}
-- 
cgit v1.2.3-70-g09d2

