mirror of
https://github.com/penpot/penpot.git
synced 2025-01-23 06:58:58 -05: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
|
@ -46,6 +46,7 @@
|
||||||
- Fix paste in place in arboards [Taiga #2188](https://tree.taiga.io/project/penpot/issue/2188)
|
- Fix paste in place in arboards [Taiga #2188](https://tree.taiga.io/project/penpot/issue/2188)
|
||||||
- Fix font size input stuck on selection change [Taiga #2184](https://tree.taiga.io/project/penpot/issue/2184)
|
- Fix font size input stuck on selection change [Taiga #2184](https://tree.taiga.io/project/penpot/issue/2184)
|
||||||
- Fix stroke cut on shapes export [Taiga #2171](https://tree.taiga.io/project/penpot/issue/2171)
|
- Fix stroke cut on shapes export [Taiga #2171](https://tree.taiga.io/project/penpot/issue/2171)
|
||||||
|
- Fix no color when boolean with an SVG [Taiga #2193](https://tree.taiga.io/project/penpot/issue/2193)
|
||||||
|
|
||||||
### :arrow_up: Deps updates
|
### :arrow_up: Deps updates
|
||||||
|
|
||||||
|
|
|
@ -176,7 +176,12 @@
|
||||||
(let [children (->> (:shapes shape)
|
(let [children (->> (:shapes shape)
|
||||||
(map #(get objects %))
|
(map #(get objects %))
|
||||||
(map #(convert-to-path % objects)))
|
(map #(convert-to-path % objects)))
|
||||||
head (first children)
|
bool-type (:bool-type shape)
|
||||||
|
head (if (= bool-type :difference) (first children) (last children))
|
||||||
|
head (cond-> head
|
||||||
|
(and (contains? head :svg-attrs) (nil? (:fill-color head)))
|
||||||
|
(assoc :fill-color "#000000"))
|
||||||
|
|
||||||
head-data (select-keys head style-properties)
|
head-data (select-keys head style-properties)
|
||||||
content (pb/content-bool (:bool-type shape) (mapv :content children))]
|
content (pb/content-bool (:bool-type shape) (mapv :content children))]
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,10 @@
|
||||||
[bool-type name shapes objects]
|
[bool-type name shapes objects]
|
||||||
(let [shapes (mapv #(stp/convert-to-path % objects) shapes)
|
(let [shapes (mapv #(stp/convert-to-path % objects) shapes)
|
||||||
head (if (= bool-type :difference) (first shapes) (last 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)]
|
head-data (select-keys head stp/style-properties)]
|
||||||
[(-> {:id (uuid/next)
|
[(-> {:id (uuid/next)
|
||||||
:type :bool
|
:type :bool
|
||||||
|
@ -51,7 +55,10 @@
|
||||||
(let [shapes (->> (:shapes group)
|
(let [shapes (->> (:shapes group)
|
||||||
(map #(get objects %))
|
(map #(get objects %))
|
||||||
(mapv #(stp/convert-to-path % 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)]
|
head-data (select-keys head stp/style-properties)]
|
||||||
|
|
||||||
(-> group
|
(-> group
|
||||||
|
|
Loading…
Add table
Reference in a new issue