mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 04:02:12 +00:00
Cleanup notificationFx jsdoc
This commit is contained in:
parent
eee64c8064
commit
e489b7101c
@ -12,10 +12,11 @@
|
|||||||
*/
|
*/
|
||||||
(function (window) {
|
(function (window) {
|
||||||
/**
|
/**
|
||||||
* extend obj function
|
* Extend one object with another one
|
||||||
*
|
*
|
||||||
* @param a
|
* @param {object} a The object to extend
|
||||||
* @param b
|
* @param {object} b The object which extends the other, overwrites existing keys
|
||||||
|
* @returns {object} The merged object
|
||||||
*/
|
*/
|
||||||
function extend(a, b) {
|
function extend(a, b) {
|
||||||
for (let key in b) {
|
for (let key in b) {
|
||||||
@ -27,9 +28,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NotificationFx function
|
* NotificationFx constructor
|
||||||
*
|
*
|
||||||
* @param options
|
* @param {object} options The configuration options
|
||||||
|
* @class
|
||||||
*/
|
*/
|
||||||
function NotificationFx(options) {
|
function NotificationFx(options) {
|
||||||
this.options = extend({}, this.options);
|
this.options = extend({}, this.options);
|
||||||
@ -71,8 +73,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* init function
|
* Initialize and cache some vars
|
||||||
* initialize and cache some vars
|
|
||||||
*/
|
*/
|
||||||
NotificationFx.prototype._init = function () {
|
NotificationFx.prototype._init = function () {
|
||||||
// create HTML structure
|
// create HTML structure
|
||||||
@ -100,7 +101,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* init events
|
* Init events
|
||||||
*/
|
*/
|
||||||
NotificationFx.prototype._initEvents = function () {
|
NotificationFx.prototype._initEvents = function () {
|
||||||
// dismiss notification by tapping on it if someone has a touchscreen
|
// dismiss notification by tapping on it if someone has a touchscreen
|
||||||
@ -110,7 +111,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* show the notification
|
* Show the notification
|
||||||
*/
|
*/
|
||||||
NotificationFx.prototype.show = function () {
|
NotificationFx.prototype.show = function () {
|
||||||
this.active = true;
|
this.active = true;
|
||||||
@ -120,7 +121,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dismiss the notification
|
* Dismiss the notification
|
||||||
*/
|
*/
|
||||||
NotificationFx.prototype.dismiss = function () {
|
NotificationFx.prototype.dismiss = function () {
|
||||||
this.active = false;
|
this.active = false;
|
||||||
@ -149,7 +150,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* add to global namespace
|
* Add to global namespace
|
||||||
*/
|
*/
|
||||||
window.NotificationFx = NotificationFx;
|
window.NotificationFx = NotificationFx;
|
||||||
})(window);
|
})(window);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user