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:
parent
dcc81c9275
commit
391b926397
2 changed files with 7 additions and 4 deletions
|
@ -203,8 +203,12 @@
|
||||||
instead of absolute positions."
|
instead of absolute positions."
|
||||||
[shape opts]
|
[shape opts]
|
||||||
(case (:type shape)
|
(case (:type shape)
|
||||||
:cirle (resize-dim-circle shape opts)
|
:rect (resize-dim-rect shape opts)
|
||||||
(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
|
(defn- resize-dim-rect
|
||||||
[{:keys [proportion proportion-lock x y] :as shape}
|
[{:keys [proportion proportion-lock x y] :as shape}
|
||||||
|
@ -224,7 +228,6 @@
|
||||||
(defn- resize-dim-circle
|
(defn- resize-dim-circle
|
||||||
[{:keys [proportion proportion-lock] :as shape}
|
[{:keys [proportion proportion-lock] :as shape}
|
||||||
{:keys [rx ry]}]
|
{:keys [rx ry]}]
|
||||||
{:pre [(not (and rx ry))]}
|
|
||||||
(if-not proportion-lock
|
(if-not proportion-lock
|
||||||
(if rx
|
(if rx
|
||||||
(assoc shape :rx rx)
|
(assoc shape :rx rx)
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
:on-change on-size-rx-change
|
:on-change on-size-rx-change
|
||||||
:value (-> (:rx shape)
|
:value (-> (:rx shape)
|
||||||
(math/precision 2)
|
(math/precision 2)
|
||||||
(d/coalesce-str "0"))}]]
|
(d/coalesce-str "0"))}]]
|
||||||
[:div.lock-size {:class (when (:proportion-lock shape) "selected")
|
[:div.lock-size {:class (when (:proportion-lock shape) "selected")
|
||||||
:on-click on-proportion-lock-change}
|
:on-click on-proportion-lock-change}
|
||||||
(if (:proportion-lock shape)
|
(if (:proportion-lock shape)
|
||||||
|
|
Loading…
Add table
Reference in a new issue