     (fn [x y] ((widget action-type)
                  (- x offset-x) (- y offset-y)))))
 
+(defn match-shapes [[x y] data]
+  (->> data
+       (filter #(-> (.createTransformedShape
+                           (% :transform) (% :shape)) (.contains x y)))))
+
 (defn triggered-mouse-actions [action-type [x y] data]
   (->> data
        expand-memo
-       (filter #(and (% action-type)
-                     (-> (.createTransformedShape
-                           (% :transform) (% :shape)) (.contains x y))))
+       (filter action-type)
+       (match-shapes [x y])
        (map #(create-action % action-type))))
 
 (defn run-mouse-actions [e action-type reference]

                            (run-mouse-actions e :mouse-down reference))
          (mouseReleased [e] (stop-dragging! canvas)
                             (run-mouse-actions e :mouse-up reference))
          (mouseDragged [e] (continue-dragging e canvas)))]
    (doto canvas
      (.addMouseListener mouse-adapter)

    :x 100
    :y 100}
   {:type :arc
    :mouse-in #(swap! grafix assoc-in [2 :fill] :red)
    :mouse-out #(swap! grafix assoc-in [2 :fill] :pink)
    :scale 2
      :mouse-up (fn [x y] (println "coords: " x y))
     :l 100
     :y 200
     :w 50
