mirror of
https://github.com/penpot/penpot.git
synced 2025-05-29 04:36:12 +02:00
✨ Normalize the content prop from bool type (#6162)
Make it the same as path shape, because they are essentially the same data type
This commit is contained in:
parent
3cf823ffb3
commit
ebf3730454
10 changed files with 50 additions and 31 deletions
|
@ -420,9 +420,11 @@
|
|||
[bool-type]
|
||||
(h/call internal-module "_set_shape_bool_type" (sr/translate-bool-type bool-type)))
|
||||
|
||||
(defn set-shape-bool-content
|
||||
[content]
|
||||
(set-shape-path-content content))
|
||||
(defn- translate-blur-type
|
||||
[blur-type]
|
||||
(case blur-type
|
||||
:layer-blur 1
|
||||
0))
|
||||
|
||||
(defn set-shape-blur
|
||||
[blur]
|
||||
|
@ -800,7 +802,6 @@
|
|||
(dm/get-prop shape :r2)
|
||||
(dm/get-prop shape :r3)
|
||||
(dm/get-prop shape :r4)])
|
||||
bool-content (dm/get-prop shape :bool-content)
|
||||
svg-attrs (dm/get-prop shape :svg-attrs)
|
||||
shadows (dm/get-prop shape :shadow)]
|
||||
|
||||
|
@ -821,12 +822,13 @@
|
|||
(set-masked masked))
|
||||
(when (some? blur)
|
||||
(set-shape-blur blur))
|
||||
(when (and (some? content) (= type :path))
|
||||
(when (and (some? content)
|
||||
(or (= type :path)
|
||||
(= type :bool)))
|
||||
(set-shape-path-attrs svg-attrs)
|
||||
(set-shape-path-content content))
|
||||
(when (and (some? content) (= type :svg-raw))
|
||||
(set-shape-svg-raw-content (get-static-markup shape)))
|
||||
(when (some? bool-content) (set-shape-bool-content bool-content))
|
||||
(when (some? corners) (set-shape-corners corners))
|
||||
(when (some? shadows) (set-shape-shadows shadows))
|
||||
(when (and (= type :text) (some? content))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue