0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 08:20:45 -05:00

Use update-size event on circle measures element options sidebar.

This commit is contained in:
Andrey Antukh 2016-09-29 07:14:24 +02:00
parent b1e9936aa6
commit bb27a39759
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -24,14 +24,15 @@
[uxbox.util.dom :as dom]
[uxbox.util.data :refer (parse-int parse-float read-string)]))
(defn- circle-measures-menu-render
[own menu shape]
(mx/defc circle-measures-menu
{:mixins [mx/static]}
[menu {:keys [id] :as shape}]
(letfn [(on-size-change [attr event]
(let [value (dom/event->value event)
value (parse-int value 0)
sid (:id shape)
props {attr value}]
(rs/emit! (uds/update-radius-attrs sid props))))
(rs/emit! (uds/update-size sid props))))
(on-rotation-change [event]
(let [value (dom/event->value event)
value (parse-int value 0)