mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 04:02:12 +00: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
@ -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…
x
Reference in New Issue
Block a user