mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-04-25 06:58:30 -04:00
automatically add/remove a hidden/shown class to the module wrappers if they get hidden or shown
This commit is contained in:
parent
ad66c02735
commit
4325fcdca2
1 changed files with 4 additions and 0 deletions
|
@ -245,6 +245,8 @@ const MM = (function () {
|
|||
if (moduleWrapper !== null) {
|
||||
moduleWrapper.style.transition = "opacity " + speed / 1000 + "s";
|
||||
moduleWrapper.style.opacity = 0;
|
||||
moduleWrapper.className = moduleWrapper.className.split(" shown").join("");
|
||||
moduleWrapper.className += " hidden";
|
||||
|
||||
clearTimeout(module.showHideTimer);
|
||||
module.showHideTimer = setTimeout(function () {
|
||||
|
@ -310,6 +312,8 @@ const MM = (function () {
|
|||
moduleWrapper.style.transition = "opacity " + speed / 1000 + "s";
|
||||
// Restore the position. See hideModule() for more info.
|
||||
moduleWrapper.style.position = "static";
|
||||
moduleWrapper.className = moduleWrapper.className.split(" hidden").join("");
|
||||
moduleWrapper.className += " shown";
|
||||
|
||||
updateWrapperStates();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue