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." 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)