         (shapes/render-component))))
 
 (mx/defc path-shape-draw-area
-  [shape]
-  (-> (assoc shape :drawing? true)
-      (shapes/render-component)))
+  [{:keys [points] :as shape}]
+  (letfn [(on-click [event]
+            (dom/stop-propagation event)
+            (swap! drawing-shape
+                   (fn [shape]
+                     (let [points (:points shape)
+                           points (vec (butlast points))]
+                       (assoc shape :points points :close? true))))
+            (rx/push! drawing-stoper true))]
+    (let [{:keys [x y]} (first points)]
+      [:g
+       (-> (assoc shape :drawing? true)
+           (shapes/render-component))
+       [:circle {:cx x
+                 :cy y
+                 :r 5
+                 :fill "red"
+                 :on-click on-click}]])))
 
 ;; --- Drawing Initialization
 


;; --- State

(defonce drawing-shape (atom nil))
(defonce drawing-position (atom nil))


                (let [point (gpt/point point)]
                  (update shape :points conj point)))

              (update-point [{:keys [type points] :as shape} point index]
                (let [point (gpt/point point)
                      points (:points shape)]
                  (assoc-in shape [:points index] point)))

              (on-first-point [point]
                (let [shape (append-point shape point)]
