mirror of
https://github.com/penpot/penpot.git
synced 2025-06-07 00:41:37 +02:00
🎉 Add border radius support to image shapes
This commit is contained in:
parent
38b7474f0b
commit
fc2a26f249
11 changed files with 67 additions and 11 deletions
|
@ -64,6 +64,7 @@
|
|||
(let [add! (add-factory shape)
|
||||
group? (= :group (:type shape))
|
||||
rect? (= :rect (:type shape))
|
||||
image? (= :image (:type shape))
|
||||
text? (= :text (:type shape))
|
||||
path? (= :path (:type shape))
|
||||
mask? (and group? (:masked-group? shape))
|
||||
|
@ -92,12 +93,21 @@
|
|||
(add! :constraints-v)
|
||||
(add! :fixed-scroll)
|
||||
|
||||
(cond-> (and rect? (some? (:r1 shape)))
|
||||
(cond-> (and (or rect? image?) (some? (:r1 shape)))
|
||||
(-> (add! :r1)
|
||||
(add! :r2)
|
||||
(add! :r3)
|
||||
(add! :r4)))
|
||||
|
||||
(cond-> (and image? (some? (:rx shape)))
|
||||
(-> (add! :rx)
|
||||
(add! :ry)))
|
||||
|
||||
(cond-> image?
|
||||
(-> (add! :fill-color)
|
||||
(add! :fill-opacity)
|
||||
(add! :fill-color-gradient)))
|
||||
|
||||
(cond-> path?
|
||||
(-> (add! :stroke-cap-start)
|
||||
(add! :stroke-cap-end)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue