mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 09:42:21 -04:00
move error callback into options and rename it
This commit is contained in:
parent
1ed721fb15
commit
9d85baee37
2 changed files with 6 additions and 11 deletions
|
@ -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
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue