0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-13 08:11:30 -05:00

🐛 Fix circle dimensions update.

This commit is contained in:
Andrey Antukh 2020-01-31 11:16:30 +01:00
parent dcc81c9275
commit 391b926397
2 changed files with 7 additions and 4 deletions

View file

@ -203,8 +203,12 @@
instead of absolute positions."
[shape opts]
(case (:type shape)
:cirle (resize-dim-circle shape opts)
(resize-dim-rect shape opts)))
:rect (resize-dim-rect shape opts)
:canvas (resize-dim-rect shape opts)
:icon (resize-dim-rect shape opts)
:image (resize-dim-rect shape opts)
:text (resize-dim-rect shape opts)
:circle (resize-dim-circle shape opts)))
(defn- resize-dim-rect
[{:keys [proportion proportion-lock x y] :as shape}
@ -224,7 +228,6 @@
(defn- resize-dim-circle
[{:keys [proportion proportion-lock] :as shape}
{:keys [rx ry]}]
{:pre [(not (and rx ry))]}
(if-not proportion-lock
(if rx
(assoc shape :rx rx)

View file

@ -73,7 +73,7 @@
:on-change on-size-rx-change
:value (-> (:rx shape)
(math/precision 2)
(d/coalesce-str "0"))}]]
(d/coalesce-str "0"))}]]
[:div.lock-size {:class (when (:proportion-lock shape) "selected")
:on-click on-proportion-lock-change}
(if (:proportion-lock shape)