diff --git a/src/drawer.canvas.js b/src/drawer.canvas.js index 7f0b27664..cbb5db526 100644 --- a/src/drawer.canvas.js +++ b/src/drawer.canvas.js @@ -194,10 +194,7 @@ WaveSurfer.util.extend(WaveSurfer.Drawer.Canvas, { }, this); }, - updateProgress: function (progress) { - var pos = Math.round( - this.width * progress - ) / this.params.pixelRatio; + updateProgress: function (pos) { this.style(this.progressWave, { width: pos + 'px' }); }, diff --git a/src/drawer.js b/src/drawer.js index 941af412f..a41cb4142 100644 --- a/src/drawer.js +++ b/src/drawer.js @@ -186,7 +186,7 @@ WaveSurfer.Drawer = { this.recenterOnPosition(newPos); } - this.updateProgress(progress); + this.updateProgress(pos); } }, diff --git a/src/drawer.multicanvas.js b/src/drawer.multicanvas.js index 8e1cea83a..815d50344 100644 --- a/src/drawer.multicanvas.js +++ b/src/drawer.multicanvas.js @@ -309,10 +309,7 @@ WaveSurfer.util.extend(WaveSurfer.Drawer.MultiCanvas, { } }, - updateProgress: function (progress) { - var pos = Math.round( - this.width * progress - ) / this.params.pixelRatio; + updateProgress: function (pos) { this.style(this.progressWave, { width: pos + 'px' }); } });