repo: janusweb
action: commit
revision: 
path_from: 
revision_from: 804f54bf595d47da58852e0438700e5df7ea5d36:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit 804f54bf595d47da58852e0438700e5df7ea5d36
Author: James Baicoianu 
Date:   Fri Apr 22 14:28:33 2022 -0700

    Fade overlay over 1s when hiding

diff --git a/scripts/client.js b/scripts/client.js
index cf2ac60eb3015fa1da1a98816f307d66c6c0ef39..
index ..edcca321b40ba8585d6c81b3f91f7dfb7400626e 100644
--- a/scripts/client.js
+++ b/scripts/client.js
@@ -463,11 +463,20 @@ elation.require(['elements.elements', 'elements', 'engine.engine', 'engine.asset
       }
       show() {
         super.show();
+        if (this.oldparent && !this.parentNode) {
+          this.oldparent.appendChild(this);
+        }
         elation.events.fire({type: 'overlay_show', element: this});
       }
       hide() {
         super.hide();
         elation.events.fire({type: 'overlay_hide', element: this});
+        setTimeout(() => {
+          if (this.parentNode) {
+            this.oldparent = this.parentNode;
+            this.parentNode.removeChild(this);
+          }
+        }, 1000);
       }
     });
   }

-----END OF PAGE-----