Skip to content

Commit 88142e7

Browse files
committed
Weer dialooganimatie toegevoegd
1 parent 20de192 commit 88142e7

2 files changed

Lines changed: 25 additions & 3 deletions

File tree

schedule.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -994,9 +994,13 @@ function hideDialog(el) {
994994
if (el) {
995995
dialog = document.getElementById(el);
996996
}
997-
dialog.style = "animation: none";
998-
dialog.close();
999-
show("submenus", "Instellingen");
997+
dialog.style = "animation: popOut 0.33s";
998+
dialog.addEventListener("animationend", (event) => {
999+
if (event.animationName === "popOut") {
1000+
dialog.close();
1001+
show("submenus", "Instellingen");
1002+
}
1003+
});
10001004
handleFormSubmit();
10011005
}
10021006

@@ -1031,6 +1035,9 @@ if (localStorage.getItem("css")) {
10311035
}
10321036
document.getElementById("weekBtn").addEventListener("click", () => {
10331037
localStorage.setItem("dag", "false");
1038+
if (!document.startViewTransition) {
1039+
document.getElementById("schedule").innerText = "";
1040+
}
10341041
handleFormSubmit();
10351042
});
10361043
document.getElementById("dayBtn").addEventListener("click", () => {

style.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,21 @@ dialog {
117117
}
118118
}
119119

120+
@keyframes popOut {
121+
from {
122+
max-height: calc(100vh - 80px);
123+
padding: 24px;
124+
opacity: 1;
125+
overflow: hidden;
126+
}
127+
to {
128+
max-height: 0px;
129+
padding: 0;
130+
opacity: 0;
131+
overflow: hidden;
132+
}
133+
}
134+
120135
#inputForm {
121136
max-width: 400px;
122137
margin: 0 auto;

0 commit comments

Comments
 (0)