Skip to content

Commit

Permalink
Merge branch 'master' into mute-1615
Browse files Browse the repository at this point in the history
  • Loading branch information
thijstriemstra committed May 7, 2019
2 parents a0d189e + 5c5c79e commit 90bb2aa
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 30 deletions.
16 changes: 12 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,19 @@ module.exports = {
singleQuote: true,
tabWidth: 4,
trailingComma: 'none',
"endOfLine": "auto"
'endOfLine': 'auto'
}
],
eqeqeq: 'off',
'no-console': 'off',
'no-unused-vars': 'off'
}
'no-console': 1,
'no-unused-vars': 'off',
'no-unreachable': 2
},
'overrides': [
{
'files': ['example/**/*.js'],
'rules': {
'no-console': 'off'
}
}]
};
17 changes: 11 additions & 6 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,23 @@ wavesurfer.js changelog
- Fix: the `progressWave` should not be rendered when specifying the same
value for the `progressColor` and `waveColor` options (#1620)
- Cursor plugin:
- add `formatTimeCallback` option
- add `followCursorY` option (#1605)
- Add `formatTimeCallback` option
- Add `followCursorY` option (#1605)
- Remove deprecated `enableCursor` method (#1646)
- Spectrogram plugin: fix `ready` listener when loading multiple
audio files (#1572)
- Regions plugin:
- fix `ready` listener when loading multiple audio files (#1602)
- add `snapToGridInterval` and `snapToGridOffset` options (#1632)
- allow drawing regions over existing regions, if the underlying ones are not
- Fix `ready` listener when loading multiple audio files (#1602)
- Add `snapToGridInterval` and `snapToGridOffset` options (#1632)
- Allow drawing regions over existing regions, if the underlying ones are not
draggable or resizable (#1633)
- Remove deprecated `initRegions` method (#1646)
- Timeline plugin: fix `ready` listener when loading multiple
audio files

- Minimap plugin: remove deprecated `initMinimap` method (#1646)
- `util.getId()` now accepts a `prefix` argument (#1619)
- Fix: the `progressWave` should not be rendered when specifying the same
value for the `progressColor` and `waveColor` options (#1620)

2.2.1 (18.03.2019)
------------------
Expand Down
1 change: 1 addition & 0 deletions src/html-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class Init {
);
loadScript(src, { async: false }, (err, plugin) => {
if (err) {
// eslint-disable-next-line no-console
return console.error(
`WaveSurfer plugin ${name} not found at ${src}`
);
Expand Down
7 changes: 1 addition & 6 deletions src/plugin/cursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,7 @@ export default class CursorPlugin {
name: 'cursor',
deferInit: params && params.deferInit ? params.deferInit : false,
params: params,
staticProps: {
enableCursor() {
console.warn('Deprecated enableCursor!');
this.initPlugins('cursor');
}
},
staticProps: {},
instance: CursorPlugin
};
}
Expand Down
9 changes: 2 additions & 7 deletions src/plugin/minimap.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*eslint no-console: ["error", { allow: ["warn"] }] */
/**
* @typedef {Object} MinimapPluginParams
* @desc Extends the `WavesurferParams` wavesurfer was initialised with
Expand Down Expand Up @@ -48,13 +49,7 @@ export default class MinimapPlugin {
name: 'minimap',
deferInit: params && params.deferInit ? params.deferInit : false,
params: params,
staticProps: {
initMinimap(customConfig) {
console.warn('Deprecated initMinimap!');
params = customConfig;
this.initPlugins('minimap');
}
},
staticProps: {},
instance: MinimapPlugin
};
}
Expand Down
7 changes: 0 additions & 7 deletions src/plugin/regions.js
Original file line number Diff line number Diff line change
Expand Up @@ -597,13 +597,6 @@ export default class RegionsPlugin {
deferInit: params && params.deferInit ? params.deferInit : false,
params: params,
staticProps: {
initRegions() {
console.warn(
'Deprecated initRegions! Use wavesurfer.initPlugins("regions") instead!'
);
this.initPlugin('regions');
},

addRegion(options) {
if (!this.initialisedPluginList.regions) {
this.initPlugin('regions');
Expand Down
2 changes: 2 additions & 0 deletions src/wavesurfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,7 @@ export default class WaveSurfer extends util.Observer {
progress < 0 ||
progress > 1
) {
// eslint-disable-next-line no-console
return console.error(
'Error calling wavesurfer.seekTo, parameter must be a number between 0 and 1!'
);
Expand Down Expand Up @@ -1280,6 +1281,7 @@ export default class WaveSurfer extends util.Observer {
reason => preloadIgnoreReasons[reason]
);
if (activeReasons.length) {
// eslint-disable-next-line no-console
console.warn(
'Preload parameter of wavesurfer.load will be ignored because:\n\t- ' +
activeReasons.join('\n\t- ')
Expand Down

0 comments on commit 90bb2aa

Please sign in to comment.