        [])
      "</div>"]))
 
-(defn vis-svg-actxs [vis positions deltas]
+(defn vis-svg-actxs [vis positions deltas phase]
   (let [stroke-width 1
         line-height 21
         chs (:chs vis)

                     (:wait-chs actx-info))))
           (:actxs vis))
     (mapv (fn [delta]
             (case (:delta delta)
               :put (when (get chs (:ch delta))
                      ["<g transform='translate(500," (actx-y (:actx delta)) ")'>"
                       "<line class='delta' x1='0' y1='0' x2='100' y2='"
                       (- (ch-y (:ch delta)) (actx-y (:actx delta)))
                       "' stroke='green' stroke-width='1' marker-end='url(#triangle)'/>"
                       "</g>"])
               :take (when (get chs (:ch delta))
                       ["<g transform='translate(600," (ch-y (:ch delta)) ")'>"
                        "<line class='delta' x1='0' y1='0' x2='-100' y2='"
                        (- (actx-y (:actx delta)) (ch-y (:ch delta)))
                        "' stroke='" (if (:msg delta) "green" "black")
                        "' stroke-width='1' marker-end='url(#triangle)'/>"
                        "</g>"])
               :actx-start (when (> (actx-y (:child-actx delta)) line-height)
                             ["<g transform='translate(30," (actx-y (:actx delta)) ")'>"
                              "<line class='delta' x1='0' y1='0' x2='30' y2='"
                              (- (actx-y (:child-actx delta)) (actx-y (:actx delta)))
                              "' stroke='green' stroke-width='1' marker-end='url(#triangle)'/>"
                              "</g>"])
               :actx-end (when (> (actx-y (:child-actx delta)) line-height)
                           ["<g transform='translate(60," (actx-y (:child-actx delta)) ")'>"
                            "<line class='delta' x1='0' y1='0' x2='-30' y2='"
                            (- (actx-y (:actx delta)) (actx-y (:child-actx delta)))
                            "' stroke='black' stroke-width='1' marker-end='url(#triangle)'/>"
                            "</g>"])
               nil))
           deltas)]))

;; ------------------------------------------------

                               (assoc-in [:actxs child-actx]
                                         {:children {} :wait-chs {}})
                               (assoc-in [:actxs actx :children child-actx] true)))
               [{:delta :actx-start :actx actx :child-actx child-actx :phase :curr}]))
    :end (fn [vis actx args]
           (let [[child-actx result] args]
             (swap! vis #(-> %
                             (dissoc-in [:actxs child-actx])
                             (dissoc-in [:actxs actx :children child-actx])))
             [{:delta :actx-end :actx actx :child-actx child-actx :phase :prev}]))}
   "aclose"
   {:before (fn [vis actx args]
              (let [[ch] args] nil))
