   (js/alert "123"))
 
 (def vertex-loc [[40 40]
-                 [100 40]
-                 [100 100]
-                 [40 100]])
+                 [300 40]
+                 [300 300]
+                 [40 300]])
 
 (def edges-vec [[0 1 "red"]
                 [1 2 "blue"]
                 [2 3 "red"]
                 [3 1 "red"]])
 
+
+(defn edge->endpoints [locations [start end color]]
+  [(locations start) (locations end) color])
+
+
+(defn make-edges [edges locations]
+  (let [edge-ids (map (partial str "edge") (range))
+        edges-with-endpoints (map (partial edge->endpoints locations) edges)]
+    (into {} (map vector edge-ids edges-with-endpoints))))
+
+
+
+(.log js/console (str (make-edges edges-vec vertex-loc)))
+
+(defn make-svg [[width height] edges]
+  [:svg:svg {:width width :height height}
+   [:svg:defs
+    triangle-marker
+    circle-marker]
+   (map svg-edge edges)]
+  )
+
+(.appendChild (dommy.core/sel1 :.forsvg)
+              (crate/html (make-svg [1000 1000]
+                                    (make-edges edges-vec vertex-loc)
+                                    )))
+
 (map #(dommy.core/listen! % :click click-handler) (dommy.core/sel :.clickable))
-
 ; (dommy.core/append (dommy.core/parent (dommy.core/sel1 :circle))
 ;                    (crate/html
 ;                      [:svg:line]))

    (string/join " " (map str ["M" "L" "L"] coords))))


(defn line [from to color id]
  [:svg:path
   {:class "clickable"
    :id id

    :marker-end "url(#Vertex)"}])



(defn e->tid [e]
  (-> e
