mirror of
https://github.com/penpot/penpot.git
synced 2025-01-21 06:02:32 -05:00
Fix overriding of existing radius-4
This commit is contained in:
parent
38499e2f1f
commit
871402bd84
1 changed files with 5 additions and 4 deletions
|
@ -24,8 +24,7 @@
|
|||
[beicon.v2.core :as rx]
|
||||
[cuerdas.core :as str]
|
||||
[potok.v2.core :as ptk]
|
||||
[promesa.core :as p]
|
||||
[cljs.pprint :as pprint]))
|
||||
[promesa.core :as p]))
|
||||
|
||||
;; Helpers ---------------------------------------------------------------------
|
||||
|
||||
|
@ -51,11 +50,13 @@
|
|||
|
||||
;; Shape Update Functions ------------------------------------------------------
|
||||
|
||||
(defn update-shape-radius-single-corner [value shape-ids attribute]
|
||||
(defn update-shape-radius-single-corner [value shape-ids attributes]
|
||||
(dch/update-shapes shape-ids
|
||||
(fn [shape]
|
||||
(when (ctsr/has-radius? shape)
|
||||
(ctsr/set-radius-4 shape (first attribute) value)))
|
||||
(cond-> shape
|
||||
(:rx shape) (ctsr/switch-to-radius-4)
|
||||
:always (ctsr/set-radius-4 (first attributes) value))))
|
||||
{:reg-objects? true
|
||||
:attrs [:rx :ry :r1 :r2 :r3 :r4]}))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue