mirror of
https://github.com/edward-shen/MMM-pages.git
synced 2025-01-10 09:58:18 -08:00
Apply linting rules
This commit is contained in:
parent
a7df09cf79
commit
d32466ce2c
1 changed files with 5 additions and 5 deletions
10
MMM-pages.js
10
MMM-pages.js
|
@ -37,7 +37,7 @@ Module.register('MMM-pages', {
|
||||||
* @param {number} n The divisor
|
* @param {number} n The divisor
|
||||||
*/
|
*/
|
||||||
mod: function (x, n) {
|
mod: function (x, n) {
|
||||||
return ((x % n) + n) % n;
|
return (x % n + n) % n;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -195,7 +195,7 @@ Module.register('MMM-pages', {
|
||||||
* Optional and only used when we want to switch to a hidden page
|
* Optional and only used when we want to switch to a hidden page
|
||||||
*/
|
*/
|
||||||
animatePageChange: function (targetPageName) {
|
animatePageChange: function (targetPageName) {
|
||||||
let lockStringObj = { lockString: this.identifier };
|
let lockStringObj = {lockString: this.identifier};
|
||||||
if (!this.config.useLockString) {
|
if (!this.config.useLockString) {
|
||||||
// Passing in an undefined object is equivalent to not passing it in at
|
// Passing in an undefined object is equivalent to not passing it in at
|
||||||
// all, effectively providing only one arg to the hide and show calls
|
// all, effectively providing only one arg to the hide and show calls
|
||||||
|
@ -216,13 +216,13 @@ Module.register('MMM-pages', {
|
||||||
|
|
||||||
MM.getModules()
|
MM.getModules()
|
||||||
.exceptWithClass(modulesToShow)
|
.exceptWithClass(modulesToShow)
|
||||||
.enumerate(module => module.hide(animationTime, lockStringObj));
|
.enumerate((module) => module.hide(animationTime, lockStringObj));
|
||||||
|
|
||||||
// Shows all modules meant to be on the current page, after a small delay.
|
// Shows all modules meant to be on the current page, after a small delay.
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
MM.getModules()
|
MM.getModules()
|
||||||
.withClass(modulesToShow)
|
.withClass(modulesToShow)
|
||||||
.enumerate(module => module.show(animationTime, lockStringObj));
|
.enumerate((module) => module.show(animationTime, lockStringObj));
|
||||||
}, animationTime);
|
}, animationTime);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ Module.register('MMM-pages', {
|
||||||
* @param {boolean} isRotating the parameter, if you want to pause or resume.
|
* @param {boolean} isRotating the parameter, if you want to pause or resume.
|
||||||
*/
|
*/
|
||||||
setRotation: function (isRotating) {
|
setRotation: function (isRotating) {
|
||||||
const stateBaseString = (isRotating) ? "resum" : "paus";
|
const stateBaseString = isRotating ? 'resum' : 'paus';
|
||||||
if (isRotating === this.rotationPaused) {
|
if (isRotating === this.rotationPaused) {
|
||||||
Log.warn(`[MMM-pages] was asked to ${stateBaseString}e but rotation is already ${stateBaseString}ed!`);
|
Log.warn(`[MMM-pages] was asked to ${stateBaseString}e but rotation is already ${stateBaseString}ed!`);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue