aaronc / freactive

High-performance, pure Clojurescript, declarative DOM library
http://documentup.com/aaronc/freactive
Eclipse Public License 1.0
387 stars 27 forks source link

Changes between version 1 and snapshot for 2 #30

Closed BorisKourt closed 9 years ago

BorisKourt commented 9 years ago

Hello, I have been doing some tests between the stable and snapshot versions and haven't been able to figure out what changed in the snapshot to break the following animation:

(defn page [page-fn class]
  (let [ ease-factor (animation/easer 0.0)] ;; In a let so that its fresh for each page.
    (dom/with-transitions
      [:div
       {:class (str "wrapper " class)
        :style {:opacity (rx (str @ease-factor))}} ;; Animation Adjust. 
       (page-fn)]
      {:on-show (fn [node callback]
                  (animation/start-easing! ease-factor 0 1.0 688
                                           animation/quart-out (fn [] (println "complete"))))})))

In version 1.0.0 this animated the opacity in and printed out a "complete" at the end. In the latest snapshot it doesn't appear to trigger any animation or call the final callback. Everything else works the same, just wondering about this.

BorisKourt commented 9 years ago

Just went back and did a test with 0.1.0 again and it isn't animating ether. Looks like I changed something here that broke it. Closing as its likely on my end.

aaronc commented 9 years ago

So the transition names are changed in 0.2.0-SNAPSHOT. You can see what it is currently here: https://github.com/aaronc/freactive/blob/master/test/freactive/dom_perf.cljs

I should caution you that this is the part of the API that is likely to change the most in the next release - I'm not exactly sure what it will look like yet, but it is something I'm giving serious consideration to and want to do as correctly as possible in the 0.2.0 release.

If you have any ideas, here's a space for discussions: https://github.com/aaronc/freactive/issues/8