repo: janusweb action: commit revision: path_from: revision_from: 804f54bf595d47da58852e0438700e5df7ea5d36: path_to: revision_to:
commit 804f54bf595d47da58852e0438700e5df7ea5d36 Author: James BaicoianuDate: Fri Apr 22 14:28:33 2022 -0700 Fade overlay over 1s when hiding diff --git a/scripts/client.js b/scripts/client.js
--- 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-----