   (let [unselect #(merge % {:selected nil})]
     (if (:selected world-state)
       (unselect (handle-selected clicked-what event world-state))
-      (handle-unslected clicked-what world-state))))
+      (handle-unslected clicked-what event world-state))))




(defn get-key [edge-str]
  (->> edge-str
       (drop edge-id-len)
       (apply str)
       (js/parseInt)))



(defn largest-key [{:keys [edges]}]
  (-> (map get-key (keys edges))
      (sort)
      (reverse)
      (first)))



(defn next-key [key-num]
  (str edge-id (inc key-num)))




  (:require [constraint.common :refer [edge-id
                                       vert-id]]))

(def vertex-regex (re-pattern (str vert-id ".*")))
(def edge-regex (re-pattern (str edge-id ".*")))

