0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-09 21:41:23 -05:00

Add missing name persistence on layers sidebar.

This commit is contained in:
Andrey Antukh 2016-08-31 20:00:54 +03:00
parent 3ab79eb247
commit 335c972c20
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -119,9 +119,13 @@
[own shape]
(let [local (:rum/local own)]
(letfn [(on-blur [event]
(let [parent (.-parentNode (.-target event))]
(set! (.-draggable parent) true))
(swap! local assoc :edition false))
(let [target (dom/event->target event)
parent (.-parentNode target)
data {:id (:id shape)
:name (dom/get-value target)}]
(set! (.-draggable parent) true)
(rs/emit! (uds/update-shape data))
(swap! local assoc :edition false)))
(on-click [event]
(dom/stop-propagation event)
(dom/prevent-default event)