Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
thijstriemstra committed Nov 17, 2018
1 parent 8f775ef commit 1176fe9
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 27 deletions.
36 changes: 18 additions & 18 deletions example/stretcher/soundtouch.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
/*
* SoundTouch JS audio processing library
* Copyright (c) Olli Parviainen
* Copyright (c) Ryan Berdeen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* SoundTouch JS audio processing library
* Copyright (c) Olli Parviainen
* Copyright (c) Ryan Berdeen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

(function(window) {
/**
Expand Down
23 changes: 14 additions & 9 deletions src/wavesurfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,15 +373,20 @@ export default class WaveSurfer extends util.Observer {
// set, this is never called. Use 100ms or this.params.responsive as
// timeout for the debounce function.
let prevWidth = 0;
this._onResize = util.debounce(() => {
if (
prevWidth != this.drawer.wrapper.clientWidth &&
!this.params.scrollParent
) {
prevWidth = this.drawer.wrapper.clientWidth;
this.drawer.fireEvent('redraw');
}
}, typeof this.params.responsive === 'number' ? this.params.responsive : 100);
this._onResize = util.debounce(
() => {
if (
prevWidth != this.drawer.wrapper.clientWidth &&
!this.params.scrollParent
) {
prevWidth = this.drawer.wrapper.clientWidth;
this.drawer.fireEvent('redraw');
}
},
typeof this.params.responsive === 'number'
? this.params.responsive
: 100
);

return this;
}
Expand Down

0 comments on commit 1176fe9

Please sign in to comment.