🎉 Add animations to interactions

This commit is contained in:
Andrés Moya 2021-10-29 10:43:53 +02:00 committed by Andrey Antukh
parent 24062beebe
commit 81cbc33dbb
24 changed files with 1479 additions and 160 deletions

View file

@ -425,3 +425,10 @@
[]
(.back (.-history js/window)))
(defn animate!
([item keyframes duration] (animate! item keyframes duration nil))
([item keyframes duration onfinish]
(let [animation (.animate item keyframes duration)]
(when onfinish
(set! (.-onfinish animation) onfinish)))))