mirror of
https://github.com/penpot/penpot.git
synced 2025-05-24 08:06:11 +02:00
🐛 Fix no color when boolean with an SVG
This commit is contained in:
parent
cca1431012
commit
5fd3689333
3 changed files with 15 additions and 2 deletions
|
@ -33,6 +33,10 @@
|
|||
[bool-type name shapes objects]
|
||||
(let [shapes (mapv #(stp/convert-to-path % objects) shapes)
|
||||
head (if (= bool-type :difference) (first shapes) (last shapes))
|
||||
head (cond-> head
|
||||
(and (contains? head :svg-attrs) (nil? (:fill-color head)))
|
||||
(assoc :fill-color "#000000"))
|
||||
|
||||
head-data (select-keys head stp/style-properties)]
|
||||
[(-> {:id (uuid/next)
|
||||
:type :bool
|
||||
|
@ -51,7 +55,10 @@
|
|||
(let [shapes (->> (:shapes group)
|
||||
(map #(get objects %))
|
||||
(mapv #(stp/convert-to-path % objects)))
|
||||
head (first shapes)
|
||||
head (if (= bool-type :difference) (first shapes) (last shapes))
|
||||
head (cond-> head
|
||||
(and (contains? head :svg-attrs) (nil? (:fill-color head)))
|
||||
(assoc :fill-color "#000000"))
|
||||
head-data (select-keys head stp/style-properties)]
|
||||
|
||||
(-> group
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue