From 4be6227b0231e64fc05e24169d01902bde57b470 Mon Sep 17 00:00:00 2001 From: "Stephen C. Gilardi" Date: Wed, 4 Nov 2015 00:14:11 -0500 Subject: [PATCH] revise fsm terminology around resuming --- src/re_frame/router.cljs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/re_frame/router.cljs b/src/re_frame/router.cljs index 3351ed3..fb6828a 100644 --- a/src/re_frame/router.cljs +++ b/src/re_frame/router.cljs @@ -125,12 +125,12 @@ later (cond (:flush-dom m) do-later ;; after next annimation frame (:yield m) goog.async.nextTick)] ;; almost immediately - (later #(-fsm-trigger this :resume-run nil)))) + (later #(-fsm-trigger this :begin-resume nil)))) (-resume-run [this] (-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 [this trigger arg1] @@ -157,13 +157,13 @@ [:scheduled #(-run-next-tick this)]) ;; event processing is paused - probably by :flush-dom metadata - [:paused :add-event ] [:paused #(-add-event this arg1)] - [:paused :resume-run ] [:do-paused #(-resume-run this)] + [:paused :add-event ] [:paused #(-add-event this arg1)] + [:paused :begin-resume ] [:resuming #(-resume-run this)] ;; processing an event which previously caused the queue to be paused - [:do-paused :add-event ] [:do-paused #(-add-event this arg1)] - [:do-paused :exception ] [:quiescent #(-exception this arg1)] - [:do-paused :done-paused] [:running #(-run-queue this)] + [:resuming :add-event ] [:resuming #(-add-event this arg1)] + [:resuming :exception ] [:quiescent #(-exception this arg1)] + [:resuming :finish-resume] [:running #(-run-queue this)] (throw (str "re-frame: state transition not found. " fsm-state " " trigger)))]