Permalink
Browse files

Allow animations to be created just before they are run. Refs #56.

  • Loading branch information...
1 parent 6300d5b commit 8c516b523ea13a4c6ae968c23fcc535f2a79400a @brentonashworth brentonashworth committed Jan 17, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/lib/cljs/one/browser/animation.cljs
View
4 src/lib/cljs/one/browser/animation.cljs
@@ -707,7 +707,9 @@
(defn- make-animation
"Create the animation to run."
[{:keys [element animation]}]
- (if element (bind element animation) animation))
+ (cond element (bind element animation)
+ (fn? animation) (animation)
+ :else animation))
(defn- play-animations
"Called by a function which has been assigned the task of running

0 comments on commit 8c516b5

Please sign in to comment.