]> git.parisson.com Git - timeside.git/commitdiff
Server/WavesUI: fix zoomed selection at start-up
authorThomas Fillon <thomas@parisson.com>
Mon, 9 Mar 2015 14:23:48 +0000 (15:23 +0100)
committerThomas Fillon <thomas@parisson.com>
Mon, 9 Mar 2015 14:23:48 +0000 (15:23 +0100)
timeside/player/static/timeside/js/timeside-waves.js

index 902e4cc113267c99a658c0d9b676051d603f5711..d51089d2774c84cb61580983d360ecbb7ea2a22b 100644 (file)
@@ -14,7 +14,7 @@ function waveform(div_id) {
             var id = '#' + div_id;
 
            var audio_start = 0
-           var audio_end = audioBuffer.duration / 4 ;//Math.min(audioBuffer.duration, 30);
+           var audio_end = Math.min(audioBuffer.duration/2, 30);
 
             var data = [{
                 start: audio_start,
@@ -94,7 +94,8 @@ function waveform(div_id) {
                 // .opacity(0.8);
 
             graph_sub.add(waveformLayerSub);
-
+           update_waveform(graph_sub, data)
+           
             d3.select(id_sub).call(graph_sub.draw);
 
            // Add X-Ticks addTicks(id_sub, graph_sub);