 
   (render [this]
     (let [{:keys [palette-widget/closure-comp
-                  palette-widget/active-color] :as props} (om/props this)
-          update-func #(color-update this active-color closure-comp)]
+                  palette-widget/active-color] :as props} (om/props this)]
 
-      (dom/div #js {:onMouseUp update-func
+      (dom/div #js {:onMouseUp #(color-update this)
+                    :id  "palette-widget"
                     ;;:onTouchEnd #(color-update this active-color closure-comp)
                     :ref "paletteWidget"} nil))))
 

(declare Palette)
(declare PaletteWidget)

(defn color-update [comp active-color closure-comp]
  (om/transact! comp
    `[(color/update {:color/id ~(:color/id active-color)
                     :color/hex ~(.getColor closure-comp)}) :palette]))

(defn color-remove [comp {:keys [color/id] :as color} e]
  (.preventDefault e)


  Object
  (componentDidMount [this]
    (let [{:keys        [palette-widget/active-color faces/list] :as props} (om/props this)
          widget        (HsvPalette. nil nil "goog-hsv-palette-sm")]
      (.render widget (getElement (dom/node this "paletteWidget")))
      (let [input (widget-input-elem this)]
        (.setColor widget (:color/hex active-color))
        (gevents/listen widget EventType.ACTION #(handle-action this %))
        (om/transact! this `[(palette-widget/update
                               {:palette-widget/face-classes-by-color-type ~(util/faces-to-colorize list (:color/id active-color))
                                :palette-widget/closure-comp ~widget})]))))

  (componentDidUpdate [this {id-prev :color/id} _]
    (let [{:keys [palette-widget/active-color
