aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/utilities
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-06-16 20:33:31 +0800
committercrupest <crupest@outlook.com>2021-06-16 20:33:31 +0800
commitf3e53af1f7e6a78a302a2a5f88ab3e898e92eac6 (patch)
treebdc631abac08fdb98223198715bb0c2cf164558c /FrontEnd/src/utilities
parent6328d3eddd50f467921f8eb029937523be203b74 (diff)
downloadtimeline-f3e53af1f7e6a78a302a2a5f88ab3e898e92eac6.tar.gz
timeline-f3e53af1f7e6a78a302a2a5f88ab3e898e92eac6.tar.bz2
timeline-f3e53af1f7e6a78a302a2a5f88ab3e898e92eac6.zip
fix: Real fix #624.
Diffstat (limited to 'FrontEnd/src/utilities')
-rw-r--r--FrontEnd/src/utilities/refreshAnimation.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/FrontEnd/src/utilities/refreshAnimation.ts b/FrontEnd/src/utilities/refreshAnimation.ts
new file mode 100644
index 00000000..ba501107
--- /dev/null
+++ b/FrontEnd/src/utilities/refreshAnimation.ts
@@ -0,0 +1,13 @@
+export default function refreshAnimation(): void {
+ document.body.querySelectorAll("*").forEach((e) => {
+ if (e instanceof HTMLElement) {
+ const an = getComputedStyle(e).animationName;
+ if (an !== "none") {
+ e.style.animationName = "none";
+ setTimeout(() => {
+ e.style.animationName = an;
+ });
+ }
+ }
+ });
+}