 (defn move-indicator-to [index]
   (set-position history-view "indexMorph" {:x (* diagram-width (/ index 100)) :y 3}))
 
-;; this variable indicates that we are currently reverted to an earlier
-;; state of the branch and also which one we have reverted to
-(def reverted-to (atom -1))
-
 (defn revert-to [i]
   (prn "request revert: " i)
   (let [index (* (dec (len @(@current-branch :data))) (/ i 100))]

      (prn "revert to: " index)
      (reset! app-state state)
      (reset! reverted-to i)
      (move-indicator-to i))))

(defn add-new-branch [branch]
    (let [new-branch-morph (branch-morph 

(def current-branch (atom {:id (generate-uuid) :data (atom [])}))

;; global atom referencing the total history graph
(def app-history (atom {:id 1 :root @current-branch :data (@current-branch :data)}))

;; ffd
(def history-view)

;; this variable indicates that we are currently reverted to an earlier
;; state of the branch and also which one we have reverted to
(def reverted-to (atom -1))

(defn most-recent-state []
  (let [l (len @(@current-branch :data))]
