From 32b227cb8868111d06959a73da1d125814cd9ea7 Mon Sep 17 00:00:00 2001
From: aiglemedia
Date: Fri, 20 Sep 2019 17:47:51 +0530
Subject: [PATCH 1/3] Update PNotifyAnimate.html
Fixed overlay not closed when using Animate module with modal stack.
---
src/PNotifyAnimate.html | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/src/PNotifyAnimate.html b/src/PNotifyAnimate.html
index 552f9a11..bc07dc7f 100644
--- a/src/PNotifyAnimate.html
+++ b/src/PNotifyAnimate.html
@@ -130,7 +130,24 @@
_notice.refs.elem.removeEventListener('MSAnimationEnd', finished);
_notice.refs.elem.removeEventListener('oanimationend', finished);
_notice.refs.elem.removeEventListener('animationend', finished);
- _notice.set({ '_animatingClass': 'animated' });
+ _notice.set({ '_animatingClass': '' });
+
+ const { stack } = _notice.get();
+ if (stack && stack.overlay) {
+ let stillOpen = false;
+ for (let i = 0; i < PNotify.notices.length; i++) {
+ const notice = PNotify.notices[i];
+ if (notice !== _notice && notice.get().stack === stack && notice.get()._state !== 'closed') {
+ stillOpen = true;
+ break;
+ }
+ }
+ if (!stillOpen) {
+ if (stack.overlay.parentNode) {
+ stack.overlay.parentNode.removeChild(stack.overlay);
+ }
+ }
+ }
if (callback) {
callback.call();
}
From 29c0fb610cea7b54b2da4facad665ea9f72167f2 Mon Sep 17 00:00:00 2001
From: aiglemedia
Date: Fri, 20 Sep 2019 17:52:55 +0530
Subject: [PATCH 2/3] Animate module demo with modal window
---
demo/index.html | 50 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
create mode 100644 demo/index.html
diff --git a/demo/index.html b/demo/index.html
new file mode 100644
index 00000000..585af7e5
--- /dev/null
+++ b/demo/index.html
@@ -0,0 +1,50 @@
+
+
+
+
+ PNotify
+
+
+
+
+
+
+
+
+
+
+
+
+ Animate
+
+
+
+
+ © 2011-2018 Hunter Perrin. All Rights Reserved.
+
+
From c64df6700f8bbaddb2f317c07715c375b36d7e98 Mon Sep 17 00:00:00 2001
From: aiglemedia
Date: Fri, 20 Sep 2019 17:57:53 +0530
Subject: [PATCH 3/3] Revert "Animate module demo with modal window"
This reverts commit 29c0fb610cea7b54b2da4facad665ea9f72167f2.
---
demo/index.html | 50 -------------------------------------------------
1 file changed, 50 deletions(-)
delete mode 100644 demo/index.html
diff --git a/demo/index.html b/demo/index.html
deleted file mode 100644
index 585af7e5..00000000
--- a/demo/index.html
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
- PNotify
-
-
-
-
-
-
-
-
-
-
-
-
- Animate
-
-
-
-
- © 2011-2018 Hunter Perrin. All Rights Reserved.
-
-