Merge pull request #129 from scgilardi/develop

proposed updates to new router, re: issue #125
This commit is contained in:
Mike Thompson 2015-11-04 16:37:18 +11:00
commit 4e45d632aa
1 changed files with 7 additions and 7 deletions

View File

@ -125,12 +125,12 @@
later (cond later (cond
(:flush-dom m) do-later ;; after next annimation frame (:flush-dom m) do-later ;; after next annimation frame
(:yield m) goog.async.nextTick)] ;; almost immediately (:yield m) goog.async.nextTick)] ;; almost immediately
(later #(-fsm-trigger this :resume-run nil)))) (later #(-fsm-trigger this :begin-resume nil))))
(-resume-run (-resume-run
[this] [this]
(-process-1st-event this) ;; do the event which paused processing (-process-1st-event this) ;; do the event which paused processing
(-fsm-trigger this :done-paused nil)) ;; do the rest of the queued events (-fsm-trigger this :finish-resume nil)) ;; do the rest of the queued events
(-fsm-trigger (-fsm-trigger
[this trigger arg1] [this trigger arg1]
@ -158,12 +158,12 @@
;; event processing is paused - probably by :flush-dom metadata ;; event processing is paused - probably by :flush-dom metadata
[:paused :add-event ] [:paused #(-add-event this arg1)] [:paused :add-event ] [:paused #(-add-event this arg1)]
[:paused :resume-run ] [:do-paused #(-resume-run this)] [:paused :begin-resume ] [:resuming #(-resume-run this)]
;; processing an event which previously caused the queue to be paused ;; processing an event which previously caused the queue to be paused
[:do-paused :add-event ] [:paused #(-add-event this arg1)] [:resuming :add-event ] [:resuming #(-add-event this arg1)]
[:do-paused :exception ] [:quiescent #(-exception this arg1)] [:resuming :exception ] [:quiescent #(-exception this arg1)]
[:do-paused :done-paused] [:running #(-run-queue this)] [:resuming :finish-resume] [:running #(-run-queue this)]
(throw (str "re-frame: state transition not found. " fsm-state " " trigger)))] (throw (str "re-frame: state transition not found. " fsm-state " " trigger)))]