                                 (render comp new-network)
                                 (.fit new-network)
                                 (reset! active-node-reaction
-                                        (run!
-                                         (let [node @active-node]
-                                           (if node
-                                             (.selectNodes new-network #js[(node-id node)])
-                                             (.unselectAll new-network)))))))
+                                        (run! (set-active-node-selection active-node new-network)))))
 
        :component-did-update (fn [comp]
                                (let [props (r/props comp)

                           :on-click (fn [] (dispatch [:graph-ui/close-context-menu])
                                            (dispatch [:ui/open-modal :modals/add-process]))]]]]])


(defn graph-inner []
  (let [network (atom nil)

                       vis-data (get-vis-graph graph @types)]
                   (.setSize net (aget dom-rect "width") (aget dom-rect "height"))
                   (.setData net (clj->js vis-data))
                   (when-let [node (:node (r/props comp))]
                     (set-active-node-selection node net))))]

    (r/create-class
      {:reagent-render (fn []
