        [placeholder display path])
      (if-not (empty? (:children node))
        (for [[pos child] (map vector (range) (:children node))]
-         [tree-node child (conj path pos) display false]))]
+         [tree-node child (conj path pos) display root-node false]))]
     (if-not (or is-root? (:add-as-child @state))
       [placeholder display path])]])
 

      [:div
       {:class (visible-if (not= (:id node)
                                 (get-in @state [:drag-node :id])))}
       (let [b (-> (display node path) (set-attrs node path))]
         b)])
    [:div.children
     {:class (visible-if (not= (:id node)
                               (get-in @state [:drag-node :id])))}

                                  (swap! mouse assoc :down? false))))


(defn tree-node [node path display root-node is-root?]
  [:div
   ^{:key (:id node)}
   (node-attr node path)
