             [om.dom :as dom :include-macros true]
             [goog.style :as gstyle]
             [goog.dom :as gdom]
-            [cljs-workspace.draggable :as draggable :refer [clicked-morph]])
+            [cljs-workspace.draggable :as draggable :refer [clicked-morph]]
+            [om-tools.core :refer-macros [defcomponent]])
   (:import [goog.events EventType]))
 
 (enable-console-print!)

                       :className "morphNode"
                       :onClick #(handle-click % app)
                       :onMouseDown #(draggable/start-dragging % app owner)
                       :onMouseUp #(draggable/stop-dragging % app owner)} 
                   (when (get-in app [:morph :Halo])
                      (render-halo app owner))
                   (shape app owner))))))

      (prn (.-timeStamp event) " ... was not yet handled!")
      true)))

(defn handle-enter [e ->self]
  (when-let [cb (get-in @->self [:morph :onMouseEnter])]
              (cb ->self)))

(defn handle-leave [e ->self]
  (when-let [cb (get-in @->self [:morph :onMouseLeave])]
              (cb ->self)))

(defn handle-click [e ->self]
  ; add/remove morph from preserve list
  ; (branch-merge/toggle-preserve state)
  ; handle the custom behavior
  (when (and (not-yet-handled e) (.-altKey e))
    (@right-click-behavior e @->self))
  (when-let [cb (get-in @->self [:morph :onClick])] 
              (cb ->self)))

; morph property to CSS property translators

