mirror of
https://github.com/penpot/penpot.git
synced 2025-06-07 13:01:40 +02:00
🐛 Fixes some issues with bool shapes
This commit is contained in:
parent
99a6142134
commit
4c86d5cfe3
15 changed files with 96 additions and 67 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
(ns app.main.ui.shapes.bool
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.geom.shapes :as gsh]
|
||||
[app.main.ui.hooks :refer [use-equal-memo]]
|
||||
[app.main.ui.shapes.export :as use]
|
||||
|
@ -26,11 +27,19 @@
|
|||
bool-content
|
||||
(mf/use-memo
|
||||
(mf/deps shape childs)
|
||||
#(or (:bool-content shape)
|
||||
(gsh/calc-bool-content shape childs)))]
|
||||
(fn []
|
||||
(cond
|
||||
(some? (:bool-content shape))
|
||||
(:bool-content shape)
|
||||
|
||||
(some? childs)
|
||||
(->> childs
|
||||
(d/mapm #(gsh/transform-shape %2))
|
||||
(gsh/calc-bool-content shape)))))]
|
||||
|
||||
[:*
|
||||
[:& path-shape {:shape (assoc shape :content bool-content)}]
|
||||
(when (some? bool-content)
|
||||
[:& path-shape {:shape (assoc shape :content bool-content)}])
|
||||
|
||||
(when include-metadata?
|
||||
[:> "penpot:bool" {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue