0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-13 16:21:57 -05:00

Select image for drawing using simple click.

Instead of double click.
This commit is contained in:
Andrey Antukh 2017-03-21 11:26:45 +01:00
parent cb5deda0ff
commit cc83a9b099
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -92,7 +92,7 @@
(mx/defc image-item
{:mixins [mx/static]}
[{:keys [thumbnail name id width height] :as image}]
(letfn [(on-double-click [event]
(letfn [(on-click [event]
(let [shape {:type :image
:name name
:id (uuid/random)
@ -102,7 +102,7 @@
(st/emit! (udw/select-for-drawing shape))
(udl/close!)))]
[:div.library-item {:key (str id)
:on-double-click on-double-click}
:on-click on-click}
[:div.library-item-th
{:style {:background-image (str "url('" thumbnail "')")}}]
[:span name]]))