Skip to content

Commit

Permalink
Updated render function for drawPeaks/getPeaks (#959)
Browse files Browse the repository at this point in the history
Updated the render function to call the new version of the getPeaks and drawPeaks calls which now require start and end parameters.  Fixes flat waveform drawing in minimap plugin.
  • Loading branch information
dmongrel authored and katspaugh committed Feb 3, 2017
1 parent 385578b commit 6384d94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/wavesurfer.minimap.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ WaveSurfer.Minimap = WaveSurfer.util.extend({}, WaveSurfer.Drawer, WaveSurfer.Dr

render: function () {
var len = this.getWidth();
var peaks = this.wavesurfer.backend.getPeaks(len);
this.drawPeaks(peaks, len);
var peaks = this.wavesurfer.backend.getPeaks(len, 0, len);
this.drawPeaks(peaks, len, 0, len);

if (this.params.showOverview) {
//get proportional width of overview region considering the respective
Expand Down

0 comments on commit 6384d94

Please sign in to comment.