Added one tick of extra pause when events have `:flush=dom` metadata. Previously, there were odd times when the pause wasn't enough.
This commit is contained in:
parent
e328e398f7
commit
3246265483
|
@ -1,7 +1,8 @@
|
|||
## 0.7.0 (2016-01-XXXX)
|
||||
## 0.7.0 (2016-NN-NN)
|
||||
|
||||
Improvements:
|
||||
- works with reagent 0.6.0 (while remaining backwards compatible with previous versions)
|
||||
- added one tick of extra pause when events have `:flush=dom` metadata. Previously, there were odd times when the pause wasn't enough.
|
||||
- compatable with reagent 0.6.0 (untested) while remaining backwards compatible with previous versions
|
||||
- [#138](https://github.com/Day8/re-frame/pull/138) Switch to using CircleCI and automated testing with Karma
|
||||
|
||||
Fixed:
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
(defproject simple-re-frame "0.7.0-alpha"
|
||||
:dependencies [[org.clojure/clojure "1.7.0"]
|
||||
[org.clojure/clojurescript "1.7.170"]
|
||||
[reagent "0.6.0-alpha"]
|
||||
[re-frame "0.7.0-alpha"]]
|
||||
[reagent "0.5.1"]
|
||||
[re-frame "0.7.0-alpha-3"]]
|
||||
|
||||
:plugins [[lein-cljsbuild "1.1.1"]
|
||||
[lein-figwheel "0.5.0-2"]]
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
(defproject todomvc-re-frame "0.7.0-alpha"
|
||||
:dependencies [[org.clojure/clojure "1.7.0"]
|
||||
[org.clojure/clojurescript "1.7.170"]
|
||||
[reagent "0.6.0-alpha"]
|
||||
[re-frame "0.7.0-alpha"]
|
||||
[reagent "0.5.1"]
|
||||
[re-frame "0.7.0-alpha-3"]
|
||||
[secretary "1.2.3"]
|
||||
[prismatic/schema "1.0.3"]]
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
(defproject re-frame "0.7.0-alpha-2"
|
||||
(defproject re-frame "0.7.0-alpha-3"
|
||||
:description "A Clojurescript MVC-like Framework For Writing SPAs Using Reagent."
|
||||
:url "https://github.com/Day8/re-frame.git"
|
||||
:license {:name "MIT"}
|
||||
:dependencies [[org.clojure/clojure "1.7.0"]
|
||||
[org.clojure/clojurescript "1.7.170"]
|
||||
[reagent "0.6.0-alpha"]]
|
||||
[reagent "0.5.1"]]
|
||||
|
||||
:profiles {:debug {:debug true}
|
||||
:dev {:dependencies [[karma-reporter "0.3.0"]]
|
||||
|
@ -22,6 +22,7 @@
|
|||
:deploy-repositories [["releases" :clojars]
|
||||
["snapshots" :clojars]]
|
||||
|
||||
;; because of https://github.com/karma-runner/karma/issues/1746 we include our own fork of karma
|
||||
:npm {:dependencies [[karma "https://github.com/danielcompton/karma/archive/v0.13.19.tar.gz"]
|
||||
[karma-cljs-test "0.1.0"]
|
||||
[karma-chrome-launcher "0.2.0"]
|
||||
|
|
|
@ -57,13 +57,15 @@
|
|||
;; which will run event processing after the next reagent animation frame.
|
||||
;;
|
||||
|
||||
(def run-after-next-annimation-frame
|
||||
(if (exists? reagent.core/after-render)
|
||||
(.-after-render reagent.core) ;; reagent >= 0.6.0
|
||||
(.-do-later reagent.impl.batching))) ;; reagent < 0.6.0
|
||||
|
||||
;; A map from event metadata keys to the corresponding "run later" functions
|
||||
(def later-fns
|
||||
{:flush-dom (if (exists? reagent.core/after-render) ;; after next annimation frame
|
||||
(.-after-render reagent.core) ;; reagent >= 0.6.0
|
||||
(.-do-later reagent.impl.batching)) ;; reagent < 0.6.0
|
||||
:yield goog.async.nextTick}) ;; almost immediately
|
||||
{:flush-dom (fn [f] (run-after-next-annimation-frame #(goog.async.nextTick f))) ;; a tick after the next annimation frame
|
||||
:yield goog.async.nextTick}) ;; almost immediately
|
||||
|
||||
(defprotocol IEventQueue
|
||||
(enqueue [this event])
|
||||
|
|
Loading…
Reference in New Issue