Skip to content

Commit

Permalink
Hide playhead until waveform is ready (katspaugh#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
thijstriemstra committed Mar 31, 2015
1 parent 467f657 commit 0d77ccd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/drawer.canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ WaveSurfer.util.extend(WaveSurfer.Drawer.Canvas, {
bottom: 0,
overflow: 'hidden',
width: '0',
display: 'none',
boxSizing: 'border-box',
borderRightStyle: 'solid',
borderRightWidth: this.params.cursorWidth + 'px',
Expand All @@ -44,6 +45,8 @@ WaveSurfer.util.extend(WaveSurfer.Drawer.Canvas, {
this.waveCc.canvas.height = this.height;
this.style(this.waveCc.canvas, { width: width + 'px'});

this.style(this.progressWave, { display: 'block'});

if (this.progressCc) {
this.progressCc.canvas.width = this.width;
this.progressCc.canvas.height = this.height;
Expand Down
1 change: 0 additions & 1 deletion src/drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ WaveSurfer.Drawer = {

// if the cursor is currently visible...
if (!immediate && -half <= offset && offset < half) {
// we'll limit the "re-center" rate.
// we'll limit the "re-center" rate.
var rate = 5;
offset = Math.max(-rate, Math.min(rate, offset));
Expand Down

0 comments on commit 0d77ccd

Please sign in to comment.