MCPcopy Index your code
hub / github.com/MagicMirrorOrg/MagicMirror / hide

Method hide

js/module.js:371–390  ·  view source on GitHub ↗

* Hide this module. * @param {number} speed The speed of the hide animation. * @param {() => void} callback Called when the animation is done. * @param {object} [options] Optional settings for the hide method.

(speed, callback, options = {})

Source from the content-addressed store, hash-verified

369 * @param {object} [options] Optional settings for the hide method.
370 */
371 hide (speed, callback, options = {}) {
372 let usedCallback = callback || function () {};
373 let usedOptions = options;
374
375 if (typeof callback === "object") {
376 Log.error("Parameter mismatch in module.hide: callback is not an optional parameter!");
377 usedOptions = callback;
378 usedCallback = function () {};
379 }
380
381 MM.hideModule(
382 this,
383 speed,
384 () => {
385 this.suspend();
386 usedCallback();
387 },
388 usedOptions
389 );
390 }
391
392 /**
393 * Show this module.

Callers 2

startModulesFunction · 0.80
notificationReceivedFunction · 0.80

Calls 1

suspendMethod · 0.95

Tested by

no test coverage detected