move error callback into options and rename it

This commit is contained in:
Felix Wiedenbach 2021-02-13 08:29:13 +01:00
parent 1ed721fb15
commit 9d85baee37
2 changed files with 6 additions and 11 deletions

View file

@ -416,9 +416,8 @@ var Module = Class.extend({
* @param {number} speed The speed of the show animation.
* @param {Function} callback Called when the animation is done.
* @param {object} [options] Optional settings for the show method.
* @param {Function} errorCallback Called when the module failed to show.
*/
show: function (speed, callback, options, errorCallback) {
show: function (speed, callback, options) {
if (typeof callback === "object") {
options = callback;
callback = function () {};
@ -426,7 +425,6 @@ var Module = Class.extend({
callback = callback || function () {};
options = options || {};
errorCallback = errorCallback || function () {};
MM.showModule(
this,
@ -435,7 +433,6 @@ var Module = Class.extend({
this.resume();
callback();
},
errorCallback,
options
);
}